aboutsummaryrefslogtreecommitdiff
path: root/locale/programs
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/simple-hash.c25
-rw-r--r--locale/programs/xmalloc.c10
-rw-r--r--locale/programs/xstrdup.c3
3 files changed, 10 insertions, 28 deletions
diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c
index a4412f9..2c81185 100644
--- a/locale/programs/simple-hash.c
+++ b/locale/programs/simple-hash.c
@@ -66,9 +66,7 @@ static int is_prime (unsigned long int candidate);
int
-init_hash (htab, init_size)
- hash_table *htab;
- unsigned long int init_size;
+init_hash (hash_table *htab, unsigned long int init_size)
{
/* We need the size to be a prime. */
init_size = next_prime (init_size);
@@ -88,8 +86,7 @@ init_hash (htab, init_size)
int
-delete_hash (htab)
- hash_table *htab;
+delete_hash (hash_table *htab)
{
free (htab->table);
obstack_free (&htab->mem_pool, NULL);
@@ -98,11 +95,7 @@ delete_hash (htab)
int
-insert_entry (htab, key, keylen, data)
- hash_table *htab;
- const void *key;
- size_t keylen;
- void *data;
+insert_entry (hash_table *htab, const void *key, size_t keylen, void *data)
{
unsigned long int hval = compute_hashval (key, keylen);
hash_entry *table = (hash_entry *) htab->table;
@@ -194,11 +187,7 @@ find_entry (htab, key, keylen, result)
int
-set_entry (htab, key, keylen, newval)
- hash_table *htab;
- const void *key;
- size_t keylen;
- void *newval;
+set_entry (hash_table *htab, const void *key, size_t keylen, void *newval)
{
hash_entry *table = (hash_entry *) htab->table;
size_t idx = lookup (htab, key, keylen, compute_hashval (key, keylen));
@@ -287,8 +276,7 @@ lookup (htab, key, keylen, hval)
unsigned long int
-next_prime (seed)
- unsigned long int seed;
+next_prime (unsigned long int seed)
{
/* Make it definitely odd. */
seed |= 1;
@@ -301,8 +289,7 @@ next_prime (seed)
static int
-is_prime (candidate)
- unsigned long int candidate;
+is_prime (unsigned long int candidate)
{
/* No even number and none less than 10 will be passed here. */
unsigned long int divn = 3;
diff --git a/locale/programs/xmalloc.c b/locale/programs/xmalloc.c
index 36bc17f..2528c5f 100644
--- a/locale/programs/xmalloc.c
+++ b/locale/programs/xmalloc.c
@@ -52,8 +52,7 @@ void free ();
int xmalloc_exit_failure = EXIT_FAILURE;
static VOID *
-fixup_null_alloc (n)
- size_t n;
+fixup_null_alloc (size_t n)
{
VOID *p;
@@ -68,8 +67,7 @@ fixup_null_alloc (n)
/* Allocate N bytes of memory dynamically, with error checking. */
VOID *
-xmalloc (n)
- size_t n;
+xmalloc (size_t n)
{
VOID *p;
@@ -98,9 +96,7 @@ xcalloc (n, s)
If P is NULL, run xmalloc. */
VOID *
-xrealloc (p, n)
- VOID *p;
- size_t n;
+xrealloc (VOID *p, size_t n)
{
if (p == 0)
return xmalloc (n);
diff --git a/locale/programs/xstrdup.c b/locale/programs/xstrdup.c
index a8fadb3..445d67c 100644
--- a/locale/programs/xstrdup.c
+++ b/locale/programs/xstrdup.c
@@ -30,8 +30,7 @@ char *xstrdup (char *string) __THROW;
/* Return a newly allocated copy of STRING. */
char *
-xstrdup (string)
- char *string;
+xstrdup (char *string)
{
return strcpy (xmalloc (strlen (string) + 1), string);
}