diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | builtin.c | 11 | ||||
-rw-r--r-- | eval.c | 35 | ||||
-rw-r--r-- | floatcomp.c | 16 | ||||
-rw-r--r-- | io.c | 6 |
6 files changed, 9 insertions, 65 deletions
@@ -1,3 +1,8 @@ +Sat Dec 18 19:56:17 2010 Arnold D. Robbins <arnold@skeeve.com> + + * builtin.c, eval.c, floatcomp.c, io.c: Remove all the crufty + old code for #ifdef CRAY. + Thu Dec 16 11:06:50 2010 Arnold D. Robbins <arnold@skeeve.com> Put strftime() default format into PROCINFO["strftime"]. @@ -83,6 +83,7 @@ Changes from 3.1.8 to 4.0.0 - Atari - Amiga - BeOS + - Cray - Tandem (non-POSIX) - MS-DOS with Microsoft Compiler - MS-Windows with Microsoft Compiler @@ -68,17 +68,6 @@ extern FILE *output_fp; static NODE *sub_common(int nargs, long how_many, int backdigs); -#ifdef _CRAY -/* Force the standard C compiler to use the library math functions. */ -extern double exp(double); -double (*Exp)(double) = exp; -#define exp(x) (*Exp)(x) -extern double log(double); -double (*Log)(double) = log; -#define log(x) (*Log)(x) -#endif - - #define POP_TWO_SCALARS(s1, s2) \ s2 = POP_SCALAR(); \ s1 = POP(); \ @@ -1478,9 +1478,6 @@ op_assign(OPCODE op) NODE **lhs; NODE *r = NULL; AWKNUM x1, x2; -#ifdef _CRAY - long lx; -#endif #ifndef HAVE_FMOD AWKNUM x; #endif @@ -1504,19 +1501,7 @@ op_assign(OPCODE op) decr_sp(); fatal(_("division by zero attempted in `/='")); } -#ifdef _CRAY - /* special case for integer division, put in for Cray */ - lx = x2; - if (lx == 0) { - r = *lhs = make_number(x1 / x2); - break; - } - lx = (long) x1 / lx; - if (lx * x1 == x2) - r = *lhs = make_number((AWKNUM) lx); - else -#endif /* _CRAY */ - r = *lhs = make_number(x1 / x2); + r = *lhs = make_number(x1 / x2); break; case Op_assign_mod: if (x2 == (AWKNUM) 0) { @@ -1598,10 +1583,6 @@ r_interpret(INSTRUCTION *code) NODE **lhs; AWKNUM x, x1, x2; int di, pre = FALSE; -#ifdef _CRAY - long lx; - long lx2; -#endif Regexp *rp; int currule = 0; #if defined(GAWKDEBUG) || defined(ARRAYDEBUG) @@ -1990,21 +1971,7 @@ quotient: fatal(_("division by zero attempted")); TOP_NUMBER(x1); -#ifdef _CRAY - /* special case for integer division, put in for Cray */ - lx2 = x2; - if (lx2 == 0) - x = x1 / x2; - else { - lx = (long) x1 / lx2; - if (lx * x2 == x1) - x = lx; - else - x = x1 / x2; - } -#else x = x1 / x2; -#endif r = make_number(x); REPLACE(r); break; diff --git a/floatcomp.c b/floatcomp.c index ff6a4708..db1ed1e6 100644 --- a/floatcomp.c +++ b/floatcomp.c @@ -79,13 +79,7 @@ Please port the following code to your weird host; AWKNUM Floor(AWKNUM n) { - return floor(n -#if 0 -#ifdef _CRAY - * (1.0 + DBL_EPSILON) -#endif -#endif - ); + return floor(n); } /* Ceil --- do ceil(), also for Cray */ @@ -93,13 +87,7 @@ Floor(AWKNUM n) AWKNUM Ceil(AWKNUM n) { - return ceil(n -#if 0 -#ifdef _CRAY - * (1.0 + DBL_EPSILON) -#endif -#endif - ); + return ceil(n); } #ifdef HAVE_UINTMAX_T @@ -447,12 +447,6 @@ iop_close(IOBUF *iop) iop->flag &= ~IOP_AT_EOF; iop->flag |= IOP_CLOSED; /* there may be dangling pointers */ iop->dataend = NULL; -#ifdef _CRAY - /* Work around bug in UNICOS popen */ - if (iop->fd < 3) - ret = 0; - else -#endif /* Don't close standard files or else crufty code elsewhere will lose */ /* FIXME: *DO* close it. Just reopen on an invalid handle. */ if (iop->fd == fileno(stdin) |