ANSI C fixes

This commit is contained in:
ceriel 1993-10-21 12:50:58 +00:00
parent d8bcd5d06c
commit ab8dcfa134
13 changed files with 68 additions and 9 deletions

View file

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

View file

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

View file

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

View file

@ -7,6 +7,10 @@
#ifndef __FLT_INCLUDED__ #ifndef __FLT_INCLUDED__
#define __FLT_INCLUDED__ #define __FLT_INCLUDED__
#ifndef arith
#define arith long
#endif
struct flt_mantissa { struct flt_mantissa {
long flt_h_32; /* high order 32 bits of mantissa */ long flt_h_32; /* high order 32 bits of mantissa */
long flt_l_32; /* low 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_BTSM 020
#define FLT_STRLEN 32 /* max length of result of flt_flt2str() */ #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__ */ #endif /* __FLT_INCLUDED__ */

View file

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

View file

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

View file

@ -20,3 +20,11 @@
#define flt_chk _flt_chk #define flt_chk _flt_chk
#define flt_b64_add _flt_64add #define flt_b64_add _flt_64add
#define flt_split _flt_split #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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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