diff options
author | Henry Stiles <henry.stiles@artifex.com> | 1998-08-08 06:14:25 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 1998-08-08 06:14:25 +0000 |
commit | a54bb96de84363bd3ffc7696805c268babc95954 (patch) | |
tree | ab95f514d2831fa22cecdf942d2530b656a66d9e /gs/src/zmath.c | |
parent | 3305477b99710b8ce6223a0bdd5014ced4de6997 (diff) |
This commit was generated by cvs2svn to compensate for changes in r279,
which included commits to RCS files with non-trunk default branches.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@280 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'gs/src/zmath.c')
-rw-r--r-- | gs/src/zmath.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/gs/src/zmath.c b/gs/src/zmath.c index 0df19eec5..14edb6cde 100644 --- a/gs/src/zmath.c +++ b/gs/src/zmath.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1989, 1992, 1993, 1997 Aladdin Enterprises. All rights reserved. +/* Copyright (C) 1989, 1992, 1993, 1997, 1998 Aladdin Enterprises. All rights reserved. This file is part of Aladdin Ghostscript. @@ -16,12 +16,11 @@ all copies. */ -/* zmath.c */ +/*Id: zmath.c */ /* Mathematical operators */ #include "math_.h" #include "ghost.h" #include "gxfarith.h" -#include "errors.h" #include "oper.h" #include "store.h" @@ -43,11 +42,6 @@ zrand_state_init(long *pstate) { *pstate = 1; } -private void -zmath_init(void) -{ - zrand_state_init(&zrand_state); -} /****** NOTE: none of these operators currently ******/ /****** check for floating over- or underflow. ******/ @@ -199,13 +193,13 @@ zlog(register os_ptr op) /* - rand <int> */ private int zrand(register os_ptr op) -{ /* - * We use an algorithm from CACM 31 no. 10, pp. 1192-1201, - * October 1988. According to a posting by Ed Taft on - * comp.lang.postscript, Level 2 (Adobe) PostScript interpreters - * use this algorithm too: - * x[n+1] = (16807 * x[n]) mod (2^31 - 1) - */ +{ /* + * We use an algorithm from CACM 31 no. 10, pp. 1192-1201, + * October 1988. According to a posting by Ed Taft on + * comp.lang.postscript, Level 2 (Adobe) PostScript interpreters + * use this algorithm too: + * x[n+1] = (16807 * x[n]) mod (2^31 - 1) + */ #define A 16807 #define M 0x7fffffff #define Q 127773 /* M / A */ @@ -273,5 +267,5 @@ const op_def zmath_op_defs[] = {"1sin", zsin}, {"1sqrt", zsqrt}, {"1srand", zsrand}, - op_def_end(zmath_init) + op_def_end(0) }; |