numparam, drop `length()'
This commit is contained in:
parent
15dd80c0e7
commit
6a328ef609
|
|
@ -27,7 +27,6 @@ void cins(SPICE_DSTRINGPTR s, char c);
|
|||
void sins(SPICE_DSTRINGPTR s, const char *t);
|
||||
int spos_(char *sub, const char *s);
|
||||
bool ci_prefix(const char *p, const char *s);
|
||||
int length(const char *s);
|
||||
bool steq(const char *s, const char *t);
|
||||
bool stne(const char *s, const char *t);
|
||||
void stri(long n, SPICE_DSTRINGPTR s);
|
||||
|
|
|
|||
|
|
@ -82,13 +82,6 @@ ci_prefix(const char *p, const char *s)
|
|||
* string we cannot have a string overflow.
|
||||
*/
|
||||
|
||||
int
|
||||
length(const char *s)
|
||||
{
|
||||
return (int) strlen(s);
|
||||
}
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------
|
||||
* Function: add string t to dynamic string dstr_p.
|
||||
* ----------------------------------------------------------------- */
|
||||
|
|
@ -143,7 +136,7 @@ sins(SPICE_DSTRINGPTR dstr_p, const char *t)
|
|||
char *s_p;
|
||||
|
||||
ls = spice_dstring_length(dstr_p);
|
||||
lt = length(t);
|
||||
lt = (int) strlen(t);
|
||||
spice_dstring_setlength(dstr_p, ls+lt+1); /* make sure we have space for string + EOS */
|
||||
s_p = spice_dstring_value(dstr_p);
|
||||
for (i = ls + 1; i >= 0; i--)
|
||||
|
|
@ -249,7 +242,7 @@ pscopy(SPICE_DSTRINGPTR dstr_p, const char *t, int start, int leng)
|
|||
int stop; /* stop value */
|
||||
char *s_p; /* value of dynamic string */
|
||||
|
||||
stop = length(t);
|
||||
stop = (int) strlen(t);
|
||||
|
||||
if (start < stop) { /* nothing! */
|
||||
|
||||
|
|
@ -284,7 +277,7 @@ pscopy_up(SPICE_DSTRINGPTR dstr_p, const char *t, int start, int leng)
|
|||
int stop; /* stop value */
|
||||
char *s_p; /* value of dynamic string */
|
||||
|
||||
stop = length(t);
|
||||
stop = (int) strlen(t);
|
||||
|
||||
if (start < stop) { /* nothing! */
|
||||
|
||||
|
|
|
|||
|
|
@ -751,7 +751,7 @@ nupa_copy(struct card *deck)
|
|||
|
||||
spice_dstring_init(&u);
|
||||
spice_dstring_init(&keywd);
|
||||
ls = length(s);
|
||||
ls = (int) strlen(s);
|
||||
|
||||
while ((ls > 0) && (s[ls - 1] <= ' '))
|
||||
ls--;
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ defsubckt(dico_t *dico, struct card *card, nupa_type categ)
|
|||
bool err;
|
||||
int i, j, ls;
|
||||
|
||||
ls = length(s);
|
||||
ls = (int) strlen(s);
|
||||
i = 0;
|
||||
|
||||
while ((i < ls) && (s[i] != '.'))
|
||||
|
|
@ -563,7 +563,7 @@ findsubckt(dico_t *dico, char *s)
|
|||
|
||||
spice_dstring_init(&ustr);
|
||||
|
||||
k = length(s);
|
||||
k = (int) strlen(s);
|
||||
|
||||
while ((k >= 0) && (s[k] <= ' '))
|
||||
k--;
|
||||
|
|
@ -1208,7 +1208,7 @@ nupa_substitute(dico_t *dico, char *s, char *r, bool err)
|
|||
spice_dstring_init(&qstr);
|
||||
spice_dstring_init(&tstr);
|
||||
i = 0;
|
||||
ls = length(s);
|
||||
ls = (int) strlen(s);
|
||||
err = 0;
|
||||
ir = 0;
|
||||
|
||||
|
|
@ -1334,7 +1334,7 @@ getword(char *s, SPICE_DSTRINGPTR tstr_p, int after, int *pi)
|
|||
int ls;
|
||||
|
||||
i = after;
|
||||
ls = length(s);
|
||||
ls = (int) strlen(s);
|
||||
|
||||
do
|
||||
i++;
|
||||
|
|
@ -1363,7 +1363,7 @@ getexpress(char *s, SPICE_DSTRINGPTR tstr_p, int *pi)
|
|||
char c, d;
|
||||
nupa_type tpe;
|
||||
|
||||
ls = length(s);
|
||||
ls = (int) strlen(s);
|
||||
ia = i + 1;
|
||||
|
||||
while ((ia < ls) && (s[ia - 1] <= ' '))
|
||||
|
|
@ -1458,7 +1458,7 @@ nupa_assignment(dico_t *dico, char *s, char mode)
|
|||
|
||||
spice_dstring_init(&tstr);
|
||||
spice_dstring_init(&ustr);
|
||||
ls = length(s);
|
||||
ls = (int) strlen(s);
|
||||
error = 0;
|
||||
i = 0;
|
||||
|
||||
|
|
@ -1552,7 +1552,7 @@ nupa_subcktcall(dico_t *dico, char *s, char *x, char *inst_name)
|
|||
|
||||
/***** first, analyze the subckt definition line */
|
||||
n = 0; /* number of parameters if any */
|
||||
ls = length(s);
|
||||
ls = (int) strlen(s);
|
||||
|
||||
scopy_up(&tstr, s);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue