summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--dir.c30
-rw-r--r--file.c10
-rw-r--r--function.c20
-rw-r--r--read.c12
-rw-r--r--variable.c10
6 files changed, 64 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index f4204eb..2ca872b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2002-10-03 Paul D. Smith <psmith@gnu.org>
+ Version 3.80 released.
+
+ * dir.c: Change hash functions to use K&R function definition style.
+ * function.c: Ditto.
+ * read.c: Ditto.
+ * variable.c: Ditto.
+
Update to automake 1.7.
* Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7.
diff --git a/dir.c b/dir.c
index 8060528..e862b9d 100644
--- a/dir.c
+++ b/dir.c
@@ -248,7 +248,8 @@ struct directory_contents
};
static unsigned long
-directory_contents_hash_1 (void const *key_0)
+directory_contents_hash_1 (key_0)
+ const void *key_0;
{
struct directory_contents const *key = (struct directory_contents const *) key_0;
unsigned long hash;
@@ -270,7 +271,8 @@ directory_contents_hash_1 (void const *key_0)
}
static unsigned long
-directory_contents_hash_2 (void const *key_0)
+directory_contents_hash_2 (key_0)
+ const void *key_0;
{
struct directory_contents const *key = (struct directory_contents const *) key_0;
unsigned long hash;
@@ -293,7 +295,9 @@ directory_contents_hash_2 (void const *key_0)
}
static int
-directory_contents_hash_cmp (void const *xv, void const *yv)
+directory_contents_hash_cmp (xv, yv)
+ const void *xv;
+ const void *yv;
{
struct directory_contents const *x = (struct directory_contents const *) xv;
struct directory_contents const *y = (struct directory_contents const *) yv;
@@ -341,19 +345,23 @@ struct directory
};
static unsigned long
-directory_hash_1 (void const *key)
+directory_hash_1 (key)
+ const void *key;
{
return_ISTRING_HASH_1 (((struct directory const *) key)->name);
}
static unsigned long
-directory_hash_2 (void const *key)
+directory_hash_2 (key)
+ const void *key;
{
return_ISTRING_HASH_2 (((struct directory const *) key)->name);
}
static int
-directory_hash_cmp (void const *x, void const *y)
+directory_hash_cmp (x, y)
+ const void *x;
+ const void *y;
{
return_ISTRING_COMPARE (((struct directory const *) x)->name,
((struct directory const *) y)->name);
@@ -379,19 +387,23 @@ struct dirfile
};
static unsigned long
-dirfile_hash_1 (void const *key)
+dirfile_hash_1 (key)
+ const void *key;
{
return_ISTRING_HASH_1 (((struct dirfile const *) key)->name);
}
static unsigned long
-dirfile_hash_2 (void const *key)
+dirfile_hash_2 (key)
+ const void *key;
{
return_ISTRING_HASH_2 (((struct dirfile const *) key)->name);
}
static int
-dirfile_hash_cmp (void const *xv, void const *yv)
+dirfile_hash_cmp (xv, yv)
+ const void *xv;
+ const void *yv;
{
struct dirfile const *x = ((struct dirfile const *) xv);
struct dirfile const *y = ((struct dirfile const *) yv);
diff --git a/file.c b/file.c
index ecb83d8..ce1a0f9 100644
--- a/file.c
+++ b/file.c
@@ -34,19 +34,23 @@ Boston, MA 02111-1307, USA. */
/* Hash table of files the makefile knows how to make. */
static unsigned long
-file_hash_1 (void const *key)
+file_hash_1 (key)
+ const void *key;
{
return_ISTRING_HASH_1 (((struct file const *) key)->hname);
}
static unsigned long
-file_hash_2 (void const *key)
+file_hash_2 (key)
+ const void *key;
{
return_ISTRING_HASH_2 (((struct file const *) key)->hname);
}
static int
-file_hash_cmp (void const *x, void const *y)
+file_hash_cmp (x, y)
+ const void *x;
+ const void *y;
{
return_ISTRING_COMPARE (((struct file const *) x)->hname,
((struct file const *) y)->hname);
diff --git a/function.c b/function.c
index d773735..cf646d6 100644
--- a/function.c
+++ b/function.c
@@ -41,21 +41,25 @@ struct function_table_entry
};
static unsigned long
-function_table_entry_hash_1 (void const *keyv)
+function_table_entry_hash_1 (keyv)
+ const void *keyv;
{
struct function_table_entry const *key = (struct function_table_entry const *) keyv;
return_STRING_N_HASH_1 (key->name, key->len);
}
static unsigned long
-function_table_entry_hash_2 (void const *keyv)
+function_table_entry_hash_2 (keyv)
+ const void *keyv;
{
struct function_table_entry const *key = (struct function_table_entry const *) keyv;
return_STRING_N_HASH_2 (key->name, key->len);
}
static int
-function_table_entry_hash_cmp (void const *xv, void const *yv)
+function_table_entry_hash_cmp (xv, yv)
+ const void *xv;
+ const void *yv;
{
struct function_table_entry const *x = (struct function_table_entry const *) xv;
struct function_table_entry const *y = (struct function_table_entry const *) yv;
@@ -896,19 +900,23 @@ struct a_word
};
static unsigned long
-a_word_hash_1 (void const *key)
+a_word_hash_1 (key)
+ const void *key;
{
return_STRING_HASH_1 (((struct a_word const *) key)->str);
}
static unsigned long
-a_word_hash_2 (void const *key)
+a_word_hash_2 (key)
+ const void *key;
{
return_STRING_HASH_2 (((struct a_word const *) key)->str);
}
static int
-a_word_hash_cmp (void const *x, void const *y)
+a_word_hash_cmp (x, y)
+ const void *x;
+ const void *y;
{
int result = ((struct a_word const *) x)->length - ((struct a_word const *) y)->length;
if (result)
diff --git a/read.c b/read.c
index 0ac59e1..9a4c609 100644
--- a/read.c
+++ b/read.c
@@ -272,7 +272,7 @@ read_all_makefiles (makefiles)
return read_makefiles;
}
-int
+static int
eval_makefile (filename, flags)
char *filename;
int flags;
@@ -1551,19 +1551,23 @@ conditional_line (line, flocp)
/* Remove duplicate dependencies in CHAIN. */
static unsigned long
-dep_hash_1 (void const *key)
+dep_hash_1 (key)
+ const void *key;
{
return_STRING_HASH_1 (dep_name ((struct dep const *) key));
}
static unsigned long
-dep_hash_2 (void const *key)
+dep_hash_2 (key)
+ const void *key;
{
return_STRING_HASH_2 (dep_name ((struct dep const *) key));
}
static int
-dep_hash_cmp (void const *x, void const *y)
+dep_hash_cmp (x, y)
+ const void *x;
+ const void *y;
{
struct dep *dx = (struct dep *) x;
struct dep *dy = (struct dep *) y;
diff --git a/variable.c b/variable.c
index 308ad75..bb8d810 100644
--- a/variable.c
+++ b/variable.c
@@ -33,21 +33,25 @@ Boston, MA 02111-1307, USA. */
/* Hash table of all global variable definitions. */
static unsigned long
-variable_hash_1 (void const *keyv)
+variable_hash_1 (keyv)
+ const void *keyv;
{
struct variable const *key = (struct variable const *) keyv;
return_STRING_N_HASH_1 (key->name, key->length);
}
static unsigned long
-variable_hash_2 (void const *keyv)
+variable_hash_2 (keyv)
+ const void *keyv;
{
struct variable const *key = (struct variable const *) keyv;
return_STRING_N_HASH_2 (key->name, key->length);
}
static int
-variable_hash_cmp (void const *xv, void const *yv)
+variable_hash_cmp (xv, yv)
+ const void *xv;
+ const void *yv;
{
struct variable const *x = (struct variable const *) xv;
struct variable const *y = (struct variable const *) yv;