summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-10-17 02:59:09 +0000
committerJim Meyering <jim@meyering.net>1996-10-17 02:59:09 +0000
commit2ae5764dda52f95186d8b7bc3533a29e5cf18453 (patch)
treeba686d3d27d2e5040134a5bd0cebcc81005ce709
parent1b727760f039aaf9fee5b67722e453cef427c943 (diff)
downloadgnulib-2ae5764dda52f95186d8b7bc3533a29e5cf18453.tar.gz
Define and use macro, PARAMS, not __P.
-rw-r--r--lib/linebuffer.h13
-rw-r--r--lib/long-options.h13
-rw-r--r--lib/md5.h18
-rw-r--r--lib/memcasecmp.h8
-rw-r--r--lib/strtol.c10
-rw-r--r--lib/xstrtod.h15
-rw-r--r--lib/xstrtol.h10
7 files changed, 44 insertions, 43 deletions
diff --git a/lib/linebuffer.h b/lib/linebuffer.h
index 70781de3b7..6130710a7d 100644
--- a/lib/linebuffer.h
+++ b/lib/linebuffer.h
@@ -24,20 +24,21 @@ struct linebuffer
char *buffer;
};
-#undef __P
+#undef PARAMS
#if defined (__STDC__) && __STDC__
-#define __P(x) x
+# define PARAMS(x) x
#else
-#define __P(x) ()
+# define PARAMS(x) ()
#endif
/* Initialize linebuffer LINEBUFFER for use. */
-void initbuffer __P ((struct linebuffer *linebuffer));
+void initbuffer PARAMS ((struct linebuffer *linebuffer));
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
Remove any newline. Does not null terminate.
Return LINEBUFFER, except at end of file return 0. */
-struct linebuffer *readline __P ((struct linebuffer *linebuffer, FILE *stream));
+struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer,
+ FILE *stream));
/* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */
-void freebuffer __P ((struct linebuffer *));
+void freebuffer PARAMS ((struct linebuffer *));
diff --git a/lib/long-options.h b/lib/long-options.h
index 44d80f5ee5..acf5e2d22e 100644
--- a/lib/long-options.h
+++ b/lib/long-options.h
@@ -1,11 +1,12 @@
-#undef __P
+#undef PARAMS
#if defined (__STDC__) && __STDC__
-# define __P(Args) Args
+# define PARAMS(Args) Args
#else
-# define __P(Args) ()
+# define PARAMS(Args) ()
#endif
void
- parse_long_options __P ((int _argc, char **_argv, const char *_command_name,
- const char *_package,
- const char *_version, void (*_usage) (int)));
+ parse_long_options PARAMS ((int _argc, char **_argv,
+ const char *_command_name,
+ const char *_package,
+ const char *_version, void (*_usage) (int)));
diff --git a/lib/md5.h b/lib/md5.h
index ed38c192d2..495461f879 100644
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -63,11 +63,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# endif
#endif
-#undef __P
+#undef PARAMS
#if defined (__STDC__) && __STDC__
-#define __P(x) x
+# define PARAMS(x) x
#else
-#define __P(x) ()
+# define PARAMS(x) ()
#endif
/* Structure to save state of computation between the single steps. */
@@ -86,30 +86,30 @@ struct md5_ctx
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
-void md5_init_ctx __P ((struct md5_ctx *ctx));
+void md5_init_ctx PARAMS ((struct md5_ctx *ctx));
/* Starting with the result of former calls of this function (or the
initialzation function update the context for the next LEN bytes
starting at BUFFER.
It is necessary that LEN is a multiple of 64!!! */
-void md5_process_block __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+void md5_process_block PARAMS ((const void *buffer, size_t len,
+ struct md5_ctx *ctx));
/* Put result from CTX in first 16 bytes following RESBUF. 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. */
-void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
+void *md5_read_ctx PARAMS ((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. */
-int md5_stream __P ((FILE *stream, void *resblock));
+int md5_stream PARAMS ((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. */
-void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
+void *md5_buffer PARAMS ((const char *buffer, size_t len, void *resblock));
#endif
diff --git a/lib/memcasecmp.h b/lib/memcasecmp.h
index 8069f953cf..32695c1190 100644
--- a/lib/memcasecmp.h
+++ b/lib/memcasecmp.h
@@ -1,9 +1,9 @@
-#undef __P
+#undef PARAMS
#if defined (__STDC__) && __STDC__
-# define __P(args) args
+# define PARAMS(args) args
#else
-# define __P(args) ()
+# define PARAMS(args) ()
#endif
int
- memcasecmp __P((const void *vs1, const void *vs2, size_t n));
+ memcasecmp PARAMS ((const void *vs1, const void *vs2, size_t n));
diff --git a/lib/strtol.c b/lib/strtol.c
index ad0804931d..9b4029ebb2 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -340,16 +340,16 @@ noconv:
/* External user entry point. */
-#undef __P
+#undef PARAMS
#if defined (__STDC__) && __STDC__
-# define __P(args) args
+# define PARAMS(args) args
#else
-# define __P(args) ()
+# define PARAMS(args) ()
#endif
/* Prototype. */
-INT strtol __P ((const STRING_TYPE *nptr, STRING_TYPE **endptr,
- int base));
+INT strtol PARAMS ((const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base));
INT
diff --git a/lib/xstrtod.h b/lib/xstrtod.h
index 5b61c46df8..b2fffb2789 100644
--- a/lib/xstrtod.h
+++ b/lib/xstrtod.h
@@ -1,15 +1,14 @@
#ifndef XSTRTOD_H
# define XSTRTOD_H 1
-# ifndef __P
-# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
-# define __P(Args) Args
-# else
-# define __P(Args) ()
-# endif
-# endif
+#undef PARAMS
+#if defined (__STDC__) && __STDC__
+# define PARAMS(Args) Args
+#else
+# define PARAMS(Args) ()
+#endif
int
- xstrtod __P ((const char *str, const char **ptr, double *result));
+ xstrtod PARAMS ((const char *str, const char **ptr, double *result));
#endif /* not XSTRTOD_H */
diff --git a/lib/xstrtol.h b/lib/xstrtol.h
index fd0c97f632..e710a09ac7 100644
--- a/lib/xstrtol.h
+++ b/lib/xstrtol.h
@@ -13,11 +13,11 @@
# define __ZLONG_MAX LONG_MAX
#endif
-#undef __P
+#undef PARAMS
#if defined (__STDC__) && __STDC__
-#define __P(x) x
+# define PARAMS(x) x
#else
-#define __P(x) ()
+# define PARAMS(x) ()
#endif
enum strtol_error
@@ -27,8 +27,8 @@ enum strtol_error
typedef enum strtol_error strtol_error;
strtol_error
- __xstrtol __P ((const char *s, char **ptr, int base,
- __unsigned long int *val, const char *valid_suffixes));
+ __xstrtol PARAMS ((const char *s, char **ptr, int base,
+ __unsigned long int *val, const char *valid_suffixes));
#define _STRTOL_ERROR(exit_code, str, argument_type_string, err) \
do \