*/
/* Author: J.W. Stevenson */
-/*
+
/* function argc:integer; extern; */
/* function argv(i:integer):string; extern; */
/* procedure argshift; extern; */
#define __NO_DEFS
#include <math.h>
+#if __STDC__
+#include <pc_math.h>
+#endif
+
double
_atn(x)
double x;
long cstime;
};
+#ifndef EM_WSIZE
+#define EM_WSIZE _EM_WSIZE
+#endif
+
int clock() {
struct tbuf t;
#include <pc_err.h>
extern _trp();
+#if __STDC__
+#include <float.h>
+#include <pc_math.h>
+#define M_MIN_D DBL_MIN
+#define M_MAX_D DBL_MAX
+#define HUGE HUGE_VAL
+#endif
+
static double
-ldexp(fl,exp)
+Ldexp(fl,exp)
double fl;
int exp;
{
xn = g * g;
x = g * POLYNOM2(xn, p);
n += 1;
- return (ldexp(0.5 + x/(POLYNOM3(xn, q) - x), n));
+ return (Ldexp(0.5 + x/(POLYNOM3(xn, q) - x), n));
}
#include <math.h>
#include <pc_err.h>
+#if __STDC__
+#include <pc_math.h>
+#define HUGE HUGE_VAL
+#endif
+
double
_log(x)
double x;
_new(n,pp) int n; struct adm **pp; {
struct adm *p,*q;
+ int *ptmp;
n = ((n+sizeof(*p)-1) / sizeof(*p)) * sizeof(*p);
if ((p = _lastp) != 0)
_rst(&q);
initialize:
*pp = p;
- while (p < q)
- *((int *)p)++ = UNDEF;
+ ptmp = (int *)p;
+ while (ptmp < (int *)q)
+ *ptmp++ = UNDEF;
}
+/* $Header$ */
+/*
+ * (c) copyright 1990 by the Vrije Universiteit, Amsterdam, The Netherlands.
+ * See the copyright notice in the ACK home directory, in the file "Copyright".
+ */
+
/* Author: Hans van Eck */
#include <pc_err.h>
-extern trp();
+extern _trp();
_nfa(bool)
{
#define assert(x) /* nothing */
+#ifndef EM_WSIZE
+#define EM_WSIZE _EM_WSIZE
+#endif
+
struct descr {
int low;
int diff;
ap += (i * ad->size);
i = (zd->diff + 1) * zd->size;
if (zd->size == 1) {
+ int *aptmp = (int *)ap;
assert(ad->size == EM_WSIZE);
while (--i >= 0)
- *zp++ = *((int *)ap)++;
+ *zp++ = *aptmp++;
} else {
assert(ad->size == zd->size);
while (--i >= 0)
}
int _getint(f) struct file *f; {
- int signed,i,ch;
+ int is_signed,i,ch;
- signed = _getsig(f);
+ is_signed = _getsig(f);
ch = _fstdig(f);
i = 0;
do
i = i*10 - ch;
while ((ch = _nxtdig(f)) >= 0);
- return(signed ? i : -i);
+ return(is_signed ? i : -i);
}
int _rdi(f) struct file *f; {
extern int _nxtdig();
long _rdl(f) struct file *f; {
- int signed,ch; long l;
+ int is_signed,ch; long l;
_rf(f);
_skipsp(f);
- signed = _getsig(f);
+ is_signed = _getsig(f);
ch = _fstdig(f);
l = 0;
do
l = l*10 - ch;
while ((ch = _nxtdig(f)) >= 0);
- return(signed ? l : -l);
+ return(is_signed ? l : -l);
}
}
double _rdr(f) struct file *f; {
- int i; double e; int signed,ch;
+ int i; double e; int is_signed,ch;
r = 0;
pow10 = 0;
_rf(f);
_skipsp(f);
- signed = _getsig(f);
+ is_signed = _getsig(f);
ch = _fstdig(f);
do
dig(ch);
r /= e;
else
r *= e;
- return(signed? -r : r);
+ return(is_signed? -r : r);
}
#define __NO_DEFS
#include <math.h>
+#if __STDC__
+#include <pc_math.h>
+#endif
+
static double
sinus(x, cos_flag)
double x;
#define NITER 5
static double
-ldexp(fl,exp)
+Ldexp(fl,exp)
double fl;
int exp;
{
exponent--;
val *= 2;
}
- val = ldexp(val + 1.0, exponent/2 - 1);
- /* was: val = (val + 1.0)/2.0; val = ldexp(val, exponent/2); */
+ val = Ldexp(val + 1.0, exponent/2 - 1);
+ /* was: val = (val + 1.0)/2.0; val = Ldexp(val, exponent/2); */
for (exponent = NITER - 1; exponent >= 0; exponent--) {
val = (val + x / val) / 2.0;
}
#define assert(x) /* nothing */
+#ifndef EM_WSIZE
+#define EM_WSIZE _EM_WSIZE
+#endif
+
struct descr {
int low;
int diff;
ap += (i * ad->size);
i = (zd->diff + 1) * zd->size;
if (zd->size == 1) {
+ int *aptmp = (int *) ap;
assert(ad->size == EM_WSIZE);
while (--i >= 0)
- *((int *)ap)++ = *zp++;
+ *aptmp++ = *zp++;
} else {
assert(ad->size == zd->size);
while (--i >= 0)
extern _wstrin();
+#ifndef EM_WSIZE
+#ifdef _EM_WSIZE
+#define EM_WSIZE _EM_WSIZE
+#endif
+#endif
+
#if EM_WSIZE==4
#define SZ 11
#define MININT -2147483648