remove some unused functions from the numparam world

This commit is contained in:
rlar 2010-11-06 20:25:21 +00:00
parent 75b6eeb94a
commit aaaf547951
3 changed files with 5 additions and 79 deletions

View File

@ -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 ,

View File

@ -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);

View File

@ -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