69 errbuf =
MALLOC(strlen(t) + 40);
70 (void) sprintf(errbuf,
" Table %d already defined - ignored\n",t);
79 while (**line != (
char)0) {
100 errbuf =
MALLOC(strlen(t) + 40);
101 (void) sprintf(errbuf,
102 " Syntax error: expected value, got %s\n",t);
107 if (**line == (
char)0) {
123 if (strcmp(t,
"table") == 0) {
133 errbuf =
MALLOC(strlen(t) + 40);
134 (void) sprintf(errbuf,
" Syntax error: unknown keyword %s\n",t);
159 char *
t, *errbuf =
NULL;
176 for (tb = table; tb; tb = tb->
tab_next)
183 while (*line != (
char)0) {
186 if (*line == (
char)0)
189 if (error == 0)
continue;
192 if (strcmp(t,
"table") == 0) {
200 errbuf =
MALLOC(strlen(temp) + strlen(t) + 40);
201 (void) sprintf(errbuf,
202 "%s Unresolved table reference: %s\n",temp,t);
205 errbuf =
MALLOC(strlen(t) + 40);
206 (void) sprintf(errbuf,
207 " Unresolved table reference: %s\n",t);
228 for (tt = table; tt; tt = tt->
tab_next)
281 if (table ==
NULL)
return;
283 for (e = table->tab_entry; e; e = ee) {
326 for (t = table; t; t = t->
tab_next) {
331 printf(
" type=%d val=%g real=%g\n",e->
ent_type,
335 printf(
" type=%d val=%g real=%g (table %s)\n",
341 printf(
" type=%d val=%g omitted\n",e->
ent_type,
345 printf(
" type=%d error\n",e->
ent_type);
365 if (!table)
return (0);
366 if (!ckt)
return (1);
387 if (!ckt)
return (1);
394 if (!strcmp(str,t->
tab_name))
break;
413 if (tab ==
NULL)
return (0);
415 e = ((
struct sCKTtable *)tab)->tab_entry;
417 if (x <= e->ent_val) {
423 if (ee ==
NULL)
break;
424 if (x >= e->
ent_val && x < ee->ent_val) {
448 if (tab ==
NULL)
return (0);
450 e = ((
struct sCKTtable *)tab)->tab_entry;
452 if (x <= e->ent_val) {
458 if (ee ==
NULL)
break;
459 if (x >= e->
ent_val && x < ee->ent_val) {
struct sCKTentry * tab_entry
static struct tab table[512]
double INPtablEvalDeriv(GENERIC *tab, double x)
char * INPtablParse(char **line, GENERIC *ckt)
double INPtablEval(GENERIC *tab, double x)
void INPtablFix(GENERIC *ckt)
void INPtablFree(GENERIC *ckt)
char * INPtablCheck(char *line, GENERIC *ckt)
int INPtablFind(char *str, GENERIC *ckt, GENERIC **table)
struct sCKTentry * ent_next
struct sCKTtable * tab_next
struct sCKTtable ** DEVtableHead()