Move to ANSI C.
authorBruno Haible <bruno@clisp.org>
Tue, 19 Nov 2002 13:32:42 +0000 (13:32 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Nov 2002 13:32:42 +0000 (13:32 +0000)
lib/ChangeLog
lib/gcd.c
lib/gcd.h

index aa6c6626194d1672547af334e3ba94adcdec716f..2b535af8a38f2423ebabb4231f80cdb04eba26dc 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-19  Bruno Haible  <bruno@clisp.org>
+
+       * gcd.h (PARAMS): Remove macro.
+       (gcd): Use ANSI C function declarations.
+       * gcd.c (gcd): Likewise.
+
 2002-11-15  Bruno Haible  <bruno@clisp.org>
 
        * strcspn.c: Include <stddef.h>.
index af3ba16830df9c5cea94fe9f014c3fd5ed3c1417..b79087974970e13d385c0403941bc8e4fff80933 100644 (file)
--- a/lib/gcd.c
+++ b/lib/gcd.c
@@ -23,9 +23,7 @@
 
 /* Return the greatest common divisor of a > 0 and b > 0.  */
 unsigned long
-gcd (a, b)
-     unsigned long a;
-     unsigned long b;
+gcd (unsigned long a, unsigned long b)
 {
   /* Why no division, as in Euclid's algorithm? Because in Euclid's algorithm
      the division result floor(a/b) or floor(b/a) is very often = 1 or = 2,
index 225057ed87e7e55d93d9f84b6a090e6d8f909840..39ea5ed8da9689bf251e25dd54ab02b66237791f 100644 (file)
--- a/lib/gcd.h
+++ b/lib/gcd.h
 #ifndef _GCD_H
 #define _GCD_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 /* Return the greatest common divisor of a > 0 and b > 0.  */
-extern unsigned long gcd PARAMS ((unsigned long a, unsigned long b));
+extern unsigned long gcd (unsigned long a, unsigned long b);
 
 #endif /* _GCD_H */