From ab8dcfa1346721c0b2a26dd43ad1bc5f9017f04c Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 21 Oct 1993 12:50:58 +0000 Subject: [PATCH] ANSI C fixes --- modules/src/flt_arith/b64_sft.c | 3 +++ modules/src/flt_arith/flt_add.c | 6 ++++++ modules/src/flt_arith/flt_ar2flt.c | 3 +++ modules/src/flt_arith/flt_arith.h | 21 +++++++++++++++++++++ modules/src/flt_arith/flt_chk.c | 4 +++- modules/src/flt_arith/flt_div.c | 4 +++- modules/src/flt_arith/flt_misc.h | 8 ++++++++ modules/src/flt_arith/flt_modf.c | 4 +++- modules/src/flt_arith/flt_mul.c | 4 +++- modules/src/flt_arith/flt_nrm.c | 4 +++- modules/src/flt_arith/flt_str2fl.c | 8 ++++++-- modules/src/flt_arith/flt_umin.c | 4 +++- modules/src/flt_arith/split.c | 4 +++- 13 files changed, 68 insertions(+), 9 deletions(-) diff --git a/modules/src/flt_arith/b64_sft.c b/modules/src/flt_arith/b64_sft.c index 80f1c916d..d724f387d 100644 --- a/modules/src/flt_arith/b64_sft.c +++ b/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; diff --git a/modules/src/flt_arith/flt_add.c b/modules/src/flt_arith/flt_add.c index 7b1883484..0db127b0b 100644 --- a/modules/src/flt_arith/flt_add.c +++ b/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; { diff --git a/modules/src/flt_arith/flt_ar2flt.c b/modules/src/flt_arith/flt_ar2flt.c index c714ed54e..21e91a8af 100644 --- a/modules/src/flt_arith/flt_ar2flt.c +++ b/modules/src/flt_arith/flt_ar2flt.c @@ -8,6 +8,9 @@ #include "flt_misc.h" #include +#if __STDC__ > 0 +void +#endif flt_arith2flt(n, e, uns) register arith n; register flt_arith *e; diff --git a/modules/src/flt_arith/flt_arith.h b/modules/src/flt_arith/flt_arith.h index 98b2398d5..3d31b3ded 100644 --- a/modules/src/flt_arith/flt_arith.h +++ b/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__ */ diff --git a/modules/src/flt_arith/flt_chk.c b/modules/src/flt_arith/flt_chk.c index 112ccb9aa..bfdd332fe 100644 --- a/modules/src/flt_arith/flt_chk.c +++ b/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; { diff --git a/modules/src/flt_arith/flt_div.c b/modules/src/flt_arith/flt_div.c index 5413aa1fb..dc8aea33f 100644 --- a/modules/src/flt_arith/flt_div.c +++ b/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; { diff --git a/modules/src/flt_arith/flt_misc.h b/modules/src/flt_arith/flt_misc.h index 0720cd89e..467c6fbc9 100644 --- a/modules/src/flt_arith/flt_misc.h +++ b/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 diff --git a/modules/src/flt_arith/flt_modf.c b/modules/src/flt_arith/flt_modf.c index 32c97ee73..675c26b9e 100644 --- a/modules/src/flt_arith/flt_modf.c +++ b/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; { diff --git a/modules/src/flt_arith/flt_mul.c b/modules/src/flt_arith/flt_mul.c index 695434631..caac6b798 100644 --- a/modules/src/flt_arith/flt_mul.c +++ b/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; { diff --git a/modules/src/flt_arith/flt_nrm.c b/modules/src/flt_arith/flt_nrm.c index 3d634f065..df6d75c66 100644 --- a/modules/src/flt_arith/flt_nrm.c +++ b/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; { diff --git a/modules/src/flt_arith/flt_str2fl.c b/modules/src/flt_arith/flt_str2fl.c index 6612639c9..f9936ba4d 100644 --- a/modules/src/flt_arith/flt_str2fl.c +++ b/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; diff --git a/modules/src/flt_arith/flt_umin.c b/modules/src/flt_arith/flt_umin.c index 1d16bbfe6..182eb7fa9 100644 --- a/modules/src/flt_arith/flt_umin.c +++ b/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; { diff --git a/modules/src/flt_arith/split.c b/modules/src/flt_arith/split.c index 6c619edaa..d5c0344c1 100644 --- a/modules/src/flt_arith/split.c +++ b/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;