summaryrefslogtreecommitdiff
path: root/lib/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/lib/hash.c b/lib/hash.c
index bd6dc87..a3138bc 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -1,20 +1,21 @@
-/* hash.c: hash table operations.
+# hash.c: hash table operations.
+#
+# Copyright (C) 1994, 1995, 1996, 2011 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
-Copyright (C) 1994, 1995, 1996, 2011 Free Software Foundation, Inc.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 3 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
@@ -43,7 +44,7 @@ hash P2C(hash_table_type, table, const_string, key)
return n;
}
-
+
hash_table_type
hash_create P1C(unsigned, size)
{
@@ -59,7 +60,7 @@ hash_create P1C(unsigned, size)
return ret;
}
-
+
/* Whether or not KEY is already in MAP, insert it and VALUE. Do not
duplicate the strings, in case they're being purposefully shared. */
@@ -86,7 +87,7 @@ hash_insert P3C(hash_table_type *, table, const_string, key,
loc->next = new_elt; /* Insert the new one after. */
}
}
-
+
/* Look up STR in MAP. Return a (dynamically-allocated) list of the
corresponding strings or NULL if no match. */
@@ -138,7 +139,7 @@ hash_lookup P2C(hash_table_type, table, const_string, key)
return STR_LIST (ret);
}
-
+
/* We only print nonempty buckets, to decrease output volume. */
void