aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-27 15:31:13 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-27 15:31:13 +0000
commit8858115ecd90fe07d0a95c42b929420e4bf0d1a4 (patch)
tree0872026e71fbe1b4f55f00b32edbefbb1c754623 /include
parentad909ac050f9b879b00dbf614043976962b3ded5 (diff)
include/
2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net> * md5.h: Remove definition and uses of __P. * dyn-string.h: Remove uses of PARAMS. * fibheap.h: Likewise. * floatformat.h: Likewise. * hashtab.h: Likewise. libiberty/ 2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net> Convert libiberty to use ISO C prototype style 4/n. * hashtab.c (higher_prime_index, hash_pointer, eq_pointer, htab_size, htab_elements, htab_mod_1, htab_mod, htab_mod_m2, htab_create_alloc, htab_set_functions_ex, htab_create, htab_try_create, htab_delete, htab_empty, find_empty_slot_for_expand, htab_expand, htab_find_with_hash, htab_find, htab_find_slot_with_hash, htab_find_slot, htab_remove_elt, htab_remove_elt_with_hash, htab_clear_slot, htab_traverse_noresize, htab_traverse, htab_collisions, htab_hash_string, iterative_hash): Use ISO C prototype. * hex.c (hex_init): Likewise. * index.c (index): Likewise. * insque.c (insque, remque): Likewise. * lbasename.c (lbasename): Likewise. * lrealpath.c (lrealpath): Likewise. * make-relative-prefix.c (save_string, split_directories, free_split_directories, make_relative_prefix): Likewise. * make-temp-file.c (try, choose_tmpdir, make_temp_file): Likewise. * md5.c (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream, md5_buffer, md5_process_bytes, md5_process_block): Likewise. * memchr.c (memchr): Likewise. * memcpy.c (memcpy): Likewise. * memmove.c (memmove): Likewise. * gettimeofday.c (gettimeofday): Likewise. * getruntime.c (get_run_time): Likewise. * getpwd.c (getpwd, getpwd): Likewise. * getpagesize.c (getpagesize): Likewise. * getopt1.c (getopt_long, getopt_long_only, main): Likewise. * getopt.c (my_index, exchange, _getopt_initialize, _getopt_internal, getopt, main): Likewise. * getcwd.c (getcwd): Likewise. * fnmatch.c (fnmatch): Likewise. * floatformat.c (floatformat_always_valid, floatformat_i387_ext_is_valid, get_field, floatformat_to_double, put_field, floatformat_from_double, floatformat_is_valid, ieee_test, main): Likewise. * fibheap.c (fibheap_new, fibnode_new, fibheap_compare, fibheap_comp_data, fibheap_insert, fibheap_min, fibheap_min_key, fibheap_union, fibheap_extract_min, fibheap_replace_key_data, fibheap_replace_key, fibheap_replace_data, fibheap_delete_node, fibheap_delete, fibheap_empty, fibheap_extr_min_node, fibheap_ins_root, fibheap_rem_root, fibheap_consolidate, fibheap_link, fibheap_cut, fibheap_cascading_cut, fibnode_insert_after, fibnode_remove): Likewise. * ffs.c (ffs): Likewise. * fdmatch.c (fdmatch): Likewise. * dyn-string.c (dyn_string_init, dyn_string_new, dyn_string_delete, dyn_string_release, dyn_string_resize, dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr, dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert, dyn_string_insert_cstr, dyn_string_insert_char, dyn_string_append, dyn_string_append_cstr, dyn_string_append_char, dyn_string_substring, dyn_string_eq): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog8
-rw-r--r--include/dyn-string.h39
-rw-r--r--include/fibheap.h28
-rw-r--r--include/floatformat.h9
-rw-r--r--include/hashtab.h90
-rw-r--r--include/md5.h25
6 files changed, 97 insertions, 102 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 1de167a0a6d..87372e54ebe 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,11 @@
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * md5.h: Remove definition and uses of __P.
+ * dyn-string.h: Remove uses of PARAMS.
+ * fibheap.h: Likewise.
+ * floatformat.h: Likewise.
+ * hashtab.h: Likewise.
+
2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
* demangle.h: Remove uses of PARAMS.
diff --git a/include/dyn-string.h b/include/dyn-string.h
index 85f88b12cf6..a351ec3bdcc 100644
--- a/include/dyn-string.h
+++ b/include/dyn-string.h
@@ -40,24 +40,21 @@ typedef struct dyn_string
(strcmp ((DS1)->s, (DS2)->s))
-extern int dyn_string_init PARAMS ((struct dyn_string *, int));
-extern dyn_string_t dyn_string_new PARAMS ((int));
-extern void dyn_string_delete PARAMS ((dyn_string_t));
-extern char *dyn_string_release PARAMS ((dyn_string_t));
-extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int));
-extern void dyn_string_clear PARAMS ((dyn_string_t));
-extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_insert PARAMS ((dyn_string_t, int,
- dyn_string_t));
-extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int,
- const char *));
-extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int));
-extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_append_char PARAMS ((dyn_string_t, int));
-extern int dyn_string_substring PARAMS ((dyn_string_t,
- dyn_string_t, int, int));
-extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t));
+extern int dyn_string_init (struct dyn_string *, int);
+extern dyn_string_t dyn_string_new (int);
+extern void dyn_string_delete (dyn_string_t);
+extern char *dyn_string_release (dyn_string_t);
+extern dyn_string_t dyn_string_resize (dyn_string_t, int);
+extern void dyn_string_clear (dyn_string_t);
+extern int dyn_string_copy (dyn_string_t, dyn_string_t);
+extern int dyn_string_copy_cstr (dyn_string_t, const char *);
+extern int dyn_string_prepend (dyn_string_t, dyn_string_t);
+extern int dyn_string_prepend_cstr (dyn_string_t, const char *);
+extern int dyn_string_insert (dyn_string_t, int, dyn_string_t);
+extern int dyn_string_insert_cstr (dyn_string_t, int, const char *);
+extern int dyn_string_insert_char (dyn_string_t, int, int);
+extern int dyn_string_append (dyn_string_t, dyn_string_t);
+extern int dyn_string_append_cstr (dyn_string_t, const char *);
+extern int dyn_string_append_char (dyn_string_t, int);
+extern int dyn_string_substring (dyn_string_t, dyn_string_t, int, int);
+extern int dyn_string_eq (dyn_string_t, dyn_string_t);
diff --git a/include/fibheap.h b/include/fibheap.h
index e1e843ddbb1..bfd82da2cb0 100644
--- a/include/fibheap.h
+++ b/include/fibheap.h
@@ -68,19 +68,19 @@ typedef struct fibnode
#endif
} *fibnode_t;
-extern fibheap_t fibheap_new PARAMS ((void));
-extern fibnode_t fibheap_insert PARAMS ((fibheap_t, fibheapkey_t, void *));
-extern int fibheap_empty PARAMS ((fibheap_t));
-extern fibheapkey_t fibheap_min_key PARAMS ((fibheap_t));
-extern fibheapkey_t fibheap_replace_key PARAMS ((fibheap_t, fibnode_t,
- fibheapkey_t));
-extern void *fibheap_replace_key_data PARAMS ((fibheap_t, fibnode_t,
- fibheapkey_t, void *));
-extern void *fibheap_extract_min PARAMS ((fibheap_t));
-extern void *fibheap_min PARAMS ((fibheap_t));
-extern void *fibheap_replace_data PARAMS ((fibheap_t, fibnode_t, void *));
-extern void *fibheap_delete_node PARAMS ((fibheap_t, fibnode_t));
-extern void fibheap_delete PARAMS ((fibheap_t));
-extern fibheap_t fibheap_union PARAMS ((fibheap_t, fibheap_t));
+extern fibheap_t fibheap_new (void);
+extern fibnode_t fibheap_insert (fibheap_t, fibheapkey_t, void *);
+extern int fibheap_empty (fibheap_t);
+extern fibheapkey_t fibheap_min_key (fibheap_t);
+extern fibheapkey_t fibheap_replace_key (fibheap_t, fibnode_t,
+ fibheapkey_t);
+extern void *fibheap_replace_key_data (fibheap_t, fibnode_t,
+ fibheapkey_t, void *);
+extern void *fibheap_extract_min (fibheap_t);
+extern void *fibheap_min (fibheap_t);
+extern void *fibheap_replace_data (fibheap_t, fibnode_t, void *);
+extern void *fibheap_delete_node (fibheap_t, fibnode_t);
+extern void fibheap_delete (fibheap_t);
+extern fibheap_t fibheap_union (fibheap_t, fibheap_t);
#endif /* _FIBHEAP_H_ */
diff --git a/include/floatformat.h b/include/floatformat.h
index a8244ada5c7..40911b33694 100644
--- a/include/floatformat.h
+++ b/include/floatformat.h
@@ -82,7 +82,7 @@ struct floatformat
const char *name;
/* Validator method. */
- int (*is_valid) PARAMS ((const struct floatformat *fmt, const char *from));
+ int (*is_valid) (const struct floatformat *fmt, const char *from);
};
/* floatformats for IEEE single and double, big and little endian. */
@@ -116,18 +116,17 @@ extern const struct floatformat floatformat_ia64_quad_little;
Store the double in *TO. */
extern void
-floatformat_to_double PARAMS ((const struct floatformat *, const char *, double *));
+floatformat_to_double (const struct floatformat *, const char *, double *);
/* The converse: convert the double *FROM to FMT
and store where TO points. */
extern void
-floatformat_from_double PARAMS ((const struct floatformat *,
- const double *, char *));
+floatformat_from_double (const struct floatformat *, const double *, char *);
/* Return non-zero iff the data at FROM is a valid number in format FMT. */
extern int
-floatformat_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
+floatformat_is_valid (const struct floatformat *fmt, const char *from);
#endif /* defined (FLOATFORMAT_H) */
diff --git a/include/hashtab.h b/include/hashtab.h
index de24dedb91b..c75b23c8f05 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -48,38 +48,38 @@ typedef unsigned int hashval_t;
/* Callback function pointer types. */
/* Calculate hash of a table entry. */
-typedef hashval_t (*htab_hash) PARAMS ((const void *));
+typedef hashval_t (*htab_hash) (const void *);
/* Compare a table entry with a possible entry. The entry already in
the table always comes first, so the second element can be of a
different type (but in this case htab_find and htab_find_slot
cannot be used; instead the variants that accept a hash value
must be used). */
-typedef int (*htab_eq) PARAMS ((const void *, const void *));
+typedef int (*htab_eq) (const void *, const void *);
/* Cleanup function called whenever a live element is removed from
the hash table. */
-typedef void (*htab_del) PARAMS ((void *));
+typedef void (*htab_del) (void *);
/* Function called by htab_traverse for each live element. The first
arg is the slot of the element (which can be passed to htab_clear_slot
if desired), the second arg is the auxiliary pointer handed to
htab_traverse. Return 1 to continue scan, 0 to stop. */
-typedef int (*htab_trav) PARAMS ((void **, void *));
+typedef int (*htab_trav) (void **, void *);
/* Memory-allocation function, with the same functionality as calloc().
Iff it returns NULL, the hash table implementation will pass an error
code back to the user, so if your code doesn't handle errors,
best if you use xcalloc instead. */
-typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
+typedef PTR (*htab_alloc) (size_t, size_t);
/* We also need a free() routine. */
-typedef void (*htab_free) PARAMS ((PTR));
+typedef void (*htab_free) (PTR);
/* Memory allocation and deallocation; variants which take an extra
argument. */
-typedef PTR (*htab_alloc_with_arg) PARAMS ((void *, size_t, size_t));
-typedef void (*htab_free_with_arg) PARAMS ((void *, void *));
+typedef PTR (*htab_alloc_with_arg) (void *, size_t, size_t);
+typedef void (*htab_free_with_arg) (void *, void *);
/* Hash tables are of the following type. The structure
(implementation) of this type is not needed for using the hash
@@ -139,45 +139,43 @@ enum insert_option {NO_INSERT, INSERT};
/* The prototypes of the package functions. */
-extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
- htab_eq, htab_del,
- htab_alloc, htab_free));
+extern htab_t htab_create_alloc (size_t, htab_hash,
+ htab_eq, htab_del,
+ htab_alloc, htab_free);
-extern htab_t htab_create_alloc_ex PARAMS ((size_t, htab_hash,
- htab_eq, htab_del,
- PTR, htab_alloc_with_arg,
- htab_free_with_arg));
+extern htab_t htab_create_alloc_ex (size_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg);
/* Backward-compatibility functions. */
-extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
-extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
-
-extern void htab_set_functions_ex PARAMS ((htab_t, htab_hash,
- htab_eq, htab_del,
- PTR, htab_alloc_with_arg,
- htab_free_with_arg));
-
-extern void htab_delete PARAMS ((htab_t));
-extern void htab_empty PARAMS ((htab_t));
-
-extern PTR htab_find PARAMS ((htab_t, const void *));
-extern PTR *htab_find_slot PARAMS ((htab_t, const void *,
- enum insert_option));
-extern PTR htab_find_with_hash PARAMS ((htab_t, const void *,
- hashval_t));
-extern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *,
- hashval_t,
- enum insert_option));
-extern void htab_clear_slot PARAMS ((htab_t, void **));
-extern void htab_remove_elt PARAMS ((htab_t, void *));
-extern void htab_remove_elt_with_hash PARAMS ((htab_t, void *, hashval_t));
-
-extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
-extern void htab_traverse_noresize PARAMS ((htab_t, htab_trav, void *));
-
-extern size_t htab_size PARAMS ((htab_t));
-extern size_t htab_elements PARAMS ((htab_t));
-extern double htab_collisions PARAMS ((htab_t));
+extern htab_t htab_create (size_t, htab_hash, htab_eq, htab_del);
+extern htab_t htab_try_create (size_t, htab_hash, htab_eq, htab_del);
+
+extern void htab_set_functions_ex (htab_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg);
+
+extern void htab_delete (htab_t);
+extern void htab_empty (htab_t);
+
+extern PTR htab_find (htab_t, const void *);
+extern PTR *htab_find_slot (htab_t, const void *, enum insert_option);
+extern PTR htab_find_with_hash (htab_t, const void *, hashval_t);
+extern PTR *htab_find_slot_with_hash (htab_t, const void *,
+ hashval_t,
+ enum insert_option);
+extern void htab_clear_slot (htab_t, void **);
+extern void htab_remove_elt (htab_t, void *);
+extern void htab_remove_elt_with_hash (htab_t, void *, hashval_t);
+
+extern void htab_traverse (htab_t, htab_trav, void *);
+extern void htab_traverse_noresize (htab_t, htab_trav, void *);
+
+extern size_t htab_size (htab_t);
+extern size_t htab_elements (htab_t);
+extern double htab_collisions (htab_t);
/* A hash function for pointers. */
extern htab_hash htab_hash_pointer;
@@ -186,10 +184,10 @@ extern htab_hash htab_hash_pointer;
extern htab_eq htab_eq_pointer;
/* A hash function for null-terminated strings. */
-extern hashval_t htab_hash_string PARAMS ((const PTR));
+extern hashval_t htab_hash_string (const PTR);
/* An iterative hash function for arbitrary data. */
-extern hashval_t iterative_hash PARAMS ((const PTR, size_t, hashval_t));
+extern hashval_t iterative_hash (const PTR, size_t, hashval_t);
/* Shorthand for hashing something with an intrinsic size. */
#define iterative_hash_object(OB,INIT) iterative_hash (&OB, sizeof (OB), INIT)
diff --git a/include/md5.h b/include/md5.h
index ad51f19877a..4cdad889a10 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -66,13 +66,6 @@ typedef u_int32_t md5_uint32;
# endif
#endif
-#undef __P
-#if defined (__STDC__) && __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#endif
-
/* Structure to save state of computation between the single steps. */
struct md5_ctx
{
@@ -93,21 +86,21 @@ struct md5_ctx
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
-extern void md5_init_ctx __P ((struct md5_ctx *ctx));
+extern void md5_init_ctx (struct md5_ctx *ctx);
/* Starting with the result of former calls of this function (or the
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is necessary that LEN is a multiple of 64!!! */
-extern void md5_process_block __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+extern void md5_process_block (const void *buffer, size_t len,
+ struct md5_ctx *ctx);
/* Starting with the result of former calls of this function (or the
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is NOT required that LEN is a multiple of 64. */
-extern void md5_process_bytes __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+extern void md5_process_bytes (const void *buffer, size_t len,
+ struct md5_ctx *ctx);
/* Process the remaining bytes in the buffer and put result from CTX
in first 16 bytes following RESBUF. The result is always in little
@@ -116,7 +109,7 @@ extern void md5_process_bytes __P ((const void *buffer, size_t len,
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
-extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
+extern void *md5_finish_ctx (struct md5_ctx *ctx, void *resbuf);
/* Put result from CTX in first 16 bytes following RESBUF. The result is
@@ -125,18 +118,18 @@ extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
-extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
+extern void *md5_read_ctx (const struct md5_ctx *ctx, void *resbuf);
/* Compute MD5 message digest for bytes read from STREAM. The
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
-extern int md5_stream __P ((FILE *stream, void *resblock));
+extern int md5_stream (FILE *stream, void *resblock);
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
result is always in little endian byte order, so that a byte-wise
output yields to the wanted ASCII representation of the message
digest. */
-extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
+extern void *md5_buffer (const char *buffer, size_t len, void *resblock);
#endif