Added prototyping stuff

This commit is contained in:
ceriel
1993-11-10 11:14:28 +00:00
parent abf052244b
commit 11d4fdf6e0
47 changed files with 529 additions and 143 deletions

View File

@@ -5,7 +5,7 @@
/* $Header$ */
# include "flt_misc.h"
#include "flt_misc.h"
int
flt_b64_add(e1,e2)

View File

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

View File

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

View File

@@ -8,9 +8,7 @@
#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;

View File

@@ -28,32 +28,32 @@ extern int flt_status;
#define FLT_STRLEN 32
.PP
.B flt_add(e1, e2, e3)
.B void flt_add(e1, e2, e3)
.B flt_arith *e1, *e2, *e3;
.PP
.B flt_mul(e1, e2, e3)
.B void flt_mul(e1, e2, e3)
.B flt_arith *e1, *e2, *e3;
.PP
.B flt_sub(e1, e2, e3)
.B void flt_sub(e1, e2, e3)
.B flt_arith *e1, *e2, *e3;
.PP
.B flt_div(e1, e2, e3)
.B void flt_div(e1, e2, e3)
.B flt_arith *e1, *e2, *e3;
.PP
.B flt_umin(e)
.B void flt_umin(e)
.B flt_arith *e;
.PP
.B flt_modf(e1, intpart, fractpart)
.B void flt_modf(e1, intpart, fractpart)
.B flt_arith *e1, *intpart, *fractpart;
.PP
.B int flt_cmp(e1, e2)
.B flt_arith *e1, *e2;
.PP
.B flt_str2flt(s, e)
.B void flt_str2flt(s, e)
.B char *s;
.B flt_arith *e;
.PP
.B flt_flt2str(e, buf, bufsize)
.B void flt_flt2str(e, buf, bufsize)
.B flt_arith *e;
.B char *buf;
.B int bufsize;
@@ -61,7 +61,7 @@ extern int flt_status;
.B int flt_status;
.PP
.B #include <em_arith.h>
.B flt_arith2flt(n, e, uns)
.B void flt_arith2flt(n, e, uns)
.B arith n;
.B flt_arith *e;
.B int uns;
@@ -70,7 +70,7 @@ extern int flt_status;
.B flt_arith *e;
.B int uns;
.PP
.B flt_b64_sft(m, n)
.B void flt_b64_sft(m, n)
.B struct flt_mantissa *m;
.B int n;
.SH DESCRIPTION

View File

@@ -7,6 +7,8 @@
#ifndef __FLT_INCLUDED__
#define __FLT_INCLUDED__
#include "ansi.h"
#ifndef arith
#define arith long
#endif
@@ -31,20 +33,17 @@ extern int flt_status;
#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
_PROTOTYPE(void flt_add, (flt_arith *, flt_arith *, flt_arith *));
_PROTOTYPE(void flt_sub, (flt_arith *, flt_arith *, flt_arith *));
_PROTOTYPE(void flt_mul, (flt_arith *, flt_arith *, flt_arith *));
_PROTOTYPE(void flt_div, (flt_arith *, flt_arith *, flt_arith *));
_PROTOTYPE(void flt_modf, (flt_arith *, flt_arith *, flt_arith *));
_PROTOTYPE(int flt_cmp, (flt_arith *, flt_arith *));
_PROTOTYPE(void flt_str2flt, (char *, flt_arith *));
_PROTOTYPE(void flt_flt2str, (flt_arith *, char *, int));
_PROTOTYPE(void flt_arith2flt, (arith, flt_arith *, int));
_PROTOTYPE(arith flt_flt2arith, (flt_arith *, int));
_PROTOTYPE(void flt_b64_sft, (struct flt_mantissa *, int));
_PROTOTYPE(void flt_umin, (flt_arith *));
#endif /* __FLT_INCLUDED__ */

View File

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

View File

@@ -5,7 +5,7 @@
/* $Header$ */
#include "flt_misc.h"
#include "flt_misc.h"
int
flt_cmp(e1, e2)

View File

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

View File

@@ -21,10 +21,8 @@
#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
_PROTOTYPE(int ucmp, (long, long));
_PROTOTYPE(void flt_nrm, (flt_arith *));
_PROTOTYPE(void flt_chk, (flt_arith *));
_PROTOTYPE(int flt_b64_add, (struct flt_mantissa *, struct flt_mantissa *));
_PROTOTYPE(void flt_split, (flt_arith *, unsigned short *));

View File

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

View File

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

View File

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

View File

@@ -217,9 +217,8 @@ 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;
@@ -420,9 +419,8 @@ flt_ecvt(e, decpt, sign)
}
return buf;
}
#if __STDC__ > 0
void
#endif
flt_flt2str(e, buf, bufsize)
flt_arith *e;
char *buf;

View File

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

View File

@@ -43,10 +43,11 @@ $(LIBFLT): $(OBJ)
$(RANLIB) $(LIBFLT)
install: all
-mkdir $(MOD_DIR)/lib
-mkdir $(MOD_DIR)/h
cp $(LIBFLT) $(MOD_DIR)/lib/$(LIBFLT)
$(RANLIB) $(MOD_DIR)/lib/$(LIBFLT)
cp $(SRC_DIR)/flt_arith.h $(MOD_DIR)/h/flt_arith.h
cp $(SRC_DIR)/flt_arith.3 $(MOD_DIR)/man/flt_arith.3
if [ $(DO_MACHINE_INDEP) = y ] ; \
then mk_manpage $(SRC_DIR)/flt_arith.3 $(TARGET_HOME) ; \
fi
@@ -54,7 +55,6 @@ install: all
cmp: all
-cmp $(LIBFLT) $(MOD_DIR)/lib/$(LIBFLT)
-cmp $(SRC_DIR)/flt_arith.h $(MOD_DIR)/h/flt_arith.h
-cmp $(SRC_DIR)/flt_arith.3 $(MOD_DIR)/man/flt_arith.3
pr:
@pr $(SRC_DIR)/proto.make $(SRC)

View File

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