From 028e9a75b04e468c1cc14f093868c07c0cc470f4 Mon Sep 17 00:00:00 2001 From: Etienne Brateau <etienne.brateau@ensiie.fr> Date: Sat, 15 Dec 2018 22:31:01 +0100 Subject: [PATCH] Rename na_strlist_t into strlist_t --- log/include/label.h | 2 +- log/include/log_action.h | 10 ++-- log/include/logdef.h | 8 ++-- log/include/logglobals.h | 12 ++--- log/include/loghier.h | 2 +- log/include/logsimed.h | 4 +- log/src/label.c | 4 +- log/src/log.c | 98 +++++++++++++++++++------------------- log/src/logcom.c | 8 ++-- log/src/loged.c | 24 +++++----- log/src/loghier.c | 6 +-- log/src/logntk.c | 48 +++++++++---------- log/src/logsim.c | 10 ++-- log/src/logsimed.c | 8 ++-- log/src/logsimh.c | 18 +++---- log/src/logspc.c | 52 ++++++++++---------- psys/include/p2c/numex.h | 70 +++++++++++++-------------- psys/include/p2c/strlist.h | 32 ++++++------- psys/src/numex.c | 78 +++++++++++++++--------------- psys/src/strlist.c | 52 ++++++++++---------- 20 files changed, 273 insertions(+), 273 deletions(-) diff --git a/log/include/label.h b/log/include/label.h index 749a55f..4c16a77 100644 --- a/log/include/label.h +++ b/log/include/label.h @@ -3,6 +3,6 @@ #include "logdef.h" -void parselabel(na_strlist_t **lbl, short *numattrs, log_kattrrec **attr); +void parselabel(strlist_t **lbl, short *numattrs, log_kattrrec **attr); #endif diff --git a/log/include/log_action.h b/log/include/log_action.h index a7a37ab..25259d1 100644 --- a/log/include/log_action.h +++ b/log/include/log_action.h @@ -146,8 +146,8 @@ typedef struct log_hooks_t void (*addlabel) (log_lrec **l, char *s); void (*getcolor) (char *name, short *val, int def); void (*setcmap) (int n, int r, int g, int b); - void (*parselabel) (na_strlist_t **lbl, short *numattrs, log_kattrrec **attr); - void (*editattrs) (log_gattrrec *gattr, int numattrs, log_kattrrec *kattr, na_strlist_t *lbl, + void (*parselabel) (strlist_t **lbl, short *numattrs, log_kattrrec **attr); + void (*editattrs) (log_gattrrec *gattr, int numattrs, log_kattrrec *kattr, strlist_t *lbl, char *name, void (*proc) (), void (*chproc) (), void (*relproc) ()); void (*newattrs) (log_gattrrec **gattr, int numattrs, log_kattrrec *kattr); void (*disposeattrs) (log_gattrrec **gattr, int numattrs, log_kattrrec *kattr); @@ -184,8 +184,8 @@ typedef struct log_hook2_t void (*addlabelat) (int x, int y, char *s); void (*addboxat) (int x1, int y1, int x2, int y2); void (*plainxform) (log_grec *g, short *x, short *y); - void (*findattrnum2) (int numattrs, log_kattrrec *kattr, na_strlist_t *lbl, char *name, char *kinds, short *num); - void (*findattrname2) (int numattrs, log_kattrrec *kattr, na_strlist_t *lbl, int num, char *name); + void (*findattrnum2) (int numattrs, log_kattrrec *kattr, strlist_t *lbl, char *name, char *kinds, short *num); + void (*findattrname2) (int numattrs, log_kattrrec *kattr, strlist_t *lbl, int num, char *name); void (*showpinname) (log_grec *g, int i, int c, char *name); } log_hook2_t; @@ -348,7 +348,7 @@ typedef struct log_action_t long markerstamp; /** Page markers moved */ log_krec *probekind; - na_strlist_t *actstrlist; + strlist_t *actstrlist; log_hook2_t *hook2; log_hwrec *probehwire; log_vwrec *probevwire; diff --git a/log/include/logdef.h b/log/include/logdef.h index 34d1c04..a6fd4f7 100644 --- a/log/include/logdef.h +++ b/log/include/logdef.h @@ -139,7 +139,7 @@ typedef struct log_kattrrec { char *sp; unsigned b : 1 ; struct { - na_strlist_t *v; + strlist_t *v; short nv, dv; } U86; } UU; @@ -188,7 +188,7 @@ typedef struct log_krec { log_kflags flag; schar x1, y1, x2, y2; long code; - na_strlist_t *lbl; + strlist_t *lbl; log_vectorrec *vector; log_pinrec *pin; log_pnumrec *pnum; @@ -196,7 +196,7 @@ typedef struct log_krec { schar bbx1, bby1, bbx2, bby2; /*7/14/88*/ short bbmax; /*7/14/88*/ long bigprocsize, biglblsize, bigvectsize; - na_strlist_t **pinnames; + strlist_t **pinnames; } log_krec; typedef struct log_pinposrec { @@ -280,7 +280,7 @@ typedef struct log_tool { unsigned ready : 1, simulator : 1, keep : 1, nostatus : 1, tstepflag : 1; uchar simtype; double nexttstep; - na_strlist_t *nlbl, *hlbl; + strlist_t *nlbl, *hlbl; short nnumattrs, hnumattrs; log_kattrrec *nattr, *hattr; na_long info; diff --git a/log/include/logglobals.h b/log/include/logglobals.h index 7eb5a03..4e54fae 100644 --- a/log/include/logglobals.h +++ b/log/include/logglobals.h @@ -73,7 +73,7 @@ extern log_krec *kind[maxmaxkinds]; /* Kind of gate in each catalog space */ extern kindgrouptype kindgroup; /* Kind of gate in each menu-area space */ extern kindgrouptype kindsig; extern kindattrtype kindattr; -extern na_strlist_t *gatefilenames; +extern strlist_t *gatefilenames; extern short maxkinds, catwidth; extern catboxrec *catboxes; @@ -102,7 +102,7 @@ extern long htcount; /* Number of timesteps in list */ extern short hncount; /* Number of names in list */ extern short hnocount; /* Old number of names in list */ extern short histtrig; /* Number of signal which triggers history */ -extern na_strlist_t *histlbl; +extern strlist_t *histlbl; extern short histnumattrs; extern log_kattrrec *histkattr; extern log_gattrrec *histgattr; @@ -119,11 +119,11 @@ extern log_nrec *nodeconflictbase; /* Node conflict list */ extern log_grec *gateconflictbase; /* Gate conflict list */ extern cnfrec *cnfbase; /* List of tool configuration lines */ -extern na_strlist_t *colorbase; /* List of configured colors */ +extern strlist_t *colorbase; /* List of configured colors */ extern macrorec *macrobase; /* List of macro keys */ -extern na_strlist_t *thingstodo, *nexttodo; /* List of delayed commands */ -extern na_strlist_t *messages; /* List of delayed messages */ -extern na_strlist_t *commandlist; /* List of tool-activation commands */ +extern strlist_t *thingstodo, *nexttodo; /* List of delayed commands */ +extern strlist_t *messages; /* List of delayed messages */ +extern strlist_t *commandlist; /* List of tool-activation commands */ extern char modename[9]; /* Word in 'mode' area of menu */ extern int modeflag; /* Mode area contains a word */ diff --git a/log/include/loghier.h b/log/include/loghier.h index 936ff0e..6b2adc2 100644 --- a/log/include/loghier.h +++ b/log/include/loghier.h @@ -19,7 +19,7 @@ extern int isinstgate (log_grec *g); extern int isgenericinstgate (log_grec *g); extern char *gateinstof (char *Result, log_grec *g); extern char *gateinstname (char *Result, log_grec *g); -extern na_strlist_t *defndirectory (int pg); +extern strlist_t *defndirectory (int pg); extern void examinetemplate (log_grec *g, log_nrec **pp, long ppsize, int isgeneric, short **pnum, long *lastnorth, long *lasteast, long *lastsouth, diff --git a/log/include/logsimed.h b/log/include/logsimed.h index 8a58f53..1070a70 100644 --- a/log/include/logsimed.h +++ b/log/include/logsimed.h @@ -11,9 +11,9 @@ extern void edit_16 (uchar **proc, long *proclen, char *name); -extern void dump_16 (uchar **proc, na_strlist_t **sl, int indenting); +extern void dump_16 (uchar **proc, strlist_t **sl, int indenting); -extern void read_16 (uchar **proc, long *proclen, na_strlist_t *sl); +extern void read_16 (uchar **proc, long *proclen, strlist_t *sl); extern char *dasm_16 (uchar *proc, long *pc); extern long indent_16 (uchar *proc, long pc); extern long length_16 (uchar *proc, long pc); diff --git a/log/src/label.c b/log/src/label.c index f03d996..19cee85 100644 --- a/log/src/label.c +++ b/log/src/label.c @@ -16,10 +16,10 @@ * @param numattrs: number of found attributs * @param attr: vector containing parsed attributs */ -void parselabel(na_strlist_t **lbl, short *numattrs, log_kattrrec **attr) +void parselabel(strlist_t **lbl, short *numattrs, log_kattrrec **attr) { size_t maxx, j1, j, j2, j3, yy; - na_strlist_t *l1, *l2, *l3, *attrnames; + strlist_t *l1, *l2, *l3, *attrnames; char buf[256]; int haveprec; log_kattrrec *WITH; diff --git a/log/src/log.c b/log/src/log.c index 1faa91c..d0e7dda 100644 --- a/log/src/log.c +++ b/log/src/log.c @@ -206,7 +206,7 @@ log_krec *kind[maxmaxkinds]; /* Kind of gate in each catalog space */ kindgrouptype kindgroup; /* Kind of gate in each menu-area space */ kindgrouptype kindsig; kindattrtype kindattr; -na_strlist_t *gatefilenames; +strlist_t *gatefilenames; short maxkinds, catwidth; catboxrec *catboxes; librstrrec *librstrs; @@ -236,7 +236,7 @@ long htcount; /* Number of timesteps in list */ short hncount; /* Number of names in list */ short hnocount; /* Old number of names in list */ short histtrig; /* Number of signal which triggers history */ -na_strlist_t *histlbl; +strlist_t *histlbl; short histnumattrs; log_kattrrec *histkattr; log_gattrrec *histgattr; @@ -253,11 +253,11 @@ log_nrec *nodeconflictbase; /* Node conflict list */ log_grec *gateconflictbase; /* Gate conflict list */ cnfrec *cnfbase; /* List of tool configuration lines */ -na_strlist_t *colorbase; /* List of configured colors */ +strlist_t *colorbase; /* List of configured colors */ macrorec *macrobase; /* List of macro keys */ -na_strlist_t *thingstodo, *nexttodo; /* List of delayed commands */ -na_strlist_t *messages; /* List of delayed messages */ -na_strlist_t *commandlist; /* List of tool-activation commands */ +strlist_t *thingstodo, *nexttodo; /* List of delayed commands */ +strlist_t *messages; /* List of delayed messages */ +strlist_t *commandlist; /* List of tool-activation commands */ char modename[9]; /* Word in 'mode' area of menu */ int modeflag; /* Mode area contains a word */ @@ -1271,7 +1271,7 @@ static int inbox(short x, short y, short x1, short y1) void message(char *msg) { - na_strlist_t *l1; + strlist_t *l1; if (!gg.initdone) { @@ -1299,7 +1299,7 @@ void message(char *msg) static void vmessage(char *msg) { - na_strlist_t *l1; + strlist_t *l1; if (gg.initdone) { @@ -3002,7 +3002,7 @@ static void doimmedfunction() { log_tool *tp; char cmd[256]; - na_strlist_t *l1; + strlist_t *l1; if (*gg.func != '\0') { @@ -3206,7 +3206,7 @@ void trykbd() int moving; char ch; macrorec *mp; - na_strlist_t *todo; + strlist_t *todo; char TEMP; if (gg.t.near_ && !gg.t0.near_ && gg.showpage >= 0) @@ -6451,7 +6451,7 @@ static short readlibrary_at(char *n_, short where, int loadit) char n[9]; short i, i0, i00, j, j0, j00, j000, count; long j1; - na_strlist_t *l2; + strlist_t *l2; log_grec *g; char buf[256]; char ch, ch2, curcol; @@ -6777,8 +6777,8 @@ static short readlibrary_at(char *n_, short where, int loadit) if (WITH->numpins != 0) { WITH->pin = (log_pinrec *)Malloc(WITH->numpins * sizeof(log_pinrec)); - WITH->pinnames = (na_strlist_t **) - Malloc(WITH->numpins * sizeof(na_strlist_t *)); + WITH->pinnames = (strlist_t **) + Malloc(WITH->numpins * sizeof(strlist_t *)); FORLIM1 = WITH->numpins; for (j = 0; j < FORLIM1; j++) { @@ -6956,9 +6956,9 @@ static void getgate(char *name, short *gtype) } -static void getgategroup(na_strlist_t *grp) +static void getgategroup(strlist_t *grp) { - na_strlist_t *l1; + strlist_t *l1; short pos, i, count; int done; catboxrec *cb; @@ -7089,9 +7089,9 @@ static void showpinname(log_grec *g, short i, short c, char *name) -static void showgateinfo(na_strlist_t *info, log_grec *g) +static void showgateinfo(strlist_t *info, log_grec *g) { - na_strlist_t *l1; + strlist_t *l1; long width, height, i; short gx, gy, gx1, gy1, gx2, gy2, mx, my, y, z; log_krec *WITH; @@ -7209,7 +7209,7 @@ static void showgateinfo(na_strlist_t *info, log_grec *g) static void showgatedef(log_krec *k, log_grec *g) { - na_strlist_t *l1; + strlist_t *l1; char STR1[42]; gg.actstrlist = NULL; @@ -7603,7 +7603,7 @@ static void gatecatalog(int librmode) uchar ch; log_krec *k; char bot1[256], bot2[256], bot3[256]; - na_strlist_t *lp; + strlist_t *lp; int flag, oo, done, botflag, refrflag; long bottime; librstrrec *lsp; @@ -7982,7 +7982,7 @@ struct LOC_editattrs { log_gattrrec *gattr; short numattrs; log_kattrrec *kattr; - na_strlist_t *lbl; + strlist_t *lbl; char name[256]; void (*chproc) (); log_tool *tool; @@ -7994,7 +7994,7 @@ struct LOC_editattrs { static void drawlabelline(long i, struct LOC_editattrs *LINK) { long j; - na_strlist_t *l1; + strlist_t *l1; long FORLIM; l1 = LINK->lbl; @@ -8031,7 +8031,7 @@ static void drawlabel(struct LOC_editattrs *LINK) static void drawvalue(short i, int highlight, struct LOC_editattrs *LINK) { - na_strlist_t *l1; + strlist_t *l1; log_kattrrec *WITH; char STR1[81]; char STR4[256]; @@ -8229,12 +8229,12 @@ static int tryconfig(struct LOC_editattrs *LINK) } -static void editattrs(log_gattrrec *gattr_, short numattrs_, log_kattrrec *kattr_, na_strlist_t *lbl_, char *name_, +static void editattrs(log_gattrrec *gattr_, short numattrs_, log_kattrrec *kattr_, strlist_t *lbl_, char *name_, void (*proc) (), void (*chproc_) (), void (*relproc) (), long *attrstamp) { struct LOC_editattrs V; short i, i1, p0, olday, ytotal; - na_strlist_t *l1; + strlist_t *l1; long j, j1, savei; double r1, saver; char ch; @@ -8868,7 +8868,7 @@ end; */ } -static void editattrsx(log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, char *name, void (*proc) (), void (*chproc) (), void (*relproc) ()) +static void editattrsx(log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, strlist_t *lbl, char *name, void (*proc) (), void (*chproc) (), void (*relproc) ()) { long stamp; @@ -8992,7 +8992,7 @@ static int setattr(log_gattrrec *gattr_, log_kattrrec *kattr_, short p_, char *b int saveb, saveb2; char savebuf[256]; long j, j1; - na_strlist_t *l1; + strlist_t *l1; log_gattrrec *WITH; char STR1[256]; char *STR2; @@ -9592,9 +9592,9 @@ static void solderat(short x, short y) } -static void findattrnum2(short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, char *name, char *kinds, short *num) +static void findattrnum2(short numattrs, log_kattrrec *kattr, strlist_t *lbl, char *name, char *kinds, short *num) { - na_strlist_t *l1; + strlist_t *l1; if (strsubset(name, "0123456789")) { @@ -9610,7 +9610,7 @@ static void findattrnum2(short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, l1 = l1->next; if (l1 != NULL) - l1 = strlist_find((na_strlist_t *)l1->value, name); + l1 = strlist_find((strlist_t *)l1->value, name); if (l1 != NULL) *num = (long)l1->value; @@ -9630,9 +9630,9 @@ static void findattrnum(log_krec *k, char *name, char *kinds, short *num) } -static void findattrname2(short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, short num, char *name) +static void findattrname2(short numattrs, log_kattrrec *kattr, strlist_t *lbl, short num, char *name) { - na_strlist_t *l1; + strlist_t *l1; if (num < 1 || num > numattrs) { @@ -9646,7 +9646,7 @@ static void findattrname2(short numattrs, log_kattrrec *kattr, na_strlist_t *lbl if (l1 != NULL) { - l1 = (na_strlist_t *)l1->value; + l1 = (strlist_t *)l1->value; while (l1 != NULL && (long)l1->value != num) l1 = l1->next; } @@ -11804,9 +11804,9 @@ static int eqattr(log_kattrrec *ka, log_gattrrec *ga, struct LOC_savepage *LINK) return Result; } -static na_strlist_t *attrname(short i, na_strlist_t *lbl, struct LOC_savepage *LINK) +static strlist_t *attrname(short i, strlist_t *lbl, struct LOC_savepage *LINK) { - na_strlist_t *l1; + strlist_t *l1; l1 = lbl; while (l1 != NULL && l1->kind != '\001') @@ -11814,7 +11814,7 @@ static na_strlist_t *attrname(short i, na_strlist_t *lbl, struct LOC_savepage *L if (l1 == NULL) return l1; - l1 = (na_strlist_t *)l1->value; + l1 = (strlist_t *)l1->value; while (l1 != NULL && (long)l1->value != i) l1 = l1->next; @@ -11822,7 +11822,7 @@ static na_strlist_t *attrname(short i, na_strlist_t *lbl, struct LOC_savepage *L return l1; } -static short countattrs(log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, struct LOC_savepage *LINK) +static short countattrs(log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, strlist_t *lbl, struct LOC_savepage *LINK) { short i, j; @@ -11842,10 +11842,10 @@ static short countattrs(log_gattrrec *gattr, short numattrs, log_kattrrec *kattr return j; } -static void writeattrs(FILE **f, log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, struct LOC_savepage *LINK) +static void writeattrs(FILE **f, log_gattrrec *gattr, short numattrs, log_kattrrec *kattr, strlist_t *lbl, struct LOC_savepage *LINK) { short num, i; /*reads maxunat from last call to countattrs*/ - na_strlist_t *l1; + strlist_t *l1; char STR2[81]; num = countattrs(gattr, numattrs, kattr, lbl, LINK); @@ -12560,19 +12560,19 @@ static void loadlog30(FILE **f, short ver) } -static void readattrs(FILE **f, log_gattrrec **gattr, short numattrs, log_kattrrec *kattr, na_strlist_t *lbl, short count) +static void readattrs(FILE **f, log_gattrrec **gattr, short numattrs, log_kattrrec *kattr, strlist_t *lbl, short count) { short j, jj; char ch; char buf[256]; - na_strlist_t *l1, *names; + strlist_t *l1, *names; l1 = lbl; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) - names = (na_strlist_t *)l1->value; + names = (strlist_t *)l1->value; else names = NULL; @@ -12758,7 +12758,7 @@ static log_nrec *countnode_(short i, struct LOC_loadpage *LINK) /* Local variables for initialize: */ struct LOC_initialize { short j; - na_strlist_t *loadgates, *logmenu; + strlist_t *loadgates, *logmenu; char cmdbuf[81]; cnfrec *cnflast; }; @@ -14722,7 +14722,7 @@ static void setcmap(short n, short r, short g, short b) static void getcolor(char *name_, short *val, short def) { char name[256]; - na_strlist_t *cp; + strlist_t *cp; char STR2[256]; char STR3[256]; @@ -14990,7 +14990,7 @@ static void docnffunction() char arg[256]; long i, j, k; char ch; - na_strlist_t *cp; + strlist_t *cp; long clrarr[3]; int flag; librstrrec *lsp, **lspp; @@ -15766,7 +15766,7 @@ static void endfatal(struct LOC_initialize *LINK) static void addgatesfile(char *fn_, struct LOC_initialize *LINK) { char fn[256]; - na_strlist_t *l1; + strlist_t *l1; strcpy(fn, fn_); newci_fixfname(fn, "gate", ""); @@ -15811,7 +15811,7 @@ static void readcnf(char *fn_, struct LOC_initialize *LINK) FILE *tx; char txbuf[256], txarg[256], txarg2[256]; int erasegates, eraseload, erasemenu; - na_strlist_t *l1, *l2; + strlist_t *l1, *l2; log_tool *tp; cnfrec *cnfp; char *TEMP; @@ -16026,7 +16026,7 @@ static void readcnf(char *fn_, struct LOC_initialize *LINK) l1->value = (na_long)NULL; while (*txarg != '\0') { - l2 = strlist_append((na_strlist_t **)(&l1->value), txarg); + l2 = strlist_append((strlist_t **)(&l1->value), txarg); getword(txbuf, txarg); } continue; @@ -16137,7 +16137,7 @@ static void initialize() short i, k, curgate; short gptr[maxgatesfiles], ggroup[maxgatesfiles], gsize[maxgatesfiles]; char gname[maxgatesfiles][9]; - na_strlist_t *l1, *l2; + strlist_t *l1, *l2; char s[256]; int flag; char cnfname[256]; @@ -16681,7 +16681,7 @@ static void initialize() while (l1 != NULL && i != 0) { if (*l1->s == '\0') - getgategroup((na_strlist_t *)l1->value); + getgategroup((strlist_t *)l1->value); else i = readlibrary(l1->s); l1 = l1->next; diff --git a/log/src/logcom.c b/log/src/logcom.c index f52874a..8864531 100644 --- a/log/src/logcom.c +++ b/log/src/logcom.c @@ -123,11 +123,11 @@ log_action_t *act; static void edit_1(proc, proclen, sl, mode) uchar *proc; long *proclen; -na_strlist_t **sl; +strlist_t **sl; long mode; { long i; - na_strlist_t *l1; + strlist_t *l1; char buf[9]; char ch; char STR1[22]; @@ -581,11 +581,11 @@ uchar *proc; static void edit_7(proc, proclen, sl, mode) uchar *proc; long *proclen; -na_strlist_t **sl; +strlist_t **sl; long mode; { long i; - na_strlist_t *l1; + strlist_t *l1; char buf[101]; char ch; char STR1[118]; diff --git a/log/src/loged.c b/log/src/loged.c index 8398a11..6ef74d8 100644 --- a/log/src/loged.c +++ b/log/src/loged.c @@ -207,7 +207,7 @@ typedef struct krec { uchar pinsim[maxpins]; uchar pincon[maxpins]; short pinnum[maxpnums]; - na_strlist_t *pinnames; + strlist_t *pinnames; vectorrec *vector; short numvects, allocvects; long address; /*only load/save*/ @@ -1242,7 +1242,7 @@ char *s_; krec *k; short ng, ii; int i, j; - na_strlist_t *l1; + strlist_t *l1; int success; short FORLIM; vectorrec *WITH; @@ -1837,7 +1837,7 @@ krec *kind; struct LOC_rshapes *LINK; { long i, j, num; - na_strlist_t *l1; + strlist_t *l1; char buf[256]; num = 0; @@ -2671,7 +2671,7 @@ static char *getpinname(Result, num) char *Result; long num; { - na_strlist_t *l1; + strlist_t *l1; char name[256]; sprintf(name, "%ld", num); @@ -3240,7 +3240,7 @@ static void deletepin(num) long num; { long i, j; - na_strlist_t *l1; + strlist_t *l1; if (num <= kind.numpins && kind.pinsim[num - 1] != nopin) { if (kind.pincon[num - 1] != 0) { @@ -5213,7 +5213,7 @@ static void deletecmd() static void getdefn(kind, def, mode) krec *kind; -na_strlist_t **def; +strlist_t **def; long mode; { char name[256]; @@ -5294,7 +5294,7 @@ static void dumpcmd() struct LOC_dumpcmd V; long i, n, curcol; long st[log_maxpins / 32 + 2]; - na_strlist_t *def, *fonts, *l1; + strlist_t *def, *fonts, *l1; int markerfont; double x, y, dx, dy, norm; char name[256], STR1[256], STR2[256]; @@ -5694,7 +5694,7 @@ static void addpinname(num, name) long num; char *name; { - na_strlist_t *l1, **prev; + strlist_t *l1, **prev; prev = &kind.pinnames; while (*prev != NULL && (long)(*prev)->value <= num) @@ -5706,7 +5706,7 @@ char *name; /* static variables for readfile: */ struct LOC_readfile { - na_strlist_t *def, *labels; + strlist_t *def, *labels; long curcol; int defining, hasdef, haslabels; } ; @@ -5728,7 +5728,7 @@ static void endkind(LINK) struct LOC_readfile *LINK; { long i; - na_strlist_t *l1; + strlist_t *l1; if (LINK->hasdef) { reallocproc(&kind, 100L); @@ -5773,7 +5773,7 @@ char *filename_, *gname_; FILE *f; char ggroup[256], *buf, wrd[256]; int verify; - na_strlist_t *l1; + strlist_t *l1; long i, num, x, y, sim, lnum, savenumv; int okay, wasempty; char STR1[256]; @@ -6131,7 +6131,7 @@ krec *k; struct LOC_writefile *LINK; { short i, n, curcol; - na_strlist_t *def, *l1; + strlist_t *def, *l1; char buf[256]; long st[log_maxpins / 32 + 2]; char STR2[256]; diff --git a/log/src/loghier.c b/log/src/loghier.c index 3038417..8ba5f5f 100644 --- a/log/src/loghier.c +++ b/log/src/loghier.c @@ -241,11 +241,11 @@ log_grec *g; /* Find a list of all definitions on the page, sorted according to dependencies */ -na_strlist_t *defndirectory(pg) +strlist_t *defndirectory(pg) short pg; { char buf[256], buf2[256]; - na_strlist_t *dir, *l1, *l2, **lprev; + strlist_t *dir, *l1, *l2, **lprev; log_lrec *lp; log_brec *bp; log_grec *g; @@ -457,7 +457,7 @@ log_action_t *act; char newname[256]; int drawflag; short drawx, drawy; - na_strlist_t *sl1; + strlist_t *sl1; log_action_t *WITH; log_gattrrec *WITH1; char STR2[256]; diff --git a/log/src/logntk.c b/log/src/logntk.c index 8b7b909..e06b2f3 100644 --- a/log/src/logntk.c +++ b/log/src/logntk.c @@ -60,7 +60,7 @@ typedef struct transrec { typedef struct cellrec { char name[82], cname[82]; char fname[256]; - na_strlist_t *port; + strlist_t *port; long ccount; unsigned loaded : 1, complain1 : 1; struct cellrec *next; @@ -76,10 +76,10 @@ typedef struct primrec { static transrec *transbase, *savetransbase; static cellrec *cellbase, *savecellbase; static primrec *primbase, *saveprimbase; -static na_strlist_t *filebase, *filecellbase; +static strlist_t *filebase, *filecellbase; static int autotop, maincell; static long default_size, default_strength; -static na_strlist_t *saveglobals, *saveorphans, *saveignored, *saveprims, +static strlist_t *saveglobals, *saveorphans, *saveignored, *saveprims, *savetrans, *savelibdirs, *ports, *globals, *orphans, *ignored, *prims, *trans, *libdirs, *notfoundlist, *wignlist; @@ -95,8 +95,8 @@ static char nodeprefix[11]; -static na_strlist_t *strlist_find_r(l1, wrd_) -na_strlist_t *l1; +static strlist_t *strlist_find_r(l1, wrd_) +strlist_t *l1; char *wrd_; { char wrd[256]; @@ -117,7 +117,7 @@ static int tryreset(f, fn) FILE **f; char *fn; { - na_strlist_t *l1; + strlist_t *l1; char buf[256]; int found; @@ -232,10 +232,10 @@ struct LOC_Log_logntk_proc *LINK; static void readstrlist(buf, l1, LINK) char *buf; -na_strlist_t **l1; +strlist_t **l1; struct LOC_Log_logntk_proc *LINK; { - na_strlist_t *l2; + strlist_t *l2; char arg[256]; do { @@ -248,10 +248,10 @@ struct LOC_Log_logntk_proc *LINK; static void readstrlista(buf, l1, LINK) char *buf; -na_strlist_t **l1; +strlist_t **l1; struct LOC_Log_logntk_proc *LINK; { - na_strlist_t *l2; + strlist_t *l2; char arg[256]; do { @@ -266,11 +266,11 @@ struct LOC_Log_logntk_proc *LINK; static void readstrlistr(buf, l1, named, LINK) char *buf; -na_strlist_t **l1; +strlist_t **l1; int named; struct LOC_Log_logntk_proc *LINK; { - na_strlist_t *l2; + strlist_t *l2; char arg[256], rex[256]; do { @@ -313,7 +313,7 @@ struct LOC_Log_logntk_proc *LINK; cellrec *c1; transrec *t1; primrec *p1; - na_strlist_t *l1; + strlist_t *l1; long i; char STR1[256]; char STR3[256]; @@ -446,7 +446,7 @@ log_nrec *n; struct LOC_Log_logntk_proc *LINK; { char buf[256], buf2[256]; - na_strlist_t *l1; + strlist_t *l1; long i, FORLIM; if ((char *)n->temp != NULL) @@ -583,7 +583,7 @@ struct LOC_Log_logntk_proc *LINK; primrec *p; char buf[256], buf2[256]; log_nrec **portlist; - na_strlist_t *l1; + strlist_t *l1; long i, tcount, lastn, laste, lasts, lastw; short pnum; short *pnumlist; @@ -842,11 +842,11 @@ struct LOC_Log_logntk_proc *LINK; } -static na_strlist_t *mydefndirectory(pg, LINK) +static strlist_t *mydefndirectory(pg, LINK) short pg; struct LOC_Log_logntk_proc *LINK; { - na_strlist_t *l1; + strlist_t *l1; l1 = defndirectory(pg); if (l1 != NULL) @@ -876,7 +876,7 @@ static void readcellfile(fn, LINK) char *fn; struct LOC_readcells *LINK; { - na_strlist_t *l1; + strlist_t *l1; int done, copying; char *TEMP; @@ -934,7 +934,7 @@ struct LOC_dologntk *LINK; struct LOC_readcells V; log_grec *g; cellrec *c; - na_strlist_t *p, *l1; + strlist_t *p, *l1; int found; char STR1[256]; char STR2[256]; @@ -1065,7 +1065,7 @@ struct LOC_dologntk *LINK; transrec *t; cellrec *c; primrec *p; - na_strlist_t *havedone, *l1; + strlist_t *havedone, *l1; char s[256], w[256], ginstname[256]; log_nrec **portlist; long lastn, laste, lasts, lastw; @@ -1317,7 +1317,7 @@ static void showports(LINK) struct LOC_dologntk *LINK; { char buf[256]; - na_strlist_t *l1; + strlist_t *l1; char STR1[256]; strcpy(buf, "Using port list:"); @@ -1337,7 +1337,7 @@ struct LOC_Log_logntk_proc *LINK; { struct LOC_dologntk V; char args[256]; - na_strlist_t *l1, *defndir, *argslist; + strlist_t *l1, *defndir, *argslist; log_nrec *n1; /*pointer to "node" record*/ log_grec *g1; /*pointer to "gate instance" record*/ log_krec *k1; /*pointer to "gate kind" record*/ @@ -1438,7 +1438,7 @@ struct LOC_Log_logntk_proc *LINK; static void probecommand(LINK) struct LOC_Log_logntk_proc *LINK; { - na_strlist_t *defndir, *l1, *curdef; + strlist_t *defndir, *l1, *curdef; int exitflag, boxed; char buf[256], obuf[256], temp[256]; log_grec *probegate, *redgate, *g; @@ -1589,7 +1589,7 @@ char *args_; struct LOC_Log_logntk_proc *LINK; { char args[256]; - na_strlist_t *defndir, *arglist, *argl; + strlist_t *defndir, *arglist, *argl; char buf[256]; log_grec *g; log_nrec *n; diff --git a/log/src/logsim.c b/log/src/logsim.c index eccd0e0..ff426d5 100644 --- a/log/src/logsim.c +++ b/log/src/logsim.c @@ -89,7 +89,7 @@ static double nexttimebid; static int noprogloaded; static log_krec *kbase_16; -static na_strlist_t *diglbl; +static strlist_t *diglbl; static short dignumattrs; static log_kattrrec *digkattr; static log_gattrrec *diggattr; @@ -194,7 +194,7 @@ static void log_16_eraled(log_action_t *lact, short x, short y) static void log_16_plotled(log_action_t *lact, short x, short y, log_16_value v) { - na_strlist_t *l1; + strlist_t *l1; char STR2[256]; if (v == log_none) @@ -499,7 +499,7 @@ void Log_16_clock(log_16_action *act) static void makeconstpin(log_16_action *act, long num, int val) { - na_strlist_t *l1; + strlist_t *l1; char STR1[256]; if (act->lact->actgate->pin[num - 1]->ref <= 1) @@ -758,7 +758,7 @@ void Log_16_scope(log_16_action *act) struct LOC_Log_16_7seg { log_16_action *act; - na_strlist_t *l1; + strlist_t *l1; } ; static void plotline(short x1, short y1, short x2, short y2, struct LOC_Log_16_7seg *LINK) @@ -1487,7 +1487,7 @@ void Log_16_proc(log_action_t *lact) nodeinfo *ni, *ni2; log_krec *k2; gateinfo *gi, *gi2; - na_strlist_t *l1; + strlist_t *l1; short i; double val1, val2; char STR1[33]; diff --git a/log/src/logsimed.c b/log/src/logsimed.c index a62c850..ee99fc3 100644 --- a/log/src/logsimed.c +++ b/log/src/logsimed.c @@ -1765,11 +1765,11 @@ char *name_; void dump_16(proc, sl, indenting) uchar **proc; -na_strlist_t **sl; +strlist_t **sl; int indenting; { long pc, indent, oindent, proclen; - na_strlist_t *l1; + strlist_t *l1; char *buf; char *STR1; char STR2[256]; @@ -1809,11 +1809,11 @@ int indenting; void read_16(proc, proclen, sl) uchar **proc; long *proclen; -na_strlist_t *sl; +strlist_t *sl; { long pc, instrptr, i, newlen; uchar instr[1023]; - na_strlist_t *l1; + strlist_t *l1; char *STR1; pc = 1; diff --git a/log/src/logsimh.c b/log/src/logsimh.c index bcf1c9e..f5e4936 100644 --- a/log/src/logsimh.c +++ b/log/src/logsimh.c @@ -149,7 +149,7 @@ static const unarytype unarynot = { static log_sigrec *vddsig, *gndsig; static long curstamp, currecstamp, viserrorstamp; -static na_strlist_t *viserrors; +static strlist_t *viserrors; static long oldcolorstamp, showstamp; static short templatecolor, kindcolor, darkwordcolor; @@ -160,14 +160,14 @@ static hdefrec *hdefbase; static short findgattr(log_grec *g, char *name, char *kinds, short def) { - na_strlist_t *l1; + strlist_t *l1; l1 = g->kind->lbl; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) - l1 = strlist_find((na_strlist_t *)l1->value, name); + l1 = strlist_find((strlist_t *)l1->value, name); if (l1 != NULL && strposc(kinds, g->kind->attr[(long)l1->value - 1].dtype, 1L) != 0) @@ -183,14 +183,14 @@ static short findgattr(log_grec *g, char *name, char *kinds, short def) static char *namegattr(char *Result, log_grec *g, short i) { - na_strlist_t *l1; + strlist_t *l1; l1 = g->kind->lbl; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) { - l1 = (na_strlist_t *)l1->value; + l1 = (strlist_t *)l1->value; while (l1 != NULL && (long)l1->value != i) l1 = l1->next; } @@ -380,7 +380,7 @@ static void showcontrol(hdefrec *hdef, char *msg) static void showerrormsg(hdefrec *hdef, char *msg_) { char msg[256]; - na_strlist_t *l1; + strlist_t *l1; strcpy(msg, msg_); if (logsima_action.lact->msgstamp != viserrorstamp) @@ -736,7 +736,7 @@ struct LOC_compilepage { instrcount, oldinstrcount, curppin, curpvar, savecurpvar, baseppin, basepvar, numvar, numports, numthings, thingnodes, thingvars; noderec *things; - na_strlist_t *inertlist; + strlist_t *inertlist; log_brec *mybox; uchar *proc; log_nrec **gpins; @@ -4224,7 +4224,7 @@ static void compilepage(hdefrec *hdef_) long i, extrarpt; log_nrec **templs; short *pnumlist; - na_strlist_t *l1; + strlist_t *l1; dependrec *dep; log_lrec *lp; char buf[256], wrd[256]; @@ -5199,7 +5199,7 @@ void Log_16_inst(log_16_action *act) int drawflag, attr2; char attr1[256]; hdefrec *hdef; - na_strlist_t *sl1; + strlist_t *sl1; log_action_t *WITH; log_grec *WITH1; log_gattrrec *WITH2; diff --git a/log/src/logspc.c b/log/src/logspc.c index 70fe5ba..6b37fcd 100644 --- a/log/src/logspc.c +++ b/log/src/logspc.c @@ -154,7 +154,7 @@ typedef struct transrec { typedef struct cellrec { char name[82], cname[82]; char fname[256]; - na_strlist_t *port; + strlist_t *port; long ccount; unsigned loaded : 1, complain1 : 1; struct cellrec *next; @@ -170,10 +170,10 @@ typedef struct primrec { static transrec *transbase, *savetransbase; static cellrec *cellbase, *savecellbase; static primrec *primbase, *saveprimbase; -static na_strlist_t *filebase, *filecellbase; +static strlist_t *filebase, *filecellbase; static int autotop, maincell; static long default_size, default_strength; -static na_strlist_t *saveglobals, *saveorphans, *saveignored, *saveprims, +static strlist_t *saveglobals, *saveorphans, *saveignored, *saveprims, *savetrans, *savelibdirs, *ports, *globals, *orphans, *ignored, *prims, *trans, *libdirs, *notfoundlist, *wignlist; @@ -186,8 +186,8 @@ static char *filename, *cellname; static char nodeprefix[11]; -static na_strlist_t *strlist_find_r(l1, wrd_) -na_strlist_t *l1; +static strlist_t *strlist_find_r(l1, wrd_) +strlist_t *l1; char *wrd_; { char wrd[256]; @@ -203,7 +203,7 @@ static int tryreset(f, fn) FILE **f; char *fn; { - na_strlist_t *l1; + strlist_t *l1; char buf[256]; int found; @@ -357,10 +357,10 @@ struct LOC_Log_logspc_proc *LINK; static void readstrlist(buf, l1, LINK) char *buf; -na_strlist_t **l1; +strlist_t **l1; struct LOC_Log_logspc_proc *LINK; { - na_strlist_t *l2; + strlist_t *l2; char arg[256]; do { @@ -373,10 +373,10 @@ struct LOC_Log_logspc_proc *LINK; static void readstrlista(buf, l1, LINK) char *buf; -na_strlist_t **l1; +strlist_t **l1; struct LOC_Log_logspc_proc *LINK; { - na_strlist_t *l2; + strlist_t *l2; char arg[256]; do { @@ -391,11 +391,11 @@ struct LOC_Log_logspc_proc *LINK; static void readstrlistr(buf, l1, named, LINK) char *buf; -na_strlist_t **l1; +strlist_t **l1; int named; struct LOC_Log_logspc_proc *LINK; { - na_strlist_t *l2; + strlist_t *l2; char arg[256], rex[256]; do { @@ -439,7 +439,7 @@ struct LOC_Log_logspc_proc *LINK; cellrec *c1; transrec *t1; primrec *p1; - na_strlist_t *l1; + strlist_t *l1; long i; char STR1[256]; char STR3[256]; @@ -635,7 +635,7 @@ log_nrec *n; struct LOC_Log_logspc_proc *LINK; { char buf[256], buf2[256]; - na_strlist_t *l1; + strlist_t *l1; long i, FORLIM; if ((char *)n->temp != NULL) @@ -772,7 +772,7 @@ struct LOC_Log_logspc_proc *LINK; primrec *p; char buf[256], buf2[256]; log_nrec **portlist; - na_strlist_t *l1; + strlist_t *l1; long i, tcount, lastn, laste, lasts, lastw; short pnum; short *pnumlist; @@ -1029,11 +1029,11 @@ struct LOC_Log_logspc_proc *LINK; } -static na_strlist_t *mydefndirectory(pg, LINK) +static strlist_t *mydefndirectory(pg, LINK) short pg; struct LOC_Log_logspc_proc *LINK; { - na_strlist_t *l1; + strlist_t *l1; l1 = defndirectory(pg); if (l1 != NULL) @@ -1066,7 +1066,7 @@ static void readcellfile(fn, LINK) char *fn; struct LOC_readcells *LINK; { - na_strlist_t *l1; + strlist_t *l1; int done, copying, prewarp; char *TEMP; char spcstring[256], spcword[256], endsubckt[256]; @@ -1148,7 +1148,7 @@ struct LOC_dologspc *LINK; struct LOC_readcells V; log_grec *g; cellrec *c; - na_strlist_t *p, *l1; + strlist_t *p, *l1; int found; char STR1[256]; char STR2[256]; @@ -1305,12 +1305,12 @@ struct LOC_dologspc *LINK; transrec *t; cellrec *c; primrec *p; - na_strlist_t *havedone, *l1; + strlist_t *havedone, *l1; char s[256], w[256], ginstname[256]; log_nrec **portlist; long lastn, laste, lasts, lastw; short *pnumlist, pinCount, attrCount, strCount; - na_strlist_t *na_slr; + strlist_t *na_slr; int handled; long i, j; char STR1[256], STR2[256]; @@ -1485,7 +1485,7 @@ struct LOC_dologspc *LINK; case 'V': strCount = 0; na_slr = - g->kind->attr[attrCount].UU.U86.v; /* na_strlist_trec */ + g->kind->attr[attrCount].UU.U86.v; /* strlist_trec */ strcpy (STR1, ""); while (na_slr) { if (strCount == g->kind->attr[attrCount].UU.U86.nv) { @@ -1918,7 +1918,7 @@ static void showports(LINK) struct LOC_dologspc *LINK; { char buf[256]; - na_strlist_t *l1; + strlist_t *l1; char STR1[256]; strcpy(buf, "Using port list:"); @@ -1938,7 +1938,7 @@ struct LOC_Log_logspc_proc *LINK; { struct LOC_dologspc V; char args[256]; - na_strlist_t *l1, *defndir, *argslist, *libpath; + strlist_t *l1, *defndir, *argslist, *libpath; FILE *incfp; log_nrec *n1; /*pointer to "node" record*/ log_grec *g1; /*pointer to "gate instance" record*/ @@ -2132,7 +2132,7 @@ struct LOC_Log_logspc_proc *LINK; static void probecommand(LINK) struct LOC_Log_logspc_proc *LINK; { - na_strlist_t *defndir, *l1, *curdef; + strlist_t *defndir, *l1, *curdef; int exitflag, boxed; char buf[256], obuf[256], temp[256]; log_grec *probegate, *redgate, *g; @@ -2279,7 +2279,7 @@ char *args_; struct LOC_Log_logspc_proc *LINK; { char args[256]; - na_strlist_t *defndir, *arglist, *argl; + strlist_t *defndir, *arglist, *argl; char buf[256]; log_grec *g; log_nrec *n; diff --git a/psys/include/p2c/numex.h b/psys/include/p2c/numex.h index 1956258..8c5afb0 100644 --- a/psys/include/p2c/numex.h +++ b/psys/include/p2c/numex.h @@ -80,24 +80,24 @@ typedef struct ne_nexrec { char *s; struct { long *ip; - na_strlist_t *ips; + strlist_t *ips; struct ne_nexrec *p1, *p2, *p3, *p4; } U10; struct { double *rp; - na_strlist_t *rps; + strlist_t *rps; } U11; struct { char **sp; - na_strlist_t *sps; + strlist_t *sps; } U12; struct { ne_functionrec *fp; - na_strlist_t *fps; + strlist_t *fps; } U15; struct { struct ne_nexrec **ep; - na_strlist_t *eps; + strlist_t *eps; } U16; struct { na_quadword qw2; @@ -108,7 +108,7 @@ typedef struct ne_nexrec { typedef struct ne_desc { - na_strlist_t *symtab; + strlist_t *symtab; unsigned casesens : 1, builtin : 1, scaled : 1, doubleeq : 1, isfunc : 1, dummy0 : 7, error : 4; char units[6]; @@ -151,9 +151,9 @@ extern void ne_dispose (ne_nexrec **nex); extern void ne_constant (ne_nexrec **nex, ne_desc *desc, char *which); extern void ne_notconstant (ne_nexrec **nex, ne_desc *desc, char *which); extern void ne_constantlist (ne_nexrec **nex, ne_desc *desc, - na_strlist_t *which); + strlist_t *which); extern void ne_notconstantlist (ne_nexrec **nex, ne_desc *desc, - na_strlist_t *which); + strlist_t *which); extern ne_nexrec *ne_makeerror (ne_errorkind err); extern ne_datatype ne_exprtype (ne_nexrec *nex); extern ne_nexrec *ne_typecast (ne_nexrec *nex, ne_datatype typ); @@ -165,45 +165,45 @@ extern long ne_ievalexpr (char *ex, ne_desc *desc); extern double ne_revalexpr (char *ex, ne_desc *desc); extern char *ne_sevalexpr (char *Result, char *ex, ne_desc *desc); -extern void ne_makeintconst (na_strlist_t *sym, long i); -extern void ne_makesrealconst (na_strlist_t *sym, double r); -extern void ne_makerealconst (na_strlist_t *sym, double r); -extern void ne_makestrconst (na_strlist_t *sym, char *s); -extern void ne_makeintvar (na_strlist_t *sym, long *i); -extern void ne_makerealvar (na_strlist_t *sym, double *r); -extern void ne_makerealxvar (na_strlist_t *sym, double *r); -extern void ne_makestrvar (na_strlist_t *sym, char *s); -extern void ne_makestrptrvar (na_strlist_t *sym, char **sp); -extern void ne_makeintfunc (na_strlist_t *sym, ne_datatype t1, +extern void ne_makeintconst (strlist_t *sym, long i); +extern void ne_makesrealconst (strlist_t *sym, double r); +extern void ne_makerealconst (strlist_t *sym, double r); +extern void ne_makestrconst (strlist_t *sym, char *s); +extern void ne_makeintvar (strlist_t *sym, long *i); +extern void ne_makerealvar (strlist_t *sym, double *r); +extern void ne_makerealxvar (strlist_t *sym, double *r); +extern void ne_makestrvar (strlist_t *sym, char *s); +extern void ne_makestrptrvar (strlist_t *sym, char **sp); +extern void ne_makeintfunc (strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr); -extern void ne_makerealfunc (na_strlist_t *sym, ne_datatype t1, +extern void ne_makerealfunc (strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr); -extern void ne_makestrfunc (na_strlist_t *sym, ne_datatype t1, +extern void ne_makestrfunc (strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr); -extern void ne_makeintmfunc (na_strlist_t *sym, long nargs, +extern void ne_makeintmfunc (strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr); -extern void ne_makerealmfunc (na_strlist_t *sym, long nargs, +extern void ne_makerealmfunc (strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr); -extern void ne_makestrmfunc (na_strlist_t *sym, long nargs, +extern void ne_makestrmfunc (strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr); -extern void ne_makeintsfunc (na_strlist_t *sym, long nargs, +extern void ne_makeintsfunc (strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex); -extern void ne_makerealsfunc (na_strlist_t *sym, long nargs, +extern void ne_makerealsfunc (strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex); -extern void ne_makestrsfunc (na_strlist_t *sym, long nargs, +extern void ne_makestrsfunc (strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex); -extern void ne_makeintarg (na_strlist_t *sym, long i); -extern void ne_makerealarg (na_strlist_t *sym, long i); -extern void ne_makestrarg (na_strlist_t *sym, long i); -extern void ne_setminargs (na_strlist_t *sym, long minargs); -extern void ne_setmaxargs (na_strlist_t *sym, long maxargs); -extern void ne_makestaticfunc (na_strlist_t *sym); -extern void ne_disposesym (na_strlist_t *sym); - -extern void ne_disposesymtab (na_strlist_t **symtab); +extern void ne_makeintarg (strlist_t *sym, long i); +extern void ne_makerealarg (strlist_t *sym, long i); +extern void ne_makestrarg (strlist_t *sym, long i); +extern void ne_setminargs (strlist_t *sym, long minargs); +extern void ne_setmaxargs (strlist_t *sym, long maxargs); +extern void ne_makestaticfunc (strlist_t *sym); +extern void ne_disposesym (strlist_t *sym); + +extern void ne_disposesymtab (strlist_t **symtab); extern int ne_condeval (ne_nexrec *nex); extern long ne_ieval (ne_nexrec *nex); extern double ne_reval (ne_nexrec *nex); diff --git a/psys/include/p2c/strlist.h b/psys/include/p2c/strlist.h index 1799858..91cf9c6 100644 --- a/psys/include/p2c/strlist.h +++ b/psys/include/p2c/strlist.h @@ -1,30 +1,30 @@ #ifndef STRLIST_H #define STRLIST_H -typedef struct na_strlist_t +typedef struct strlist_t { - struct na_strlist_t *next; + struct strlist_t *next; void *value; /* user-defined */ char kind; /* user-defined */ size_t len; /* for internal use */ char *s; -} na_strlist_t; +} strlist_t; -extern void strlist_init (na_strlist_t **base); -extern na_strlist_t *strlist_find (na_strlist_t *base, char *s); -extern na_strlist_t *strlist_cifind (na_strlist_t *base, char *s); -extern void strlist_change (na_strlist_t **base, na_strlist_t **ptr, char *s); -extern void strlist_remove (na_strlist_t **base, char *s); -extern void strlist_delete (na_strlist_t **base, na_strlist_t **ptr); -extern void strlist_dispose (na_strlist_t **ptr); -extern void strlist_empty (na_strlist_t **base); -extern void strlist_copy (na_strlist_t **dest, na_strlist_t *src); -extern na_strlist_t *strlist_add (na_strlist_t **base, char *s); -extern na_strlist_t *strlist_append (na_strlist_t **base, char *s); -extern na_strlist_t *strlist_insert (na_strlist_t **base, char *s); +extern void strlist_init (strlist_t **base); +extern strlist_t *strlist_find (strlist_t *base, char *s); +extern strlist_t *strlist_cifind (strlist_t *base, char *s); +extern void strlist_change (strlist_t **base, strlist_t **ptr, char *s); +extern void strlist_remove (strlist_t **base, char *s); +extern void strlist_delete (strlist_t **base, strlist_t **ptr); +extern void strlist_dispose (strlist_t **ptr); +extern void strlist_empty (strlist_t **base); +extern void strlist_copy (strlist_t **dest, strlist_t *src); +extern strlist_t *strlist_add (strlist_t **base, char *s); +extern strlist_t *strlist_append (strlist_t **base, char *s); +extern strlist_t *strlist_insert (strlist_t **base, char *s); -extern void strlist_dump (FILE *f, na_strlist_t *base); +extern void strlist_dump (FILE *f, strlist_t *base); #endif diff --git a/psys/src/numex.c b/psys/src/numex.c index cdda998..5825bce 100644 --- a/psys/src/numex.c +++ b/psys/src/numex.c @@ -267,7 +267,7 @@ static char *realunit(char *Result, double r, char *u) } -static void dummysymproc(char *name, ne_desc *desc, na_strlist_t **symptr) +static void dummysymproc(char *name, ne_desc *desc, strlist_t **symptr) { *symptr = strlist_find(desc->symtab, name); } @@ -504,13 +504,13 @@ ne_nexrec *ne_makeerror(ne_errorkind err) return nex; } -static void optimize (ne_nexrec **nex, ne_desc *desc, na_strlist_t *which, long mode); +static void optimize (ne_nexrec **nex, ne_desc *desc, strlist_t *which, long mode); /* Local variables for optimize: */ struct LOC_optimize { ne_desc *desc; - na_strlist_t *which; + strlist_t *which; long mode; ne_errorkind err; long ires; @@ -1174,7 +1174,7 @@ static ne_nexrec *opt(ne_nexrec **nex_, struct LOC_optimize *LINK) } -static void optimize(ne_nexrec **nex, ne_desc *desc_, na_strlist_t *which_, long mode_) +static void optimize(ne_nexrec **nex, ne_desc *desc_, strlist_t *which_, long mode_) { struct LOC_optimize V; @@ -1217,7 +1217,7 @@ static void optimize(ne_nexrec **nex, ne_desc *desc_, na_strlist_t *which_, long void ne_constant(ne_nexrec **nex, ne_desc *desc, char *which_) { char which[256]; - na_strlist_t *l1, *l2; + strlist_t *l1, *l2; char buf[256]; strcpy(which, which_); @@ -1237,7 +1237,7 @@ void ne_constant(ne_nexrec **nex, ne_desc *desc, char *which_) void ne_notconstant(ne_nexrec **nex, ne_desc *desc, char *which_) { char which[256]; - na_strlist_t *l1, *l2; + strlist_t *l1, *l2; char buf[256]; strcpy(which, which_); @@ -1254,12 +1254,12 @@ void ne_notconstant(ne_nexrec **nex, ne_desc *desc, char *which_) } -void ne_constantlist(ne_nexrec **nex, ne_desc *desc, na_strlist_t *which) +void ne_constantlist(ne_nexrec **nex, ne_desc *desc, strlist_t *which) { optimize(nex, desc, which, 1L); } -void ne_notconstantlist(ne_nexrec **nex, ne_desc *desc, na_strlist_t *which) +void ne_notconstantlist(ne_nexrec **nex, ne_desc *desc, strlist_t *which) { optimize(nex, desc, which, 2L); } @@ -1406,7 +1406,7 @@ static ne_nexrec *factor(struct LOC_expr *LINK) ne_nexrec **args; ne_datatype atype; na_long value; - na_strlist_t *l1; + strlist_t *l1; double *rp; ne_functionrec *fp; long i, p0; @@ -1436,10 +1436,10 @@ static ne_nexrec *factor(struct LOC_expr *LINK) kind = ' '; l1 = NULL; if (LINK->LINK->desc->symproc.link != NULL) - (*(void(*) (char *name, ne_desc *desc, na_strlist_t **symptr, void* _link))LINK->LINK->desc->symproc.proc)(name, + (*(void(*) (char *name, ne_desc *desc, strlist_t **symptr, void* _link))LINK->LINK->desc->symproc.proc)(name, LINK->LINK->desc, &l1, LINK->LINK->desc->symproc.link); else - (*(void(*) (char *name, ne_desc *desc, na_strlist_t **symptr)) LINK->LINK->desc->symproc.proc)(name, LINK->LINK->desc, &l1); + (*(void(*) (char *name, ne_desc *desc, strlist_t **symptr)) LINK->LINK->desc->symproc.proc)(name, LINK->LINK->desc, &l1); if (l1 != NULL) { kind = l1->kind; @@ -3166,19 +3166,19 @@ char *ne_sevalexpr(char *Result, char *ex, ne_desc *desc) } -void ne_makeintconst(na_strlist_t *sym, long i) +void ne_makeintconst(strlist_t *sym, long i) { sym->kind = ne_kind_intconst; sym->value = (na_long)i; } -void ne_makesrealconst(na_strlist_t *sym, double r) +void ne_makesrealconst(strlist_t *sym, double r) { sym->kind = ne_kind_srealconst; sym->value = na_rtosr(r); } -void ne_makerealconst(na_strlist_t *sym, double r) +void ne_makerealconst(strlist_t *sym, double r) { double *rp; @@ -3189,43 +3189,43 @@ void ne_makerealconst(na_strlist_t *sym, double r) } -void ne_makestrconst(na_strlist_t *sym, char *s) +void ne_makestrconst(strlist_t *sym, char *s) { sym->kind = ne_kind_strconst; *(char **)((char **)(&sym->value)) = (char *)strdup(s); } -void ne_makeintvar(na_strlist_t *sym, long *i) +void ne_makeintvar(strlist_t *sym, long *i) { sym->kind = ne_kind_intptr; sym->value = (void*)i; } -void ne_makerealvar(na_strlist_t *sym, double *r) +void ne_makerealvar(strlist_t *sym, double *r) { sym->kind = ne_kind_realptr; sym->value = (void*)r; } -void ne_makerealxvar(na_strlist_t *sym, double *r) +void ne_makerealxvar(strlist_t *sym, double *r) { sym->kind = ne_kind_realxptr; sym->value = (void*)r; } -void ne_makestrvar(na_strlist_t *sym, char *s) +void ne_makestrvar(strlist_t *sym, char *s) { sym->kind = ne_kind_strvalue; sym->value = (void*)s; } -void ne_makestrptrvar(na_strlist_t *sym, char **sp) +void ne_makestrptrvar(strlist_t *sym, char **sp) { sym->kind = ne_kind_strptr; sym->value = (void*)sp; } -static void setupfunc(na_strlist_t *sym, ne_functionrec **fp, long nargs, ne_datatype *args) +static void setupfunc(strlist_t *sym, ne_functionrec **fp, long nargs, ne_datatype *args) { long i; @@ -3239,7 +3239,7 @@ static void setupfunc(na_strlist_t *sym, ne_functionrec **fp, long nargs, ne_dat sym->value = (void*)(*fp); } -void ne_makeintmfunc(na_strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr) +void ne_makeintmfunc(strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr) { ne_functionrec *fp; @@ -3249,7 +3249,7 @@ void ne_makeintmfunc(na_strlist_t *sym, long nargs, ne_datatype *args, _PROCEDUR fp->UU.U5.ipr = pr; } -void ne_makerealmfunc(na_strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr) +void ne_makerealmfunc(strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr) { ne_functionrec *fp; @@ -3259,7 +3259,7 @@ void ne_makerealmfunc(na_strlist_t *sym, long nargs, ne_datatype *args, _PROCEDU fp->UU.rpr = pr; } -void ne_makestrmfunc(na_strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr) +void ne_makestrmfunc(strlist_t *sym, long nargs, ne_datatype *args, _PROCEDURE pr) { ne_functionrec *fp; @@ -3270,7 +3270,7 @@ void ne_makestrmfunc(na_strlist_t *sym, long nargs, ne_datatype *args, _PROCEDUR } -void ne_makeintfunc(na_strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr) +void ne_makeintfunc(strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr) { ne_datatype args[3]; @@ -3280,7 +3280,7 @@ void ne_makeintfunc(na_strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_dataty ne_makeintmfunc(sym, (long)((t1 != ne_notype) + (t2 != ne_notype) + (t3 != ne_notype)), args, pr); } -void ne_makerealfunc(na_strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr) +void ne_makerealfunc(strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr) { ne_datatype args[3]; @@ -3290,7 +3290,7 @@ void ne_makerealfunc(na_strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datat ne_makerealmfunc(sym, (long)((t1 != ne_notype) + (t2 != ne_notype) + (t3 != ne_notype)), args, pr); } -void ne_makestrfunc(na_strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr) +void ne_makestrfunc(strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_datatype t3, _PROCEDURE pr) { ne_datatype args[3]; @@ -3300,7 +3300,7 @@ void ne_makestrfunc(na_strlist_t *sym, ne_datatype t1, ne_datatype t2, ne_dataty ne_makestrmfunc(sym, (long)((t1 != ne_notype) + (t2 != ne_notype) + (t3 != ne_notype)), args, pr); } -void ne_makeintsfunc(na_strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex) +void ne_makeintsfunc(strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex) { ne_functionrec *fp; @@ -3310,7 +3310,7 @@ void ne_makeintsfunc(na_strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec fp->UU.nexp = nex; } -void ne_makerealsfunc(na_strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex) +void ne_makerealsfunc(strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex) { ne_functionrec *fp; @@ -3320,7 +3320,7 @@ void ne_makerealsfunc(na_strlist_t *sym, long nargs, ne_datatype *args, ne_nexre fp->UU.nexp = nex; } -void ne_makestrsfunc(na_strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex) +void ne_makestrsfunc(strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec **nex) { ne_functionrec *fp; @@ -3330,25 +3330,25 @@ void ne_makestrsfunc(na_strlist_t *sym, long nargs, ne_datatype *args, ne_nexrec fp->UU.nexp = nex; } -void ne_makeintarg(na_strlist_t *sym, long i) +void ne_makeintarg(strlist_t *sym, long i) { sym->kind = ne_kind_intarg; sym->value = (na_long)i; } -void ne_makerealarg(na_strlist_t *sym, long i) +void ne_makerealarg(strlist_t *sym, long i) { sym->kind = ne_kind_realarg; sym->value = (na_long)i; } -void ne_makestrarg(na_strlist_t *sym, long i) +void ne_makestrarg(strlist_t *sym, long i) { sym->kind = ne_kind_strarg; sym->value = (na_long)i; } -void ne_setminargs(na_strlist_t *sym, long minargs) +void ne_setminargs(strlist_t *sym, long minargs) { ne_functionrec *fp; @@ -3356,7 +3356,7 @@ void ne_setminargs(na_strlist_t *sym, long minargs) fp->minargs = P_imin2((long)fp->nargs, minargs); } -void ne_setmaxargs(na_strlist_t *sym, long maxargs) +void ne_setmaxargs(strlist_t *sym, long maxargs) { ne_functionrec *fp; @@ -3364,7 +3364,7 @@ void ne_setmaxargs(na_strlist_t *sym, long maxargs) fp->maxargs = P_imin2(P_imax2((long)fp->nargs, maxargs), (long)ne_maxargs); } -void ne_makestaticfunc(na_strlist_t *sym) +void ne_makestaticfunc(strlist_t *sym) { ne_functionrec *fp; @@ -3372,7 +3372,7 @@ void ne_makestaticfunc(na_strlist_t *sym) fp->static_ = true; } -void ne_disposesym(na_strlist_t *sym) +void ne_disposesym(strlist_t *sym) { double *rp; ne_functionrec *fp; @@ -3396,9 +3396,9 @@ void ne_disposesym(na_strlist_t *sym) sym->value = (na_long)0; } -void ne_disposesymtab(na_strlist_t **symtab) +void ne_disposesymtab(strlist_t **symtab) { - na_strlist_t *l1; + strlist_t *l1; l1 = *symtab; while (l1 != NULL) diff --git a/psys/src/strlist.c b/psys/src/strlist.c index 2d5b9eb..9e9c094 100644 --- a/psys/src/strlist.c +++ b/psys/src/strlist.c @@ -1,14 +1,14 @@ #include <p2c/p2c.h> #include <p2c/strlist.h> -void strlist_init(na_strlist_t **base) +void strlist_init(strlist_t **base) { *base = NULL; } -na_strlist_t *strlist_add(na_strlist_t **base, char *s) +strlist_t *strlist_add(strlist_t **base, char *s) { - na_strlist_t *lp; + strlist_t *lp; size_t len = strlen(s); /* go to good position */ @@ -17,7 +17,7 @@ na_strlist_t *strlist_add(na_strlist_t **base, char *s) if (lp == NULL || strcmp(lp->s, s)) { - lp = (na_strlist_t *)malloc(sizeof(na_strlist_t)); + lp = (strlist_t *)malloc(sizeof(strlist_t)); if (lp == NULL) _OutMem(); @@ -36,16 +36,16 @@ na_strlist_t *strlist_add(na_strlist_t **base, char *s) return lp; } -na_strlist_t *strlist_append(na_strlist_t **base, char *s) +strlist_t *strlist_append(strlist_t **base, char *s) { - na_strlist_t *lp; + strlist_t *lp; size_t len = strlen(s); /* go to end of list */ while ((lp = *base)) base = &lp->next; - lp = (na_strlist_t *)malloc(sizeof(na_strlist_t)); + lp = (strlist_t *)malloc(sizeof(strlist_t)); if (!lp) _OutMem(); @@ -62,12 +62,12 @@ na_strlist_t *strlist_append(na_strlist_t **base, char *s) return lp; } -na_strlist_t *strlist_insert(na_strlist_t **base, char *s) +strlist_t *strlist_insert(strlist_t **base, char *s) { - na_strlist_t *lp; + strlist_t *lp; size_t len = strlen(s); - lp = (na_strlist_t *)malloc(sizeof(na_strlist_t)); + lp = (strlist_t *)malloc(sizeof(strlist_t)); if (!lp) _OutMem(); lp->s = (char *)malloc(sizeof(char) * (len + 1)); @@ -83,24 +83,24 @@ na_strlist_t *strlist_insert(na_strlist_t **base, char *s) return lp; } -na_strlist_t *strlist_find(na_strlist_t *base, char *s) +strlist_t *strlist_find(strlist_t *base, char *s) { while (base && strcmp(base->s, s)) base = base->next; return base; } -na_strlist_t *strlist_cifind(na_strlist_t *base, char *s) +strlist_t *strlist_cifind(strlist_t *base, char *s) { while (base && strcicmp(base->s, s)) base = base->next; return base; } -void strlist_change(na_strlist_t **base, na_strlist_t **lp, char *s) +void strlist_change(strlist_t **base, strlist_t **lp, char *s) { - na_strlist_t *lp2 = *lp; - na_strlist_t *lp3; + strlist_t *lp2 = *lp; + strlist_t *lp3; size_t len = strlen(s); while ((lp3 = *base) != lp2) @@ -127,9 +127,9 @@ void strlist_change(na_strlist_t **base, na_strlist_t **lp, char *s) strcpy(lp3->s, s); } -void strlist_remove(na_strlist_t **base, char *s) +void strlist_remove(strlist_t **base, char *s) { - na_strlist_t *lp; + strlist_t *lp; while ((lp = *base) != NULL) { @@ -143,9 +143,9 @@ void strlist_remove(na_strlist_t **base, char *s) } } -void strlist_delete(na_strlist_t **base, na_strlist_t **lp) +void strlist_delete(strlist_t **base, strlist_t **lp) { - na_strlist_t *lp2; + strlist_t *lp2; while ((lp2 = *base) != NULL) { @@ -159,16 +159,16 @@ void strlist_delete(na_strlist_t **base, na_strlist_t **lp) } } -void strlist_dispose(na_strlist_t **ptr) +void strlist_dispose(strlist_t **ptr) { free((*ptr)->s); free(*ptr); *ptr = NULL; } -void strlist_empty(na_strlist_t **base) +void strlist_empty(strlist_t **base) { - na_strlist_t *lp; + strlist_t *lp; while ((lp = *base) != NULL) { @@ -178,15 +178,15 @@ void strlist_empty(na_strlist_t **base) *base = NULL; } -void strlist_copy(na_strlist_t **dest, na_strlist_t *src) +void strlist_copy(strlist_t **dest, strlist_t *src) { - na_strlist_t *lcopy; + strlist_t *lcopy; strlist_empty(dest); while (src != NULL) { - lcopy = (na_strlist_t *)malloc(sizeof(na_strlist_t)); + lcopy = (strlist_t *)malloc(sizeof(strlist_t)); if(lcopy == NULL) _OutMem(); lcopy->s = (char *)malloc(sizeof(char) * (src->len + 1)); @@ -206,7 +206,7 @@ void strlist_copy(na_strlist_t **dest, na_strlist_t *src) *dest = NULL; } -void strlist_dump(FILE *f, na_strlist_t *base) +void strlist_dump(FILE *f, strlist_t *base) { while (base != NULL) { -- GitLab