From aaaf547951341c3a4dc76d8d9a0d17c772f84159 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 6 Nov 2010 20:25:21 +0000 Subject: [PATCH] remove some unused functions from the numparam world --- ChangeLog | 5 +++ src/frontend/numparam/general.h | 2 - src/frontend/numparam/mystring.c | 77 -------------------------------- 3 files changed, 5 insertions(+), 79 deletions(-) diff --git a/ChangeLog b/ChangeLog index 816c67717..1642fec2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-11-06 Robert Larice + * src/frontend/numparam/general.h , + * src/frontend/numparam/mystring.c : + remove some unused functions from the numparam world + 2010-11-06 Robert Larice * src/frontend/postcoms.c , * src/frontend/plotting/agraf.c , diff --git a/src/frontend/numparam/general.h b/src/frontend/numparam/general.h index cf23099cb..d7d7def69 100644 --- a/src/frontend/numparam/general.h +++ b/src/frontend/numparam/general.h @@ -80,8 +80,6 @@ double absf(double x); /* abs */ long absi( long i); double frac(double x); -unsigned char reset(FILE * f); -unsigned char rewrite(FILE * f); void rawcopy(void * a, void * b, int la, int lb); void * new(long sz); void dispose(void * p); diff --git a/src/frontend/numparam/mystring.c b/src/frontend/numparam/mystring.c index ca002c299..d2f356e3b 100644 --- a/src/frontend/numparam/mystring.c +++ b/src/frontend/numparam/mystring.c @@ -780,51 +780,6 @@ odd (long x) return (x & 1); } -int -vali (char *s, long *i) -/* convert s to integer i. returns error code 0 if Ok */ -/* BUG: almost identical to ival() with arg/return value swapped ... */ -{ - int k = 0, digit = 0, ls; - long z = 0; - bool minus = 0, ok = 1; - char c; - ls = length (s); - - do - { - c = s[k]; - k++; - } - while (!((k >= ls) || !((c > 0) && (c <= ' ')))); /* skip space */ - - if (c == '-') - { - minus = 1; - c = s[k]; - k++; - } - - while (num (c)) - { - z = 10 * z + c - '0'; - c = s[k]; - k++; - digit++; - } - - if (minus) - z = -z; - - *i = z; - ok = (digit > 0) && (c == 0); /* successful end of string */ - - if (ok) - return 0; - else - return k; /* one beyond error position */ -} - static bool match (char *s, char *t, int n, int tstart, bool testcase) { @@ -917,19 +872,6 @@ spos_(char *sub, char *s) } -/**** float formatting with printf/scanf ******/ - -int -valr (char *s, double *r) -/* returns 0 if ok, else length of partial string ? */ -{ - int n = sscanf (s, "%lG", r); - if (n == 1) - return (0); - else - return (1); -} - void strf (double x, int f1, int f2, SPICE_DSTRINGPTR dstr_p) /* e-format if f2<0, else f2 digits after the point, total width=f1 */ @@ -1073,16 +1015,6 @@ frac (double x) return x - np_trunc (x); } -double -intp (double x) -{ - double u = 2e9; - if ((x > u) || (x < -u)) - return x; - else - return np_trunc (x); -} - #else /* use floor() and ceil() */ long @@ -1109,13 +1041,4 @@ frac (double x) return (x - ceil (x)); } -double -intp (double x) /* integral part */ -{ - if (x >= 0.0) - return floor (x); - else - return ceil (x); -} - #endif