Browse Source

ANSI C fixes

ceriel 31 years ago
parent
commit
ab8dcfa134

+ 3 - 0
modules/src/flt_arith/b64_sft.c

@@ -7,6 +7,9 @@
 
 #include "flt_misc.h"
 
+#if __STDC__ > 0
+void
+#endif
 flt_b64_sft(e,n)
 	register struct flt_mantissa *e;
 	register int n;

+ 6 - 0
modules/src/flt_arith/flt_add.c

@@ -7,6 +7,9 @@
 
 #include "flt_misc.h"
 
+#if __STDC__ > 0
+void
+#endif
 flt_add(e1,e2,e3)
 	register flt_arith *e1,*e2,*e3;
 {
@@ -74,6 +77,9 @@ flt_add(e1,e2,e3)
 	flt_chk(e3);
 }
 
+#if __STDC__ > 0
+void
+#endif
 flt_sub(e1,e2,e3)
 	flt_arith *e1,*e2,*e3;
 {

+ 3 - 0
modules/src/flt_arith/flt_ar2flt.c

@@ -8,6 +8,9 @@
 #include "flt_misc.h"
 #include <em_arith.h>
 
+#if __STDC__ > 0
+void
+#endif
 flt_arith2flt(n, e, uns)
 	register arith n;
 	register flt_arith *e;

+ 21 - 0
modules/src/flt_arith/flt_arith.h

@@ -7,6 +7,10 @@
 #ifndef __FLT_INCLUDED__
 #define __FLT_INCLUDED__
 
+#ifndef arith
+#define arith long
+#endif
+
 struct flt_mantissa {
 	long	flt_h_32;	/* high order 32 bits of mantissa */
 	long	flt_l_32;	/* low order 32 bits of mantissa */
@@ -26,4 +30,21 @@ extern int	flt_status;
 #define FLT_BTSM	020
 
 #define FLT_STRLEN	32	/* max length of result of flt_flt2str() */
+
+#if __STDC__ > 0
+void flt_add(flt_arith *, flt_arith *, flt_arith *);
+void flt_sub(flt_arith *, flt_arith *, flt_arith *);
+void flt_mul(flt_arith *, flt_arith *, flt_arith *);
+void flt_div(flt_arith *, flt_arith *, flt_arith *);
+void flt_modf(flt_arith *, flt_arith *, flt_arith *);
+int flt_cmp(flt_arith *, flt_arith *);
+void flt_str2flt(char *, flt_arith *);
+void flt_flt2str(flt_arith *, char *, int);
+void flt_arith2flt(arith, flt_arith *, int);
+arith flt_flt2arith(flt_arith *, int);
+void flt_b64_sft(struct flt_mantissa *, int);
+void flt_umin(flt_arith *);
+#else
+arith flt_flt2arith();
+#endif
 #endif /* __FLT_INCLUDED__ */

+ 3 - 1
modules/src/flt_arith/flt_chk.c

@@ -8,7 +8,9 @@
 #include "flt_misc.h"
 
 int	flt_status = 0;
-
+#if __STDC__ > 0
+void
+#endif
 flt_chk(e)
 	register flt_arith *e;
 {

+ 3 - 1
modules/src/flt_arith/flt_div.c

@@ -6,7 +6,9 @@
 /* $Header$ */
 
 #include "flt_misc.h"
-
+#if __STDC__ > 0
+void
+#endif
 flt_div(e1,e2,e3)
 	register flt_arith *e1,*e2,*e3;
 {

+ 8 - 0
modules/src/flt_arith/flt_misc.h

@@ -20,3 +20,11 @@
 #define flt_chk		_flt_chk
 #define flt_b64_add	_flt_64add
 #define flt_split	_flt_split
+
+#if __STDC__ > 0
+int ucmp(long, long);
+void flt_nrm(flt_arith *);
+void flt_chk(flt_arith *);
+int flt_b64_add(struct flt_mantissa *, struct flt_mantissa *);
+void flt_split(flt_arith *, unsigned short *);
+#endif

+ 3 - 1
modules/src/flt_arith/flt_modf.c

@@ -6,7 +6,9 @@
 /* $Header$ */
 
 #include "flt_misc.h"
-
+#if __STDC__ > 0
+void
+#endif
 flt_modf(e, ipart, fpart)
 	register flt_arith *e, *ipart, *fpart;
 {

+ 3 - 1
modules/src/flt_arith/flt_mul.c

@@ -6,7 +6,9 @@
 /* $Header$ */
 
 #include "flt_misc.h"
-
+#if __STDC__ > 0
+void
+#endif
 flt_mul(e1,e2,e3)
 	register flt_arith *e1,*e2,*e3;
 {

+ 3 - 1
modules/src/flt_arith/flt_nrm.c

@@ -6,7 +6,9 @@
 /* $Header$ */
 
 #include "flt_misc.h"
-
+#if __STDC__ > 0
+void
+#endif
 flt_nrm(e)
 	register flt_arith *e;
 {

+ 6 - 2
modules/src/flt_arith/flt_str2fl.c

@@ -217,7 +217,9 @@ add_exponent(e, exp)
 	if (!status) status = flt_status;
 	flt_status = status;
 }
-
+#if __STDC__ > 0
+void
+#endif
 flt_str2flt(s, e)
 	register char		*s;
 	register flt_arith	*e;
@@ -418,7 +420,9 @@ flt_ecvt(e, decpt, sign)
 	}
 	return buf;
 }
-
+#if __STDC__ > 0
+void
+#endif
 flt_flt2str(e, buf, bufsize)
 	flt_arith *e;
 	char *buf;

+ 3 - 1
modules/src/flt_arith/flt_umin.c

@@ -6,7 +6,9 @@
 /* $Header$ */
 
 #include "flt_misc.h"
-
+#if __STDC__ > 0
+void
+#endif
 flt_umin(e)
 	flt_arith *e;
 {

+ 3 - 1
modules/src/flt_arith/split.c

@@ -1,7 +1,9 @@
 /* $Header$ */
 
 #include "flt_misc.h"
-
+#if __STDC__ > 0
+void
+#endif
 flt_split(e, p)
 	register flt_arith *e;
 	register unsigned short *p;