From 18470530db277476b5a229375fb5a8cb27f26ed0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 19 Nov 2002 13:32:42 +0000 Subject: [PATCH] Move to ANSI C. --- lib/ChangeLog | 6 ++++++ lib/gcd.c | 4 +--- lib/gcd.h | 10 +--------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index aa6c66261..2b535af8a 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2002-11-19 Bruno Haible + + * gcd.h (PARAMS): Remove macro. + (gcd): Use ANSI C function declarations. + * gcd.c (gcd): Likewise. + 2002-11-15 Bruno Haible * strcspn.c: Include . diff --git a/lib/gcd.c b/lib/gcd.c index af3ba1683..b79087974 100644 --- 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, diff --git a/lib/gcd.h b/lib/gcd.h index 225057ed8..39ea5ed8d 100644 --- a/lib/gcd.h +++ b/lib/gcd.h @@ -19,15 +19,7 @@ #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 */ -- 2.11.0