changeset 742:cddc2692eef4

Define and use macro, PARAMS, not __P.
author Jim Meyering <jim@meyering.net>
date Thu, 17 Oct 1996 02:59:09 +0000
parents e7c57b7b5a29
children 0b9c205502a6
files lib/linebuffer.h lib/long-options.h lib/md5.h lib/memcasecmp.h lib/strtol.c lib/xstrtod.h lib/xstrtol.h
diffstat 7 files changed, 44 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/lib/linebuffer.h	Thu Oct 17 02:46:33 1996 +0000
+++ b/lib/linebuffer.h	Thu Oct 17 02:59:09 1996 +0000
@@ -24,20 +24,21 @@
   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 *));
--- a/lib/long-options.h	Thu Oct 17 02:46:33 1996 +0000
+++ b/lib/long-options.h	Thu Oct 17 02:59:09 1996 +0000
@@ -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)));
--- a/lib/md5.h	Thu Oct 17 02:46:33 1996 +0000
+++ b/lib/md5.h	Thu Oct 17 02:59:09 1996 +0000
@@ -63,11 +63,11 @@
 # 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 @@
 
 /* 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
--- a/lib/memcasecmp.h	Thu Oct 17 02:46:33 1996 +0000
+++ b/lib/memcasecmp.h	Thu Oct 17 02:59:09 1996 +0000
@@ -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));
--- a/lib/strtol.c	Thu Oct 17 02:46:33 1996 +0000
+++ b/lib/strtol.c	Thu Oct 17 02:59:09 1996 +0000
@@ -340,16 +340,16 @@
 
 /* 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
--- a/lib/xstrtod.h	Thu Oct 17 02:46:33 1996 +0000
+++ b/lib/xstrtod.h	Thu Oct 17 02:59:09 1996 +0000
@@ -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 */
--- a/lib/xstrtol.h	Thu Oct 17 02:46:33 1996 +0000
+++ b/lib/xstrtol.h	Thu Oct 17 02:59:09 1996 +0000
@@ -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 @@
 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									\