diff --git a/log/src/Makefile b/log/src/Makefile index f7dc5ff820cd6a3a494dca3b92958edc879ac2c3..5bc6efab35bdf561eebc2181fdeb16d63f8873c2 100644 --- a/log/src/Makefile +++ b/log/src/Makefile @@ -205,7 +205,7 @@ makeana: ($(CD) ana; make $(MFLAGS) grab all) -LOGOBJ = log.o $(TOOLOBJ) logstuff.o log_action.o logdef.o +LOGOBJ = log.o $(TOOLOBJ) logstuff.o logdef.o log: $(LOGOBJ) tooldir.o $(LIBP2C) makeana $(CC) $(CFLAGS) tooldir.o $(LOGOBJ) $(LIBP2C) $(LIBX11) \ diff --git a/log/src/ana/globals.h b/log/src/ana/globals.h index 72de9f63341427ac201d1179f58dbe75ebf7e073..1bcd4e4a78a81fe75efe8539e70db53e7c2096a2 100644 --- a/log/src/ana/globals.h +++ b/log/src/ana/globals.h @@ -439,8 +439,8 @@ typedef struct AnaKlistnode { /*******************************************************************************/ /*System data structures*/ -vextern log_action *AnaLogglobals; /*Log's global variables*/ -vextern log_action *AnaLogIglobals; /*Log's global variables*/ +vextern log_action_t *AnaLogglobals; /*Log's global variables*/ +vextern log_action_t *AnaLogIglobals; /*Log's global variables*/ vextern AnaInt_rec *AnaInt_nodelist; /*List of current internal pointers*/ vextern AnaAnalog_Colors AnaColormap; /*The color map*/ vextern AnaAnalog_Levels AnaLevelmap; /*The glow mode level map*/ diff --git a/log/src/ana/idiff.c b/log/src/ana/idiff.c index 416430a11e673ac96de29531b7c89ed3473536c3..80dffed35a19bc980fff73304cadfc0f442f5d4f 100644 --- a/log/src/ana/idiff.c +++ b/log/src/ana/idiff.c @@ -972,7 +972,7 @@ Analog_32_action *act; void Touch_IDiff(act) Analog_32_action *act; { - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = AnaLogglobals; diff --git a/log/src/ana/inter.c b/log/src/ana/inter.c index 4aea2699f198fb0deadaf2af87e43a5c63d74f3d..18eb80b520c956d4422b8faefe290d2fb01e72d4 100644 --- a/log/src/ana/inter.c +++ b/log/src/ana/inter.c @@ -34,11 +34,9 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static void log_histinit_32(Globals, Voltage) -log_action *Globals; -int Voltage; +static void log_histinit_32(log_action_t *Globals, int Voltage) { - na_strlist *Dummy; + na_strlist_t *Dummy; if (Voltage) { Dummy = strlist_append(&Globals->acttool->hlbl, @@ -76,8 +74,7 @@ int Voltage; -static void log_init_32(act) -log_action *act; +static void log_init_32(log_action_t *act) { log_tool *WITH; @@ -94,8 +91,7 @@ log_action *act; } -static void log_edit_32(act) -log_action *act; +static void log_edit_32(log_action_t *act) { char Ch; long Index; @@ -139,15 +135,13 @@ log_action *act; } -static void log_dump_32(act) -log_action *act; +static void log_dump_32(log_action_t *act) { strlist_append(&act->actstrlist, (char *)act->actproc); } -static void log_read_32(act) -log_action *act; +static void log_read_32(log_action_t *act) { strcpy((char *)act->actproc, act->actstrlist->s); } @@ -338,8 +332,7 @@ static void log_copygate_32() } -static void Node_remove(oldnode) -AnaInt_rec *oldnode; +static void Node_remove(AnaInt_rec *oldnode) { AnaInt_rec *Count, *Last; int Done; @@ -434,8 +427,7 @@ static void log_configchgate_32() -static void log_newnode_32(Globals) -log_action *Globals; +static void log_newnode_32(log_action_t *Globals) { AnaExt_rec *Newnode; @@ -450,8 +442,7 @@ log_action *Globals; } -static void log_disposenode_32(Globals) -log_action *Globals; +static void log_disposenode_32(log_action_t *Globals) { AnaExt_rec *Oldnode; @@ -461,8 +452,7 @@ log_action *Globals; } -static void log_copynode_32(Globals) -log_action *Globals; +static void log_copynode_32(log_action_t *Globals) { AnaExt_rec *Newnode, *Oldnode; @@ -478,8 +468,7 @@ log_action *Globals; } -static void log_combinenodes_32(Globals) -log_action *Globals; +static void log_combinenodes_32(log_action_t *Globals) { AnaExt_rec *Destnode, *Srcnode; @@ -514,8 +503,7 @@ static void log_color_32() } -static long Variantmap(Variantcolor) -long Variantcolor; +static long Variantmap(long Variantcolor) { long Result; @@ -573,9 +561,7 @@ long Variantcolor; } -static void log_history_32(Globals, Voltage) -log_action *Globals; -int Voltage; +static void log_history_32(log_action_t *Globals, int Voltage) { AnaExt_rec *Histnode; @@ -606,9 +592,7 @@ int Voltage; } -static void log_histval_32(Globals, Voltage) -log_action *Globals; -int Voltage; +static void log_histval_32(log_action_t *Globals, int Voltage) { switch (Globals->actgattr[AnaH_Method - 1].UU.nv) { @@ -641,13 +625,11 @@ int Voltage; #define Slope 3 -static void log_histstr_32(Globals, Voltage) -log_action *Globals; -int Voltage; +static void log_histstr_32(log_action_t *Globals, int Voltage) { double Temp; char Unit[4]; - log_action *WITH; + log_action_t *WITH; WITH = Globals; if (!WITH->actgattr[AnaH_PhosVis - 1].UU.b) @@ -716,9 +698,7 @@ int Voltage; -static void log_configchhist_32(Globals, voltage) -log_action *Globals; -int voltage; +static void log_configchhist_32(log_action_t *Globals, int voltage) { Globals->actflag = true; switch (Globals->actx) { @@ -759,9 +739,7 @@ int voltage; -static void log_confighist_32(Globals, voltage) -log_action *Globals; -int voltage; +static void log_confighist_32(log_action_t *Globals, int voltage) { if (!Globals->histactive && !Globals->actgattr[AnaH_Present - 1].blnk) { Globals->actgattr[AnaH_Present - 1].blnk = true; @@ -822,7 +800,7 @@ static void log_touchgate_32() static void log_cnf_32() { - log_action *WITH; + log_action_t *WITH; WITH = AnaLogglobals; AnaAddcommand(WITH->func, WITH->funcarg); @@ -834,7 +812,7 @@ static void log_func_32() { Analog_32_action AnaAct; int Found; - log_action *WITH; + log_action_t *WITH; WITH = AnaLogglobals; Analog_GlobalCommand(&Found, &AnaAct.accepted); @@ -869,8 +847,7 @@ static void log_glowcol_32() } -void Log_32_proc(act) -log_action *act; +void Log_32_proc(log_action_t *act) { switch (act->action) { @@ -1028,8 +1005,7 @@ log_action *act; /* Procedures to handle Type 33 Signals */ /******************************************************************************/ -static void log_init_33(act) -log_action *act; +static void log_init_33(log_action_t *act) { log_tool *WITH; @@ -1045,8 +1021,7 @@ log_action *act; } -void Log_33_proc(act) -log_action *act; +void Log_33_proc(log_action_t *act) { switch (act->action) { diff --git a/log/src/ana/inter.h b/log/src/ana/inter.h index cd686b2532372a85a56e4eb905d83da26b19ef88..02f1800bd43084f179f05f5590a1acf074a09dc7 100644 --- a/log/src/ana/inter.h +++ b/log/src/ana/inter.h @@ -13,8 +13,8 @@ #include "nsolver.h" #include <p2c/newci.h> -extern void Log_32_proc (log_action *act); -extern void Log_33_proc (log_action *act); +extern void Log_32_proc (log_action_t *act); +extern void Log_33_proc (log_action_t *act); #endif /*INTER_H*/ diff --git a/log/src/ana/iswitch1.c b/log/src/ana/iswitch1.c index 76b61733f4cf357a2e83cbe2def5286be5b36f2c..566e2e37e9eb29802634fbafae2984b9e0a5b793 100644 --- a/log/src/ana/iswitch1.c +++ b/log/src/ana/iswitch1.c @@ -813,7 +813,7 @@ Analog_32_action *act; { Iswitch1Const *Iswitch1Var; Anainstlist *A_Gate; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = AnaLogglobals; diff --git a/log/src/ana/iswitch2.c b/log/src/ana/iswitch2.c index 9cfe7679870a786d2ef9097fcd9b8df4f38f016c..5c54f59b192a7a75e3a126d1d4ec20879246f9c4 100644 --- a/log/src/ana/iswitch2.c +++ b/log/src/ana/iswitch2.c @@ -818,7 +818,7 @@ Analog_32_action *act; { Iswitch2Const *Iswitch2Var; Anainstlist *A_Gate; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = AnaLogglobals; diff --git a/log/src/ana/log_action.h b/log/src/ana/log_action.h index b0fbfc0177d56255b9d415c6d621c91b0584947a..f4118fb15f181a6bfe8a51296abf648b3e3ead01 100644 --- a/log/src/ana/log_action.h +++ b/log/src/ana/log_action.h @@ -1,6 +1,9 @@ #ifndef LOG_ACTION_H #define LOG_ACTION_H +#include"logdef.h" +#include<limits.h> + typedef enum { act_init, @@ -31,10 +34,14 @@ typedef enum act_readgate, act_connectgate, act_disconnectgate, + act_configgate, + act_configchgate, + act_configrelgate, + act_confignode, act_configchnode, act_configrelnode, act_confighist, - act_confighhist, + act_configchhist, act_configrelhist, act_newkind, act_disposekind, @@ -137,8 +144,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_strlistrec **lbl, short *numattrs, log_kattrrec **attr); - void (*editattrs) (log_gattrrec *gattr, int numattrs, log_kattrrec *kattr, na_strlistrec *lbl, + 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, 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); @@ -175,8 +182,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_strlistrec *lbl, char *name, char *kinds, short *num); - void (*findattrname2) (int numattrs, log_kattrrec *kattr, na_strlistrec *lbl, int num, char *name); + 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 (*showpinname) (log_grec *g, int i, int c, char *name); } log_hook2_t; @@ -190,7 +197,9 @@ typedef struct log_action_t log_nrec *actnode2; long actx; long acty; - FILLE **actfile; + int actflag; + int actflag2; + FILE **actfile; struct log_tool *acttool; char *actstr; double actval; @@ -241,7 +250,7 @@ typedef struct log_action_t log_hnrec *hnbase; log_htrec *htbase; - log htrec *htlast; + log_htrec *htlast; long fastspeed; long fastmin; @@ -251,7 +260,7 @@ typedef struct log_action_t long singlestepcount; double time; - double prevtime; + double prevtimestep; log_simstatekinds simstate; log_simstatekinds oldsimstate; @@ -271,11 +280,11 @@ typedef struct log_action_t int invisible; /** Gates and wires are invisible */ int textinvisible; /** Lablels and boxes are invisible */ int pnuminvisible; /** Pin numbers are invisible */ - int dotvisible; /** Are "red dots" on or off normally? */ + int dotsvisible; /** Are "red dots" on or off normally? */ int showconflicts; /** Show onlyconflict */ int resetflag; /** "Reset" command has been given */ - int pwrglag; /** Simulator is turned on */ - int intitdone; /** Done with program initialization */ + int pwrflag; /** Simulator is turned on */ + int initdone; /** Done with program initialization */ int refrflag; /** Refreshing all displays */ int busyflag; /** Flag for idling simulations */ @@ -303,7 +312,7 @@ typedef struct log_action_t short cy_max; /** Area covered bu cyrsor */ - FILE **dumfile; + FILE **dumpfile; FILE **tracefile; long rndseed; /** Seed for RAND funtion */ @@ -312,14 +321,14 @@ typedef struct log_action_t enum { - log_host_log; - log_host_loged; - log_host_3; - log_host_4; + log_host_log, + log_host_loged, + log_host_3, + log_host_4 } host; struct log_tool *toolbase; - log_hooks hook; + log_hooks_t hook; log_colorrec color; long curstamp; @@ -333,19 +342,21 @@ typedef struct log_action_t long loadstamp; /** A page was loaded */ long pagestamp[log_maxpages]; long colorstamp; /** Color assignment have changes */ - long markerstampt; /** Page markers moved */ + long resetstamp; /* Simulation has been reset */ + log_regrec *pageregions[log_maxpages]; + long markerstamp; /** Page markers moved */ - log_krec *probeking; - na_strlistrec *actstrlist; - log_kook2 *hook2; + log_krec *probekind; + na_strlist_t *actstrlist; + log_hook2_t *hook2; log_hwrec *probehwire; - log vwrec *probevwire; + log_vwrec *probevwire; long actx2; long acty2; na_quadword actq1; na_quadword actq2; char genfunc [17]; long runstamp; -} log_action_t +} log_action_t; #endif diff --git a/log/src/ana/main.c b/log/src/ana/main.c index 74370685f4b4b1627f81bafd0489a2170cb70e1b..e3b099e39a4d0afe0ffefa8528b0dc187c87a97a 100644 --- a/log/src/ana/main.c +++ b/log/src/ana/main.c @@ -1995,7 +1995,7 @@ void Analog_Cleanup() void Analog_GlobalCommand(int *Found, int *Accepted) { /*Func is command, Funcarg^ is argument*/ long Temp; - log_action *WITH; + log_action_t *WITH; char STR2[256]; @@ -2579,7 +2579,7 @@ static void Memory() Analog_32_action Act; int Timeout; log_grec *WITH; - log_action *WITH1; + log_action_t *WITH1; log_tool *WITH2; Numpages = AnaLogglobals->numpages; diff --git a/log/src/ana/numbers.c b/log/src/ana/numbers.c index 0d2f2514e53abdfc62fdae2135a27e6435294b09..9842655c6bcf803d2f20eced7c666daa460f448d 100644 --- a/log/src/ana/numbers.c +++ b/log/src/ana/numbers.c @@ -61,8 +61,7 @@ typedef struct ICNumbers { /****************************************************************************/ -void GetCnf_Numbers(NewIC) -ICNumbers *NewIC; +void GetCnf_Numbers(ICNumbers *NewIC) { int Found; char Arg[256], Keyword[256]; @@ -85,8 +84,7 @@ ICNumbers *NewIC; } while (Found); } -void initlib_NUMBERS(act) -Analog_32_action *act; +void initlib_NUMBERS(Analog_32_action *act) { AnaCell_rec *NewCell; ICNumbers *NewIC; @@ -114,8 +112,7 @@ Analog_32_action *act; act->kind->y2 = 35; } /*NFET4_Initlib*/ -void Attr_Numbers(act) -Analog_32_action *act; +void Attr_Numbers(Analog_32_action *act) { long Attrnum; log_grec *WITH; @@ -269,8 +266,7 @@ Analog_32_action *act; } } -void Openconfig_Numbers(act) -Analog_32_action *act; +void Openconfig_Numbers(Analog_32_action *act) { long Index; log_grec *WITH; @@ -300,8 +296,7 @@ Analog_32_action *act; } } -void Readgate_Numbers(act) -Analog_32_action *act; +void Readgate_Numbers(Analog_32_action *act) { log_grec *WITH; char STR1[256]; @@ -336,8 +331,7 @@ Analog_32_action *act; } -void Writegate_Numbers(act) -Analog_32_action *act; +void Writegate_Numbers(Analog_32_action *act) { fprintf(*AnaLogglobals->actfile, "%s\n", AnaErase ? " TRUE" : "FALSE"); fprintf(*AnaLogglobals->actfile, "%s\n", AnaExact ? " TRUE" : "FALSE"); @@ -345,8 +339,7 @@ Analog_32_action *act; -void Message_Numbers(act) -Analog_32_action *act; +void Message_Numbers(Analog_32_action *act) { short Tx, Ty; NumbersConst *NumbersVar; @@ -700,8 +693,7 @@ Analog_32_action *act; } -void Refresh_Numbers(act) -Analog_32_action *act; +void Refresh_Numbers(Analog_32_action *act) { short Tx, Ty; Anainstlist *A_Gate; @@ -804,8 +796,7 @@ Analog_32_action *act; } -void Erase_Numbers(act) -Analog_32_action *act; +void Erase_Numbers(Analog_32_action *act) { short Tx, Ty; Anainstlist *A_Gate; @@ -886,8 +877,7 @@ Analog_32_action *act; -void Newgate_Numbers(act) -Analog_32_action *act; +void Newgate_Numbers(Analog_32_action *act) { Anainstlist *A_Gate; AnaCell_rec *Cellptr; @@ -915,8 +905,7 @@ Analog_32_action *act; Openconfig_Numbers(&Newact); } -void Copygate_Numbers(act) -Analog_32_action *act; +void Copygate_Numbers(Analog_32_action *act) { NumbersConst *NumbersVar, *Old_NumbersVar; Anainstlist *A_Gate, *A_Oldgate; @@ -930,8 +919,7 @@ Analog_32_action *act; A_Gate->InstVar = (void *)NumbersVar; } -void Dispose_Numbers(act) -Analog_32_action *act; +void Dispose_Numbers(Analog_32_action *act) { Anainstlist *A_Gate; NumbersConst *NumbersVar; @@ -942,10 +930,9 @@ Analog_32_action *act; } -void Touch_Numbers(act) -Analog_32_action *act; +void Touch_Numbers(Analog_32_action *act) { - log_action *WITH; + log_action_t *WITH; WITH = AnaLogglobals; if (WITH->actx >= -2 && WITH->actx <= 2 && WITH->actx <= 5 && WITH->actx >= -5) @@ -980,8 +967,7 @@ Analog_32_action *act; -void Probe_Numbers(act) -Analog_32_action *act; +void Probe_Numbers(Analog_32_action *act) { char dtstr[256]; char STR2[256]; @@ -1077,8 +1063,7 @@ Analog_32_action *act; /* Library Listing For Cell Numbers */ /*==========================================================================*/ -void Log_numbers_initlib_32(act) -Analog_32_action *act; +void Log_numbers_initlib_32(Analog_32_action *act) { /*Body of procedure*/ diff --git a/log/src/ana/stairs.c b/log/src/ana/stairs.c index 1f5bc5f978c9973cb4cfafe320aeb9ec1cfd99de..896776eb0ae3273b1fac446912ebfea12849f9bb 100644 --- a/log/src/ana/stairs.c +++ b/log/src/ana/stairs.c @@ -750,7 +750,7 @@ Analog_32_action *act; void Touch_Stairs(act) Analog_32_action *act; { - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = AnaLogglobals; diff --git a/log/src/ana/vdiff.c b/log/src/ana/vdiff.c index 24af02ac561081871c221fba1a10e1749fdf84a3..76a51167bc217e971cdcd3a6e97435d776748295 100644 --- a/log/src/ana/vdiff.c +++ b/log/src/ana/vdiff.c @@ -83,9 +83,7 @@ typedef struct ICVdiff { -void Switchfill(Inst, Erase) -log_grec *Inst; -int Erase; +void Switchfill(log_grec *Inst, int Erase) { short LLx, LLy, URx, URy; @@ -108,9 +106,7 @@ int Erase; (*AnaLogglobals->hook.unhidecursor)(); } -void Limitfill(Inst, Limitflag, Erase) -log_grec *Inst; -int Limitflag, Erase; +void Limitfill(log_grec *Inst, int Limitflag, int Erase) { short LLx, LLy, URx, URy; @@ -134,10 +130,7 @@ int Limitflag, Erase; } -double Pulsemaker(Inst, Ftime, First) -log_grec *Inst; -double Ftime; -int First; +double Pulsemaker(log_grec *Inst, double Ftime, int First) { double Result; int Found; @@ -193,8 +186,7 @@ int First; /* Procedure To Simulate Cell In Algorithm */ /****************************************************************************/ -void Ex_Vdiff(act) -Analog_32_action *act; +void Ex_Vdiff(Analog_32_action *act) { /*Vdifferent*/ double MinI1, MinI2, dI1dV1, dI1dV2, dI2dV1, dI2dV2; @@ -271,8 +263,7 @@ Analog_32_action *act; /****************************************************************************/ -void Iin_Vdiff(act) -Analog_32_action *act; +void Iin_Vdiff(Analog_32_action *act) { /*Vdifferent*/ AnaExt_rec *Pin1Ptr, *Pin2Ptr; @@ -365,8 +356,7 @@ Analog_32_action *act; } /*Iin_Vdiff*/ -void GetCnf_Vdiff(NewIC) -ICVdiff *NewIC; +void GetCnf_Vdiff(ICVdiff *NewIC) { int Found; char Arg[256], Keyword[256]; @@ -532,8 +522,7 @@ ICVdiff *NewIC; /* Installation Procedure */ /****************************************************************************/ -void initlib_Vdiff(act) -Analog_32_action *act; +void initlib_Vdiff(Analog_32_action *act) { /*Vdifferent*/ AnaCell_rec *NewCell; @@ -574,9 +563,7 @@ Analog_32_action *act; -int Vdiffcheck(Inst, Attrnum) -log_grec *Inst; -long Attrnum; +int Vdiffcheck(log_grec *Inst, long Attrnum) { int Result; VdiffConst *VdiffVar; @@ -680,8 +667,7 @@ long Attrnum; } -void Attr_Vdiff(act) -Analog_32_action *act; +void Attr_Vdiff(Analog_32_action *act) { long Attrnum; @@ -693,8 +679,7 @@ Analog_32_action *act; } -void Newgate_Vdiff(act) -Analog_32_action *act; +void Newgate_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar; Anainstlist *A_Gate; @@ -742,8 +727,7 @@ Analog_32_action *act; } } -void Copygate_Vdiff(act) -Analog_32_action *act; +void Copygate_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar, *Old_Vdiffvar; Anainstlist *A_Gate, *A_Oldgate; @@ -758,8 +742,7 @@ Analog_32_action *act; } -void Dispose_Vdiff(act) -Analog_32_action *act; +void Dispose_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar; Anainstlist *A_Gate; @@ -770,8 +753,7 @@ Analog_32_action *act; AnaCapDispose(act->inst); /*7*/ } -void Readgate_Vdiff(act) -Analog_32_action *act; +void Readgate_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar; Anainstlist *A_Gate; @@ -803,8 +785,7 @@ Analog_32_action *act; VdiffVar->Reset_Freeze = (*STR1 == 'T' || *STR1 == 't'); } -void Writegate_Vdiff(act) -Analog_32_action *act; +void Writegate_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar; Anainstlist *A_Gate; @@ -827,8 +808,7 @@ Analog_32_action *act; -void Reset_Vdiff(act) -Analog_32_action *act; +void Reset_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar; Anainstlist *A_Gate; @@ -848,8 +828,7 @@ Analog_32_action *act; } } -void Set_Vdiff(act) -Analog_32_action *act; +void Set_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar; Anainstlist *A_Gate; @@ -861,8 +840,7 @@ Analog_32_action *act; VdiffVar->Reset_Freeze = act->inst->attr[N_Freeze - 1].UU.b; } -void Clear_Vdiff(act) -Analog_32_action *act; +void Clear_Vdiff(Analog_32_action *act) { VdiffConst *VdiffVar; Anainstlist *A_Gate; @@ -878,8 +856,7 @@ Analog_32_action *act; VdiffVar->Reset_Freeze = ICptr->ICFreeze; } -void PreUpdate_VDiff(act) -Analog_32_action *act; +void PreUpdate_VDiff(Analog_32_action *act) { VdiffConst *VDiffVar; Anainstlist *A_Gate; @@ -898,8 +875,7 @@ Analog_32_action *act; } -void Update_VDiff(act) -Analog_32_action *act; +void Update_VDiff(Analog_32_action *act) { VdiffConst *VDiffVar; Anainstlist *A_Gate; @@ -915,8 +891,7 @@ Analog_32_action *act; VDiffVar->Timez += AnaDtlast; } -void Display_VDiff(act) -Analog_32_action *act; +void Display_VDiff(Analog_32_action *act) { VdiffConst *VDiffVar; Anainstlist *A_Gate; @@ -946,10 +921,9 @@ Analog_32_action *act; -void Touch_Vdiff(act) -Analog_32_action *act; +void Touch_Vdiff(Analog_32_action *act) { - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = AnaLogglobals; @@ -963,8 +937,7 @@ Analog_32_action *act; } -void Erase_Vdiff(Inst) -log_grec *Inst; +void Erase_Vdiff(log_grec *Inst) { VdiffConst *VDiffVar; Anainstlist *A_Gate; @@ -975,8 +948,7 @@ log_grec *Inst; Limitfill(Inst, VDiffVar->Limit, true); } -void Refresh_Vdiff(Inst) -log_grec *Inst; +void Refresh_Vdiff(log_grec *Inst) { VdiffConst *VDiffVar; Anainstlist *A_Gate; @@ -987,8 +959,7 @@ log_grec *Inst; Limitfill(Inst, VDiffVar->Limit, false); } -void Probe_Vdiff(act) -Analog_32_action *act; +void Probe_Vdiff(Analog_32_action *act) { Anainstlist *A_Gate; VdiffConst *VdiffVar; @@ -1048,8 +1019,7 @@ Analog_32_action *act; /*=============================================================================*/ -void Log_vdiff_initlib_32(act) -Analog_32_action *act; +void Log_vdiff_initlib_32(Analog_32_action *act) { /*Main Procedure*/ diff --git a/log/src/ana/vswitch.c b/log/src/ana/vswitch.c index 8ff5bcdd7d34feba6e79bb9e0c86889ef01c7bc3..e0434bf4ee791a4282c985d5ce204d49401d1660 100644 --- a/log/src/ana/vswitch.c +++ b/log/src/ana/vswitch.c @@ -80,9 +80,7 @@ typedef struct ICVswitch { -void Vswitchfill(Inst, State, Erase) -log_grec *Inst; -int State, Erase; +void Vswitchfill(log_grec *Inst, int State, int Erase) { short LLx, LLy, URx, URy; @@ -105,9 +103,7 @@ int State, Erase; (*AnaLogglobals->hook.unhidecursor)(); } -void Limitfill(Inst, Limitflag, Erase) -log_grec *Inst; -int Limitflag, Erase; +void Limitfill(log_grec *Inst, int Limitflag, int Erase) { short LLx, LLy, URx, URy; @@ -131,11 +127,7 @@ int Limitflag, Erase; } -double Bistablemaker(Inst, time, State, Ex, OldVideal) -log_grec *Inst; -double time; -int State, Ex; -double OldVideal; +double Bistablemaker(log_grec *Inst, double time, int State, int Ex, double OldVideal) { double Newtime, Ratio; @@ -161,11 +153,7 @@ double OldVideal; } -double Monostablemaker(Inst, time, State, Ex, OldVideal) -log_grec *Inst; -double time; -int State, Ex; -double OldVideal; +double Monostablemaker(log_grec *Inst, double time, int State, int Ex, double OldVideal) { double Newtime, Ratio; @@ -201,8 +189,7 @@ double OldVideal; /* Procedure To Simulate Cell In Algorithm */ /****************************************************************************/ -void Ex_Vswitch(act) -Analog_32_action *act; +void Ex_Vswitch(Analog_32_action *act) { double MinI1, dI1dV1; AnaExt_rec *Pin1Ptr; @@ -249,8 +236,7 @@ Analog_32_action *act; /****************************************************************************/ -void Iin_Vswitch(act) -Analog_32_action *act; +void Iin_Vswitch(Analog_32_action *act) { AnaExt_rec *Pin1Ptr; double VPin1; @@ -292,8 +278,7 @@ Analog_32_action *act; } /*Iin_Vswitch*/ -void GetCnf_Vswitch(NewIC) -ICVswitch *NewIC; +void GetCnf_Vswitch(ICVswitch *NewIC) { int Found; char Arg[256], Keyword[256]; @@ -415,8 +400,7 @@ ICVswitch *NewIC; /* Installation Procedure */ /****************************************************************************/ -void initlib_Vswitch(act) -Analog_32_action *act; +void initlib_Vswitch(Analog_32_action *act) { AnaCell_rec *NewCell; ICVswitch *NewIC; @@ -448,8 +432,7 @@ Analog_32_action *act; } /*Vswitch_Initlib*/ -void ResetInit_Vswitch(act) -Analog_32_action *act; +void ResetInit_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -474,10 +457,7 @@ Analog_32_action *act; } -int Vswitchcheck(Inst, Attrnum, act) -log_grec *Inst; -long Attrnum; -Analog_32_action *act; +int Vswitchcheck(log_grec *Inst, long Attrnum, Analog_32_action *act) { int Result; VswitchConst *VswitchVar; @@ -545,8 +525,7 @@ Analog_32_action *act; } -void Attr_Vswitch(act) -Analog_32_action *act; +void Attr_Vswitch(Analog_32_action *act) { long Attrnum; @@ -559,8 +538,7 @@ Analog_32_action *act; -void Newgate_Vswitch(act) -Analog_32_action *act; +void Newgate_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -603,8 +581,7 @@ Analog_32_action *act; } } -void Copygate_Vswitch(act) -Analog_32_action *act; +void Copygate_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar, *Old_Vswitchvar; Anainstlist *A_Gate, *A_Oldgate; @@ -619,8 +596,7 @@ Analog_32_action *act; } -void Dispose_Vswitch(act) -Analog_32_action *act; +void Dispose_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -631,8 +607,7 @@ Analog_32_action *act; AnaCapDispose(act->inst); /*7*/ } -void Readgate_Vswitch(act) -Analog_32_action *act; +void Readgate_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -666,8 +641,7 @@ Analog_32_action *act; VswitchVar->Videal = VswitchVar->OldVideal; } -void Writegate_Vswitch(act) -Analog_32_action *act; +void Writegate_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -689,8 +663,7 @@ Analog_32_action *act; -void Reset_Vswitch(act) -Analog_32_action *act; +void Reset_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -712,8 +685,7 @@ Analog_32_action *act; } -void Set_Vswitch(act) -Analog_32_action *act; +void Set_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -728,8 +700,7 @@ Analog_32_action *act; } -void PreUpdate_Vswitch(act) -Analog_32_action *act; +void PreUpdate_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -753,8 +724,7 @@ Analog_32_action *act; VswitchVar->NewState = VswitchVar->State; } -void Update_Vswitch(act) -Analog_32_action *act; +void Update_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -771,8 +741,7 @@ Analog_32_action *act; VswitchVar->Limit = VswitchVar->NewLimit; } -void Display_Vswitch(act) -Analog_32_action *act; +void Display_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -792,12 +761,11 @@ Analog_32_action *act; } -void Touch_Vswitch(act) -Analog_32_action *act; +void Touch_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = AnaLogglobals; @@ -822,8 +790,7 @@ Analog_32_action *act; AnaChanged = true; } -void Refresh_Vswitch(act) -Analog_32_action *act; +void Refresh_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -834,8 +801,7 @@ Analog_32_action *act; Limitfill(act->inst, VswitchVar->Limit, false); } -void Erase_Vswitch(act) -Analog_32_action *act; +void Erase_Vswitch(Analog_32_action *act) { VswitchConst *VswitchVar; Anainstlist *A_Gate; @@ -847,8 +813,7 @@ Analog_32_action *act; } -void Probe_Vswitch(act) -Analog_32_action *act; +void Probe_Vswitch(Analog_32_action *act) { Anainstlist *A_Gate; VswitchConst *VswitchVar; @@ -897,8 +862,7 @@ Analog_32_action *act; /*=============================================================================*/ -void Log_vswitch_initlib_32(act) -Analog_32_action *act; +void Log_vswitch_initlib_32(Analog_32_action *act) { /*Main Procedure*/ diff --git a/log/src/diggates.c b/log/src/diggates.c index 87cd122a6598ac9d3826895f6f4798eb2453ea9e..8b25f306991a5968ebb5a50cad1c49ac8d206692 100644 --- a/log/src/diggates.c +++ b/log/src/diggates.c @@ -60,7 +60,7 @@ long n; struct LOC_Log_mygates_sram8k *LINK; { log_16_action *WITH; - log_action *WITH1; + log_action_t *WITH1; log_grec *WITH2; WITH = LINK->act; @@ -90,7 +90,7 @@ long n; struct LOC_Log_mygates_sram8k *LINK; { log_16_action *WITH; - log_action *WITH1; + log_action_t *WITH1; log_grec *WITH2; WITH = LINK->act; @@ -120,7 +120,7 @@ struct LOC_Log_mygates_sram8k *LINK; char buf[256]; FILE *textfile; log_16_action *WITH; - log_action *WITH1; + log_action_t *WITH1; log_grec *WITH2; log_gattrrec *WITH3; long FORLIM; @@ -238,7 +238,7 @@ log_16_action *act_; uchar *ram2; long addr, ramval; log_16_action *WITH; - log_action *WITH1; + log_action_t *WITH1; log_grec *WITH2; long FORLIM; int TEMP; @@ -410,7 +410,7 @@ struct LOC_Log_mygates_ascdisp *LINK; { short tx, ty; dispinfo *WITH; - log_action *WITH1; + log_action_t *WITH1; WITH = LINK->dip; WITH1 = LINK->act->lact; @@ -426,7 +426,7 @@ struct LOC_Log_mygates_ascdisp *LINK; { long xorg, yorg; dispinfo *WITH; - log_action *WITH1; + log_action_t *WITH1; WITH = LINK->dip; WITH1 = LINK->act->lact; @@ -444,7 +444,7 @@ struct LOC_Log_mygates_ascdisp *LINK; { long xorg, yorg; dispinfo *WITH; - log_action *WITH1; + log_action_t *WITH1; WITH = LINK->dip; WITH1 = LINK->act->lact; @@ -461,7 +461,7 @@ struct LOC_Log_mygates_ascdisp *LINK; { long x, y, yy, xorg, yorg; dispinfo *WITH; - log_action *WITH1; + log_action_t *WITH1; char STR1[2]; WITH = LINK->dip; @@ -490,7 +490,7 @@ struct LOC_Log_mygates_ascdisp *LINK; void cleardisp(LINK) struct LOC_Log_mygates_ascdisp *LINK; { - log_action *WITH; + log_action_t *WITH; dispinfo *WITH1; WITH = LINK->act->lact; @@ -504,7 +504,7 @@ struct LOC_Log_mygates_ascdisp *LINK; void scrollup(LINK) struct LOC_Log_mygates_ascdisp *LINK; { - log_action *WITH; + log_action_t *WITH; dispinfo *WITH1; WITH = LINK->act->lact; @@ -520,7 +520,7 @@ char ch; struct LOC_Log_mygates_ascdisp *LINK; { short attrnum; - log_action *WITH; + log_action_t *WITH; dispinfo *WITH1; WITH = LINK->act->lact; @@ -626,7 +626,7 @@ log_16_action *act_; dispinfo *dip2; m_chpicrec **savef; log_16_action *WITH; - log_action *WITH1; + log_action_t *WITH1; log_grec *WITH2; V.act = act_; @@ -712,7 +712,7 @@ log_16_action *act; char ch; long keyx, keyy; int asciimode; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; int TEMP; diff --git a/log/src/log.c b/log/src/log.c index d57983122b6d6d4dffa8491d5fe4d53a36d816e1..c90bf924f812237a711198f5938742afe37dd419 100644 --- a/log/src/log.c +++ b/log/src/log.c @@ -247,7 +247,7 @@ typedef uchar igrouparray[log_million]; typedef struct logmenurec { char name[17]; char cmd[33]; - int *bool; + int *bool_; } logmenurec; /* Pop-up menu options */ typedef logmenurec logmenutype[8]; @@ -415,7 +415,7 @@ static const rabmustype discomadness = { -static log_action gg; /* External global variables */ +static log_action_t gg; /* External global variables */ static short cursx, cursy; /* Current position of cursor */ static short cursx1, cursy1; /* Wire starting point */ @@ -450,7 +450,7 @@ static log_krec *kind[maxmaxkinds]; /* Kind of gate in each catalog space */ static kindgrouptype kindgroup; /* Kind of gate in each menu-area space */ static kindgrouptype kindsig; static kindattrtype kindattr; -static na_strlist *gatefilenames; +static na_strlist_t *gatefilenames; static short maxkinds, catwidth; static catboxrec *catboxes; static librstrrec *librstrs; @@ -486,7 +486,7 @@ static long htcount; /* Number of timesteps in list */ static short hncount; /* Number of names in list */ static short hnocount; /* Old number of names in list */ static short histtrig; /* Number of signal which triggers history */ -static na_strlist *histlbl; +static na_strlist_t *histlbl; static short histnumattrs; static log_kattrrec *histkattr; static log_gattrrec *histgattr; @@ -503,11 +503,11 @@ static log_nrec *nodeconflictbase; /* Node conflict list */ static log_grec *gateconflictbase; /* Gate conflict list */ static cnfrec *cnfbase; /* List of tool configuration lines */ -static na_strlist *colorbase; /* List of configured colors */ +static na_strlist_t *colorbase; /* List of configured colors */ static macrorec *macrobase; /* List of macro keys */ -static na_strlist *thingstodo, *nexttodo; /* List of delayed commands */ -static na_strlist *messages; /* List of delayed messages */ -static na_strlist *commandlist; /* List of tool-activation commands */ +static na_strlist_t *thingstodo, *nexttodo; /* List of delayed commands */ +static na_strlist_t *messages; /* List of delayed messages */ +static na_strlist_t *commandlist; /* List of tool-activation commands */ static char modename[9]; /* Word in 'mode' area of menu */ static int modeflag; /* Mode area contains a word */ @@ -2058,12 +2058,12 @@ short xx, yy; static void parselabel(lbl, numattrs, attr) -na_strlist **lbl; +na_strlist_t **lbl; short *numattrs; log_kattrrec **attr; { short j, j1, j2, j3, yy, maxx; - na_strlist *l1, *l2, *l3, *attrnames; + na_strlist_t *l1, *l2, *l3, *attrnames; char buf[256]; int haveprec; log_kattrrec *WITH; @@ -2365,7 +2365,7 @@ char *name_; char savefunc[17]; char saveargs[256]; char suffix[51]; - void (*proc) (log_action *act); + void (*proc) (log_action_t *act); int ready; cnfrec *cnfp; @@ -4622,7 +4622,7 @@ static void refreshsoon() static void message(msg) char *msg; { - na_strlist *l1; + na_strlist_t *l1; if (!gg.initdone) { l1 = strlist_append(&messages, msg); @@ -4652,7 +4652,7 @@ char *msg; static void vmessage(msg) char *msg; { - na_strlist *l1; + na_strlist_t *l1; if (gg.initdone) { if (gg.verbose || tempverbose) @@ -6201,7 +6201,7 @@ log_brec **b; static void defsimulator(act) -log_action *act; +log_action_t *act; { switch (act->action) { @@ -7363,7 +7363,7 @@ static void doimmedfunction() { log_tool *tp; char cmd[256]; - na_strlist *l1; + na_strlist_t *l1; if (*gg.func != '\0') { l1 = strlist_find(commandlist, gg.func); @@ -7548,7 +7548,7 @@ static void trykbd() int moving; char ch; macrorec *mp; - na_strlist *todo; + na_strlist_t *todo; char TEMP; if (gg.t.near_ && !gg.t0.near_ && gg.showpage >= 0) { @@ -12192,7 +12192,7 @@ int loadit; char n[9]; short i, i0, i00, j, j0, j00, j000, count; long j1; - na_strlist *l2; + na_strlist_t *l2; log_grec *g; char buf[256]; char ch, ch2, curcol; @@ -12489,8 +12489,8 @@ int loadit; } if (WITH->numpins != 0) { WITH->pin = (log_pinrec *)Malloc(WITH->numpins * sizeof(log_pinrec)); - WITH->pinnames = (na_strlist **) - Malloc(WITH->numpins * sizeof(na_strlist *)); + WITH->pinnames = (na_strlist_t **) + Malloc(WITH->numpins * sizeof(na_strlist_t *)); FORLIM1 = WITH->numpins; for (j = 0; j < FORLIM1; j++) { readint(&V); @@ -12649,9 +12649,9 @@ short *gtype; static void getgategroup(grp) -na_strlist *grp; +na_strlist_t *grp; { - na_strlist *l1; + na_strlist_t *l1; short pos, i, count; int done; catboxrec *cb; @@ -12769,10 +12769,10 @@ char *name; static void showgateinfo(info, g) -na_strlist *info; +na_strlist_t *info; log_grec *g; { - na_strlist *l1; + na_strlist_t *l1; long width, height, i; short gx, gy, gx1, gy1, gx2, gy2, mx, my, y, z; log_krec *WITH; @@ -12890,7 +12890,7 @@ static void showgatedef(k, g) log_krec *k; log_grec *g; { - na_strlist *l1; + na_strlist_t *l1; char STR1[42]; gg.actstrlist = NULL; @@ -13238,7 +13238,7 @@ int librmode; uchar ch; log_krec *k; char bot1[256], bot2[256], bot3[256]; - na_strlist *lp; + na_strlist_t *lp; int flag, oo, done, botflag, refrflag; long bottime; librstrrec *lsp; @@ -13592,7 +13592,7 @@ struct LOC_editattrs { log_gattrrec *gattr; short numattrs; log_kattrrec *kattr; - na_strlist *lbl; + na_strlist_t *lbl; char name[256]; void (*chproc) (); log_tool *tool; @@ -13606,7 +13606,7 @@ long i; struct LOC_editattrs *LINK; { long j; - na_strlist *l1; + na_strlist_t *l1; long FORLIM; l1 = LINK->lbl; @@ -13647,7 +13647,7 @@ short i; int highlight; struct LOC_editattrs *LINK; { - na_strlist *l1; + na_strlist_t *l1; log_kattrrec *WITH; char STR1[81]; char STR4[256]; @@ -13849,14 +13849,14 @@ static void editattrs(gattr_, numattrs_, kattr_, lbl_, name_, proc, chproc_, log_gattrrec *gattr_; short numattrs_; log_kattrrec *kattr_; -na_strlist *lbl_; +na_strlist_t *lbl_; char *name_; void (*proc) (), (*chproc_) (), (*relproc) (); long *attrstamp; { struct LOC_editattrs V; short i, i1, p0, olday, ytotal; - na_strlist *l1; + na_strlist_t *l1; long j, j1, savei; double r1, saver; char ch; @@ -14368,7 +14368,7 @@ static void editattrsx(gattr, numattrs, kattr, lbl, name, proc, chproc, log_gattrrec *gattr; short numattrs; log_kattrrec *kattr; -na_strlist *lbl; +na_strlist_t *lbl; char *name; void (*proc) (), (*chproc) (), (*relproc) (); { @@ -14511,7 +14511,7 @@ char *buf; int saveb, saveb2; char savebuf[256]; long j, j1; - na_strlist *l1; + na_strlist_t *l1; log_gattrrec *WITH; char STR1[256]; char *STR2; @@ -15093,11 +15093,11 @@ short x, y; static void findattrnum2(numattrs, kattr, lbl, name, kinds, num) short numattrs; log_kattrrec *kattr; -na_strlist *lbl; +na_strlist_t *lbl; char *name, *kinds; short *num; { - na_strlist *l1; + na_strlist_t *l1; if (strsubset(name, "0123456789")) { if (*name == '\0') @@ -15109,7 +15109,7 @@ short *num; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) - l1 = strlist_find((na_strlist *)l1->value, name); + l1 = strlist_find((na_strlist_t *)l1->value, name); if (l1 != NULL) *num = (long)l1->value; else @@ -15134,11 +15134,11 @@ short *num; static void findattrname2(numattrs, kattr, lbl, num, name) short numattrs; log_kattrrec *kattr; -na_strlist *lbl; +na_strlist_t *lbl; short num; char *name; { - na_strlist *l1; + na_strlist_t *l1; if (num < 1 || num > numattrs) { *name = '\0'; @@ -15148,7 +15148,7 @@ char *name; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) { - l1 = (na_strlist *)l1->value; + l1 = (na_strlist_t *)l1->value; while (l1 != NULL && (long)l1->value != num) l1 = l1->next; } @@ -17194,19 +17194,19 @@ struct LOC_savepage *LINK; return Result; } -na_strlist *attrname(i, lbl, LINK) +na_strlist_t *attrname(i, lbl, LINK) short i; -na_strlist *lbl; +na_strlist_t *lbl; struct LOC_savepage *LINK; { - na_strlist *l1; + na_strlist_t *l1; l1 = lbl; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 == NULL) return l1; - l1 = (na_strlist *)l1->value; + l1 = (na_strlist_t *)l1->value; while (l1 != NULL && (long)l1->value != i) l1 = l1->next; return l1; @@ -17216,7 +17216,7 @@ short countattrs(gattr, numattrs, kattr, lbl, LINK) log_gattrrec *gattr; short numattrs; log_kattrrec *kattr; -na_strlist *lbl; +na_strlist_t *lbl; struct LOC_savepage *LINK; { short i, j; @@ -17240,11 +17240,11 @@ FILE **f; log_gattrrec *gattr; short numattrs; log_kattrrec *kattr; -na_strlist *lbl; +na_strlist_t *lbl; struct LOC_savepage *LINK; { short num, i; /*reads maxunat from last call to countattrs*/ - na_strlist *l1; + na_strlist_t *l1; char STR2[81]; num = countattrs(gattr, numattrs, kattr, lbl, LINK); @@ -17907,19 +17907,19 @@ FILE **f; log_gattrrec **gattr; short numattrs; log_kattrrec *kattr; -na_strlist *lbl; +na_strlist_t *lbl; short count; { short j, jj; char ch; char buf[256]; - na_strlist *l1, *names; + na_strlist_t *l1, *names; l1 = lbl; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) - names = (na_strlist *)l1->value; + names = (na_strlist_t *)l1->value; else names = NULL; for (j = 1; j <= count; j++) { @@ -18084,7 +18084,7 @@ struct LOC_loadpage *LINK; /* variables for initialize: */ struct LOC_initialize { short j; - na_strlist *loadgates, *logmenu; + na_strlist_t *loadgates, *logmenu; char cmdbuf[81]; cnfrec *cnflast; } ; @@ -19771,7 +19771,7 @@ short num; y = line1 + 2; for (j = i * 2 - 2; j < i * 2; j++) { if (*menu[j].name != '\0') { - if (menu[j].bool != NULL && *menu[j].bool) + if (menu[j].bool_ != NULL && *menu[j].bool_) m_color((long)gg.color.selword); else if (menu[j].name[0] == '*') m_color((long)gg.color.redword); @@ -19921,7 +19921,7 @@ char *name_; short *val, def; { char name[256]; - na_strlist *cp; + na_strlist_t *cp; char STR2[256]; char STR3[256]; @@ -20096,56 +20096,56 @@ char *name; -static void definemenu(num, part, name, cmd, bool) +static void definemenu(num, part, name, cmd, bool_) short num, part; char *name, *cmd; -short bool; +short bool_; { logmenurec *menu; menu = popupmenus[num - 1]; strcpy(menu[part - 1].name, name); strcpy(menu[part - 1].cmd, cmd); - switch (bool) { + switch (bool_) { case 1: - menu[part - 1].bool = &gg.invisible; + menu[part - 1].bool_ = &gg.invisible; break; case 2: - menu[part - 1].bool = &gg.textinvisible; + menu[part - 1].bool_ = &gg.textinvisible; break; case 3: - menu[part - 1].bool = &gg.markers; + menu[part - 1].bool_ = &gg.markers; break; case 4: - menu[part - 1].bool = &vlsi; + menu[part - 1].bool_ = &vlsi; break; case 5: - menu[part - 1].bool = &popup_grid; + menu[part - 1].bool_ = &popup_grid; break; case 6: - menu[part - 1].bool = &gg.probemode; + menu[part - 1].bool_ = &gg.probemode; break; case 7: - menu[part - 1].bool = &gg.glowmode; + menu[part - 1].bool_ = &gg.glowmode; break; case 8: - menu[part - 1].bool = &snapflag; + menu[part - 1].bool_ = &snapflag; break; case 9: - menu[part - 1].bool = &gg.pwrflag; + menu[part - 1].bool_ = &gg.pwrflag; break; default: - menu[part - 1].bool = NULL; + menu[part - 1].bool_ = NULL; break; } } @@ -20201,7 +20201,7 @@ static void docnffunction() char arg[256]; long i, j, k; char ch; - na_strlist *cp; + na_strlist_t *cp; long clrarr[3]; int flag; librstrrec *lsp, **lspp; @@ -20806,7 +20806,7 @@ static void inithooks() gg.hook.setupregion = setupregion; gg.hook.stamp = stamp; gg.hook.noclip = clipoff; - gg.hook2 = (log_hook2 *)Malloc(sizeof(log_hook2)); + gg.hook2 = (log_hook2_t *)Malloc(sizeof(log_hook2_t)); gg.hook2->getnodeval = getnodeval; gg.hook2->solderat = solderat; gg.hook2->unsolderwires = unsolderwires; @@ -20842,7 +20842,7 @@ static void inithooks() /* variables for initialize: */ struct LOC_initialize { short j; - na_strlist *loadgates, *logmenu; + na_strlist_t *loadgates, *logmenu; char cmdbuf[81]; cnfrec *cnflast; } ; @@ -20870,7 +20870,7 @@ char *fn_; struct LOC_initialize *LINK; { char fn[256]; - na_strlist *l1; + na_strlist_t *l1; strcpy(fn, fn_); newci_fixfname(fn, "gate", ""); @@ -20917,7 +20917,7 @@ struct LOC_initialize *LINK; FILE *tx; char txbuf[256], txarg[256], txarg2[256]; int erasegates, eraseload, erasemenu; - na_strlist *l1, *l2; + na_strlist_t *l1, *l2; log_tool *tp; cnfrec *cnfp; char *TEMP; @@ -21090,7 +21090,7 @@ struct LOC_initialize *LINK; l1 = strlist_append(&LINK->loadgates, ""); l1->value = (na_long)NULL; while (*txarg != '\0') { - l2 = strlist_append((na_strlistrec **)(&l1->value), txarg); + l2 = strlist_append((na_strlist_t **)(&l1->value), txarg); getword(txbuf, txarg); } continue; @@ -21188,7 +21188,7 @@ static void initialize() short i, k, curgate; short gptr[maxgatesfiles], ggroup[maxgatesfiles], gsize[maxgatesfiles]; char gname[maxgatesfiles][9]; - na_strlist *l1, *l2; + na_strlist_t *l1, *l2; char s[256]; int flag; char cnfname[256]; @@ -21707,7 +21707,7 @@ static void initialize() l1 = V.loadgates; while (l1 != NULL && i != 0) { if (*l1->s == '\0') - getgategroup((na_strlistrec *)l1->value); + getgategroup((na_strlist_t *)l1->value); else i = readlibrary(l1->s); l1 = l1->next; diff --git a/log/src/log_action.h b/log/src/log_action.h index b0fbfc0177d56255b9d415c6d621c91b0584947a..f4118fb15f181a6bfe8a51296abf648b3e3ead01 100644 --- a/log/src/log_action.h +++ b/log/src/log_action.h @@ -1,6 +1,9 @@ #ifndef LOG_ACTION_H #define LOG_ACTION_H +#include"logdef.h" +#include<limits.h> + typedef enum { act_init, @@ -31,10 +34,14 @@ typedef enum act_readgate, act_connectgate, act_disconnectgate, + act_configgate, + act_configchgate, + act_configrelgate, + act_confignode, act_configchnode, act_configrelnode, act_confighist, - act_confighhist, + act_configchhist, act_configrelhist, act_newkind, act_disposekind, @@ -137,8 +144,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_strlistrec **lbl, short *numattrs, log_kattrrec **attr); - void (*editattrs) (log_gattrrec *gattr, int numattrs, log_kattrrec *kattr, na_strlistrec *lbl, + 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, 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); @@ -175,8 +182,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_strlistrec *lbl, char *name, char *kinds, short *num); - void (*findattrname2) (int numattrs, log_kattrrec *kattr, na_strlistrec *lbl, int num, char *name); + 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 (*showpinname) (log_grec *g, int i, int c, char *name); } log_hook2_t; @@ -190,7 +197,9 @@ typedef struct log_action_t log_nrec *actnode2; long actx; long acty; - FILLE **actfile; + int actflag; + int actflag2; + FILE **actfile; struct log_tool *acttool; char *actstr; double actval; @@ -241,7 +250,7 @@ typedef struct log_action_t log_hnrec *hnbase; log_htrec *htbase; - log htrec *htlast; + log_htrec *htlast; long fastspeed; long fastmin; @@ -251,7 +260,7 @@ typedef struct log_action_t long singlestepcount; double time; - double prevtime; + double prevtimestep; log_simstatekinds simstate; log_simstatekinds oldsimstate; @@ -271,11 +280,11 @@ typedef struct log_action_t int invisible; /** Gates and wires are invisible */ int textinvisible; /** Lablels and boxes are invisible */ int pnuminvisible; /** Pin numbers are invisible */ - int dotvisible; /** Are "red dots" on or off normally? */ + int dotsvisible; /** Are "red dots" on or off normally? */ int showconflicts; /** Show onlyconflict */ int resetflag; /** "Reset" command has been given */ - int pwrglag; /** Simulator is turned on */ - int intitdone; /** Done with program initialization */ + int pwrflag; /** Simulator is turned on */ + int initdone; /** Done with program initialization */ int refrflag; /** Refreshing all displays */ int busyflag; /** Flag for idling simulations */ @@ -303,7 +312,7 @@ typedef struct log_action_t short cy_max; /** Area covered bu cyrsor */ - FILE **dumfile; + FILE **dumpfile; FILE **tracefile; long rndseed; /** Seed for RAND funtion */ @@ -312,14 +321,14 @@ typedef struct log_action_t enum { - log_host_log; - log_host_loged; - log_host_3; - log_host_4; + log_host_log, + log_host_loged, + log_host_3, + log_host_4 } host; struct log_tool *toolbase; - log_hooks hook; + log_hooks_t hook; log_colorrec color; long curstamp; @@ -333,19 +342,21 @@ typedef struct log_action_t long loadstamp; /** A page was loaded */ long pagestamp[log_maxpages]; long colorstamp; /** Color assignment have changes */ - long markerstampt; /** Page markers moved */ + long resetstamp; /* Simulation has been reset */ + log_regrec *pageregions[log_maxpages]; + long markerstamp; /** Page markers moved */ - log_krec *probeking; - na_strlistrec *actstrlist; - log_kook2 *hook2; + log_krec *probekind; + na_strlist_t *actstrlist; + log_hook2_t *hook2; log_hwrec *probehwire; - log vwrec *probevwire; + log_vwrec *probevwire; long actx2; long acty2; na_quadword actq1; na_quadword actq2; char genfunc [17]; long runstamp; -} log_action_t +} log_action_t; #endif diff --git a/log/src/logcom.c b/log/src/logcom.c index bb3085dadb630dfe2c43cfebe2ac74bce09d2fbc..5c69a8c46cf3610f17f3648319cc040cc702248b 100644 --- a/log/src/logcom.c +++ b/log/src/logcom.c @@ -88,7 +88,7 @@ typedef struct timeattrrec { typedef timeattrrec timeattrarr[timeattrs]; -typedef void (*procarray[256]) (log_action *act); +typedef void (*procarray[256]) (log_action_t *act); @@ -101,14 +101,14 @@ static long oldperftime, perftime, watchtime; static int watchflag, drawtime, refrtime; static long numprocs_7; -static void (**procs_7) (log_action *act); +static void (**procs_7) (log_action_t *act); static log_krec *unfoundkind; static int unfoundshown; void Log_0_proc(act) -log_action *act; +log_action_t *act; { switch (act->action) { @@ -126,11 +126,11 @@ log_action *act; static void edit_1(proc, proclen, sl, mode) uchar *proc; long *proclen; -na_strlist **sl; +na_strlist_t **sl; long mode; { long i; - na_strlist *l1; + na_strlist_t *l1; char buf[9]; char ch; char STR1[22]; @@ -193,7 +193,7 @@ long mode; } void Log_1_proc(act) -log_action *act; +log_action_t *act; { switch (act->action) { @@ -218,7 +218,7 @@ log_action *act; /* variables for Log_7_time: */ struct LOC_Log_7_time { - log_action *act; + log_action_t *act; short x, y; } ; @@ -294,12 +294,12 @@ struct LOC_Log_7_time *LINK; } void Log_7_time(act_) -log_action *act_; +log_action_t *act_; { struct LOC_Log_7_time V; short i, i1, i2, i3; int refr, draw; - log_action *WITH; + log_action_t *WITH; char STR1[256]; char STR2[256], STR3[256]; @@ -524,7 +524,7 @@ log_action *act_; void Log_2_proc(act) -log_action *act; +log_action_t *act; { log_grec *g; @@ -584,11 +584,11 @@ uchar *proc; static void edit_7(proc, proclen, sl, mode) uchar *proc; long *proclen; -na_strlist **sl; +na_strlist_t **sl; long mode; { long i; - na_strlist *l1; + na_strlist_t *l1; char buf[101]; char ch; char STR1[118]; @@ -649,7 +649,7 @@ long mode; static void nullproc(act) -log_action *act; +log_action_t *act; { if (act->action == act_pass && act->actgate != NULL) unfoundkind = act->actgate->kind; @@ -657,14 +657,14 @@ log_action *act; void Log_7_proc(act) -log_action *act; +log_action_t *act; { long i; char buf[256]; log_grec *g; - void (*myproc) (log_action *act); + void (*myproc) (log_action_t *act); log_krec *unfound; - log_action *WITH; + log_action_t *WITH; char STR1[42]; long FORLIM; @@ -675,7 +675,7 @@ log_action *act; WITH->acttool->simulator = true; WITH->acttool->ready = true; WITH->acttool->nostatus = true; - procs_7 = (void(**) (log_action *act))Malloc(sizeof(procarray)); + procs_7 = (void(**) (log_action_t *act))Malloc(sizeof(procarray)); procs_7[0] = nullproc; procs_7[1] = nullproc; numprocs_7 = 1; @@ -818,7 +818,7 @@ log_action *act; void Log_17_proc(act) -log_action *act; +log_action_t *act; { switch (act->action) { diff --git a/log/src/logcom.h b/log/src/logcom.h index 7f032b80d1d6bf97133446d566be7b35336681de..c7a6e6602ac7c143ab0a4299d22847fccaefe837 100644 --- a/log/src/logcom.h +++ b/log/src/logcom.h @@ -8,16 +8,16 @@ #include <p2c/newci.h> #include <p2c/sysdevs.h> -extern void Log_0_proc (log_action *act); -extern void Log_1_proc (log_action *act); +extern void Log_0_proc (log_action_t *act); +extern void Log_1_proc (log_action_t *act); /*obsolete*/ -extern void Log_2_proc (log_action *act); -extern void Log_7_proc (log_action *act); +extern void Log_2_proc (log_action_t *act); +extern void Log_7_proc (log_action_t *act); -extern void Log_17_proc (log_action *act); +extern void Log_17_proc (log_action_t *act); -extern void Log_7_time (log_action *act); +extern void Log_7_time (log_action_t *act); #endif /*LOGCOM_H*/ diff --git a/log/src/logdef.h b/log/src/logdef.h index e1ca296ddb897195a6cac1cb00d4198ae4a35317..7e3f49cb832a7fd22cddd92d08c3cf11e502f64e 100644 --- a/log/src/logdef.h +++ b/log/src/logdef.h @@ -4,16 +4,13 @@ #include <p2c/mylib.h> #include <p2c/newasm.h> -#include "log_action.h" #ifdef LOGDEF_G # define vextern #else # define vextern extern #endif - - - +typedef struct log_action_t log_action_t; #define log_maxpages 9 /* Maximum page number */ #define log_maxpins 255 /* Maximum number of pins on a gate */ #define log_lablen 255 /* Maximum length of labels */ @@ -131,7 +128,7 @@ typedef struct log_pinrec { } log_pinrec; typedef log_pinrec log_pinrecs[log_million]; -typedef na_strlistrec *log_pinnames[log_million]; +typedef na_strlist_t *log_pinnames[log_million]; typedef struct log_pnumrec { schar x, y; @@ -158,7 +155,7 @@ typedef struct log_kattrrec { char *sp; unsigned b : 1 ; struct { - na_strlistrec *v; + na_strlist_t *v; short nv, dv; } U86; } UU; @@ -211,7 +208,7 @@ typedef struct log_krec { log_kflags flag; schar x1, y1, x2, y2; long code; - na_strlistrec *lbl; + na_strlist_t *lbl; log_vectorrec *vector; log_pinrec *pin; log_pnumrec *pnum; @@ -219,7 +216,7 @@ typedef struct log_krec { schar bbx1, bby1, bbx2, bby2; /*7/14/88*/ short bbmax; /*7/14/88*/ long bigprocsize, biglblsize, bigvectsize; - na_strlistrec **pinnames; + na_strlist_t **pinnames; } log_krec; typedef struct log_pinposrec { @@ -345,13 +342,13 @@ typedef struct log_colorrec { typedef struct log_tool { char name[17]; - void (*proc) (log_action *act); + void (*proc) (log_action_t *act); char *fname, *comment; char *shortname; unsigned ready : 1, simulator : 1, keep : 1, nostatus : 1, tstepflag : 1; uchar simtype; double nexttstep; - na_strlistrec *nlbl, *hlbl; + na_strlist_t *nlbl, *hlbl; short nnumattrs, hnumattrs; log_kattrrec *nattr, *hattr; na_long info; @@ -363,6 +360,7 @@ typedef struct log_tool { #undef vextern +#include <log_action.h> #endif /*LOGDEF_H*/ /* End. */ diff --git a/log/src/logdig.h b/log/src/logdig.h index 2719af49ca3b77ec80608cc29decbeef45bd8db0..d4a90c25b57e5a4dd4e95f4fd5bd334c2586e8f1 100644 --- a/log/src/logdig.h +++ b/log/src/logdig.h @@ -39,13 +39,13 @@ typedef enum { typedef struct log_16_action { log_16_actionkinds action; - log_action *lact; - void (*hook_input) (log_action *lact, log_nrec *n, log_16_value *v); - void (*hook_output) (log_action *lact, log_nrec *n, log_16_value v); - void (*hook_ocoutput) (log_action *lact, log_nrec *n, log_16_value v); - void (*hook_led) (log_action *lact, int x, int y, log_16_value v); - void (*hook_eraled) (log_action *lact, int x, int y); - void (*hook_plotled) (log_action *lact, int x, int y, log_16_value v); + log_action_t *lact; + void (*hook_input) (log_action_t *lact, log_nrec *n, log_16_value *v); + void (*hook_output) (log_action_t *lact, log_nrec *n, log_16_value v); + void (*hook_ocoutput) (log_action_t *lact, log_nrec *n, log_16_value v); + void (*hook_led) (log_action_t *lact, int x, int y, log_16_value v); + void (*hook_eraled) (log_action_t *lact, int x, int y); + void (*hook_plotled) (log_action_t *lact, int x, int y, log_16_value v); } log_16_action; vextern const log_16_viarr log_16_vi; diff --git a/log/src/loghier.c b/log/src/loghier.c index c1c93db0d946c85091c351abcbf57b402e86e23b..a7fd36169f450b9584fe4443efde724d52ee32e0 100644 --- a/log/src/loghier.c +++ b/log/src/loghier.c @@ -35,7 +35,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static log_action *lact; +static log_action_t *lact; static log_krec *attrkind; static short attrinstof, attrinstname; @@ -44,7 +44,7 @@ static short attrinstof, attrinstname; void hier_init(act) -log_action *act; +log_action_t *act; { lact = act; attrkind = NULL; @@ -240,11 +240,11 @@ log_grec *g; /* Find a list of all definitions on the page, sorted according to dependencies */ -na_strlist *defndirectory(pg) +na_strlist_t *defndirectory(pg) short pg; { char buf[256], buf2[256]; - na_strlist *dir, *l1, *l2, **lprev; + na_strlist_t *dir, *l1, *l2, **lprev; log_lrec *lp; log_brec *bp; log_grec *g; @@ -450,14 +450,14 @@ typedef struct ginstinfo { void Log_7_ginst(act) -log_action *act; +log_action_t *act; { ginstinfo *ii; char newname[256]; int drawflag; short drawx, drawy; - na_strlist *sl1; - log_action *WITH; + na_strlist_t *sl1; + log_action_t *WITH; log_gattrrec *WITH1; char STR2[256]; log_grec *WITH2; diff --git a/log/src/loghier.h b/log/src/loghier.h index 13089ec955ab2ec6b2595d373b89e6d0b89c5053..936ff0ec242b12d530ee0cbfdba5d329dc81f458 100644 --- a/log/src/loghier.h +++ b/log/src/loghier.h @@ -7,7 +7,7 @@ typedef short log_shintarray[log_million]; -extern void hier_init (log_action *act); +extern void hier_init (log_action_t *act); extern int commandlabel (log_lrec *lp, char *cmd, char *args); extern log_brec *labelbox (log_lrec *lp, int pg); extern int pointinbox (log_brec *bp, int x, int y); @@ -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 *defndirectory (int pg); +extern na_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, @@ -27,7 +27,7 @@ extern void examinetemplate (log_grec *g, log_nrec **pp, long ppsize, -extern void Log_7_ginst (log_action *act); +extern void Log_7_ginst (log_action_t *act); #endif /*LOGHIER_H*/ diff --git a/log/src/logntk.c b/log/src/logntk.c index 74c03672f43576ffe3510a6d01a6a7d22928895f..e9ac1c8262db1c59608e97ca97b3822ede2a3082 100644 --- a/log/src/logntk.c +++ b/log/src/logntk.c @@ -63,7 +63,7 @@ typedef struct transrec { typedef struct cellrec { char name[82], cname[82]; char fname[256]; - na_strlist *port; + na_strlist_t *port; long ccount; unsigned loaded : 1, complain1 : 1; struct cellrec *next; @@ -79,10 +79,10 @@ typedef struct primrec { static transrec *transbase, *savetransbase; static cellrec *cellbase, *savecellbase; static primrec *primbase, *saveprimbase; -static na_strlist *filebase, *filecellbase; +static na_strlist_t *filebase, *filecellbase; static int autotop, maincell; static long default_size, default_strength; -static na_strlist *saveglobals, *saveorphans, *saveignored, *saveprims, +static na_strlist_t *saveglobals, *saveorphans, *saveignored, *saveprims, *savetrans, *savelibdirs, *ports, *globals, *orphans, *ignored, *prims, *trans, *libdirs, *notfoundlist, *wignlist; @@ -98,8 +98,8 @@ static char nodeprefix[11]; -static na_strlist *strlist_find_r(l1, wrd_) -na_strlist *l1; +static na_strlist_t *strlist_find_r(l1, wrd_) +na_strlist_t *l1; char *wrd_; { char wrd[256]; @@ -120,7 +120,7 @@ static int tryreset(f, fn) FILE **f; char *fn; { - na_strlist *l1; + na_strlist_t *l1; char buf[256]; int found; @@ -159,7 +159,7 @@ char *fn; /* variables for Log_logntk_proc: */ struct LOC_Log_logntk_proc { - log_action *act; + log_action_t *act; int errflag; } ; @@ -235,10 +235,10 @@ struct LOC_Log_logntk_proc *LINK; void readstrlist(buf, l1, LINK) char *buf; -na_strlist **l1; +na_strlist_t **l1; struct LOC_Log_logntk_proc *LINK; { - na_strlist *l2; + na_strlist_t *l2; char arg[256]; do { @@ -251,10 +251,10 @@ struct LOC_Log_logntk_proc *LINK; void readstrlista(buf, l1, LINK) char *buf; -na_strlist **l1; +na_strlist_t **l1; struct LOC_Log_logntk_proc *LINK; { - na_strlist *l2; + na_strlist_t *l2; char arg[256]; do { @@ -269,11 +269,11 @@ struct LOC_Log_logntk_proc *LINK; void readstrlistr(buf, l1, named, LINK) char *buf; -na_strlist **l1; +na_strlist_t **l1; int named; struct LOC_Log_logntk_proc *LINK; { - na_strlist *l2; + na_strlist_t *l2; char arg[256], rex[256]; do { @@ -316,7 +316,7 @@ struct LOC_Log_logntk_proc *LINK; cellrec *c1; transrec *t1; primrec *p1; - na_strlist *l1; + na_strlist_t *l1; long i; char STR1[256]; char STR3[256]; @@ -449,7 +449,7 @@ log_nrec *n; struct LOC_Log_logntk_proc *LINK; { char buf[256], buf2[256]; - na_strlist *l1; + na_strlist_t *l1; long i, FORLIM; if ((char *)n->temp != NULL) @@ -586,7 +586,7 @@ struct LOC_Log_logntk_proc *LINK; primrec *p; char buf[256], buf2[256]; log_nrec **portlist; - na_strlist *l1; + na_strlist_t *l1; long i, tcount, lastn, laste, lasts, lastw; short pnum; short *pnumlist; @@ -845,11 +845,11 @@ struct LOC_Log_logntk_proc *LINK; } -na_strlist *mydefndirectory(pg, LINK) +na_strlist_t *mydefndirectory(pg, LINK) short pg; struct LOC_Log_logntk_proc *LINK; { - na_strlist *l1; + na_strlist_t *l1; l1 = defndirectory(pg); if (l1 != NULL) @@ -879,7 +879,7 @@ void readcellfile(fn, LINK) char *fn; struct LOC_readcells *LINK; { - na_strlist *l1; + na_strlist_t *l1; int done, copying; char *TEMP; @@ -937,7 +937,7 @@ struct LOC_dologntk *LINK; struct LOC_readcells V; log_grec *g; cellrec *c; - na_strlist *p, *l1; + na_strlist_t *p, *l1; int found; char STR1[256]; char STR2[256]; @@ -1068,7 +1068,7 @@ struct LOC_dologntk *LINK; transrec *t; cellrec *c; primrec *p; - na_strlist *havedone, *l1; + na_strlist_t *havedone, *l1; char s[256], w[256], ginstname[256]; log_nrec **portlist; long lastn, laste, lasts, lastw; @@ -1320,7 +1320,7 @@ void showports(LINK) struct LOC_dologntk *LINK; { char buf[256]; - na_strlist *l1; + na_strlist_t *l1; char STR1[256]; strcpy(buf, "Using port list:"); @@ -1340,7 +1340,7 @@ struct LOC_Log_logntk_proc *LINK; { struct LOC_dologntk V; char args[256]; - na_strlist *l1, *defndir, *argslist; + na_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*/ @@ -1441,7 +1441,7 @@ struct LOC_Log_logntk_proc *LINK; void probecommand(LINK) struct LOC_Log_logntk_proc *LINK; { - na_strlist *defndir, *l1, *curdef; + na_strlist_t *defndir, *l1, *curdef; int exitflag, boxed; char buf[256], obuf[256], temp[256]; log_grec *probegate, *redgate, *g; @@ -1592,7 +1592,7 @@ char *args_; struct LOC_Log_logntk_proc *LINK; { char args[256]; - na_strlist *defndir, *arglist, *argl; + na_strlist_t *defndir, *arglist, *argl; char buf[256]; log_grec *g; log_nrec *n; @@ -1660,11 +1660,11 @@ struct LOC_Log_logntk_proc *LINK; void Log_logntk_proc(act_) -log_action *act_; +log_action_t *act_; { struct LOC_Log_logntk_proc V; long esc, ior; - log_action *WITH; + log_action_t *WITH; char STR1[256]; diff --git a/log/src/logntk.h b/log/src/logntk.h index 838024a03ed2b0ee2ff9e3faacf4132fef444bc2..7ff271f9d0bba52a0724dd6818f6882cea6d0b92 100644 --- a/log/src/logntk.h +++ b/log/src/logntk.h @@ -10,7 +10,7 @@ #include <p2c/mylib.h> #include <p2c/regex.h> -extern void Log_logntk_proc (log_action *act); +extern void Log_logntk_proc (log_action_t *act); #endif /*LOGNTK_H*/ diff --git a/log/src/logsim.c b/log/src/logsim.c index 6883bb246c32a55a3c0368dcb495cb05c5add6b6..1dcc9c42bbe875bfa29ecf423583493b022832e4 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_strlistrec *diglbl; +static na_strlist_t *diglbl; static short dignumattrs; static log_kattrrec *digkattr; static log_gattrrec *diggattr; @@ -105,7 +105,7 @@ static short backgrcolor, ledoncolor, ledoffcolor, scopecolor, scopescancolor; static void log_16_input(lact, n, v) -log_action *lact; +log_action_t *lact; log_nrec *n; log_16_value *v; { @@ -118,7 +118,7 @@ log_16_value *v; static void log_16_output(lact, n, v) -log_action *lact; +log_action_t *lact; log_nrec *n; log_16_value v; { @@ -136,7 +136,7 @@ log_16_value v; static void log_16_ocoutput(lact, n, v) -log_action *lact; +log_action_t *lact; log_nrec *n; log_16_value v; { @@ -156,8 +156,8 @@ log_16_value v; static void getpointmark(num, defx, defy, x, y) short num, defx, defy, *x, *y; { - log_action *WITH; - log_hook2 *WITH1; + log_action_t *WITH; + log_hook2_t *WITH1; *x = defx; *y = defy; @@ -171,7 +171,7 @@ short num, defx, defy, *x, *y; static void log_16_led(lact, x, y, v) -log_action *lact; +log_action_t *lact; short x, y; log_16_value v; { @@ -198,7 +198,7 @@ log_16_value v; static void log_16_eraled(lact, x, y) -log_action *lact; +log_action_t *lact; short x, y; { (*lact->hook.xform)(lact->actgate, &x, &y); @@ -211,11 +211,11 @@ short x, y; static void log_16_plotled(lact, x, y, v) -log_action *lact; +log_action_t *lact; short x, y; log_16_value v; { - na_strlistrec *l1; + na_strlist_t *l1; char STR2[256]; if (v == log_none) @@ -250,7 +250,7 @@ void Log_16_ledgate(act) log_16_action *act; { nodeinfo *pin1; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; char TEMP; @@ -300,7 +300,7 @@ log_16_action *act; { long i; nodeinfo *pin1; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; long FORLIM; char TEMP; @@ -369,7 +369,7 @@ log_16_action *act; void Log_16_clock(act) log_16_action *act; { - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; int TEMP; long TEMP1; @@ -513,7 +513,7 @@ log_16_action *act; long num; int val; { - na_strlistrec *l1; + na_strlist_t *l1; char STR1[256]; if (act->lact->actgate->pin[num - 1]->ref <= 1) @@ -532,7 +532,7 @@ void Log_16_switch(act) log_16_action *act; { short xx, yy; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; int TEMP; @@ -586,7 +586,7 @@ log_16_action *act; void Log_16_pulse(act) log_16_action *act; { - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = act->lact; @@ -608,7 +608,7 @@ log_16_action *act; void Log_16_break(act) log_16_action *act; { - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = act->lact; @@ -640,7 +640,7 @@ log_16_action *act; int flag; nodeinfo *pin1, *pin2; short tx, ty; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; int TEMP; @@ -761,7 +761,7 @@ log_16_action *act; /* variables for Log_16_7seg: */ struct LOC_Log_16_7seg { log_16_action *act; - na_strlistrec *l1; + na_strlist_t *l1; } ; void plotline(x1, y1, x2, y2, LINK) @@ -781,7 +781,7 @@ log_16_action *act_; { struct LOC_Log_16_7seg V; short t1, tx, ty; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; int TEMP; @@ -905,7 +905,7 @@ void Log_16_keypad(act) log_16_action *act; { short x1, y1, n; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; WITH = act->lact; @@ -1072,7 +1072,7 @@ log_16_actionkinds kind; { short pg; log_grec *g, *saveactgate; - log_action *WITH; + log_action_t *WITH; short FORLIM; log_krec *WITH1; @@ -1100,7 +1100,7 @@ log_16_actionkinds kind; { kindinfo *ki; log_grec *saveactgate; - log_action *WITH; + log_action_t *WITH; log_krec *WITH1; WITH = logsima_action.lact; @@ -1121,7 +1121,7 @@ log_16_actionkinds kind; { kindinfo *ki; log_krec *k; - log_action *WITH; + log_action_t *WITH; WITH = logsima_action.lact; k = kbase_16; @@ -1142,7 +1142,7 @@ log_16_action *act; { short pg; log_grec *g; - log_action *WITH; + log_action_t *WITH; short FORLIM; log_krec *WITH1; @@ -1210,7 +1210,7 @@ log_16_action *act; log_nrec *n; nodeinfo *ni; int stable; - log_action *WITH; + log_action_t *WITH; WITH = act->lact; if (!WITH->actflag) @@ -1280,7 +1280,7 @@ static void status_16(flag) int *flag; { char s[256]; - log_action *WITH; + log_action_t *WITH; WITH = logsima_action.lact; nk_gotoxy(0, 4); @@ -1299,10 +1299,10 @@ int *flag; static void parseicommand(lact) -log_action *lact; +log_action_t *lact; { int flag; - log_action *WITH; + log_action_t *WITH; WITH = lact; if (!strcmp(WITH->func, "DIGON")) { @@ -1342,9 +1342,9 @@ log_action *lact; static void parsecommand(lact) -log_action *lact; +log_action_t *lact; { - log_action *WITH; + log_action_t *WITH; WITH = lact; if (!strcmp(WITH->func, "STABDELAY")) { @@ -1354,7 +1354,7 @@ log_action *lact; } -static char *log_actionkinds_NAMES[] = { +static char *log_action_tkinds_NAMES[] = { "ACT_INIT", "ACT_ENDINIT", "ACT_EXIT", "ACT_CLEARMSG", "ACT_STATUS", "ACT_CNF", "ACT_IMMED", "ACT_FUNC", "ACT_COLOR", "ACT_SELECT", "ACT_CLEAR", "ACT_EDIT", "ACT_PASS", "ACT_TSTEP", "ACT_ERASEGATE", "ACT_TOUCHGATE", @@ -1380,7 +1380,7 @@ log_actionkinds action; /* p2c: logsim.text, line 1069: Note: * Line breaker spent 0.0+2.00 seconds, 5000 tries on line 1304 [251] */ - strcpy(s, log_actionkinds_NAMES[(long)action]); + strcpy(s, log_action_tkinds_NAMES[(long)action]); i = strlen(s) + 1; s[i - 1] = '\0'; /* p2c: logsim.text, line 1070: @@ -1413,10 +1413,10 @@ log_grec *g; static void newnode_16(lact, n) -log_action *lact; +log_action_t *lact; log_nrec **n; { - log_action *WITH; + log_action_t *WITH; WITH = lact; (*WITH->hook.newnode)(n, log_16_simtype); @@ -1426,10 +1426,10 @@ log_nrec **n; static void disposenode_16(lact, n) -log_action *lact; +log_action_t *lact; log_nrec **n; { - log_action *WITH; + log_action_t *WITH; WITH = lact; (*n)->keep = false; @@ -1501,19 +1501,19 @@ struct LOC_Log_16_proc *LINK; void Log_16_proc(lact) -log_action *lact; +log_action_t *lact; { struct LOC_Log_16_proc V; nodeinfo *ni, *ni2; log_krec *k2; gateinfo *gi, *gi2; - na_strlistrec *l1; + na_strlist_t *l1; short i; double val1, val2; char STR1[33]; char STR2[46]; char STR3[40]; - log_action *WITH; + log_action_t *WITH; void (*TEMP) (); void (*TEMP1) (); void (*TEMP2) (); diff --git a/log/src/logsim.h b/log/src/logsim.h index b241ea9c901e62db1e7723e16f1b4de5496b953e..8484dfafaee330773b866b80d2f8f937679bb714 100644 --- a/log/src/logsim.h +++ b/log/src/logsim.h @@ -13,7 +13,7 @@ #include <p2c/newcrt.h> #include <p2c/mylib.h> -extern void Log_16_proc (log_action *lact); +extern void Log_16_proc (log_action_t *lact); extern void Log_16_7seg (log_16_action *act); extern void Log_16_break (log_16_action *act); extern void Log_16_clock (log_16_action *act); diff --git a/log/src/logsimed.c b/log/src/logsimed.c index 81a77bd9756f6c1aa3076fc6c37593f9a793ede5..55c202b52aa1167e24411cc66f12f112b9e96f5b 100644 --- a/log/src/logsimed.c +++ b/log/src/logsimed.c @@ -1764,11 +1764,11 @@ char *name_; void dump_16(proc, sl, indenting) uchar **proc; -na_strlist **sl; +na_strlist_t **sl; int indenting; { long pc, indent, oindent, proclen; - na_strlist *l1; + na_strlist_t *l1; char *buf; char *STR1; char STR2[256]; @@ -1808,11 +1808,11 @@ int indenting; void read_16(proc, proclen, sl) uchar **proc; long *proclen; -na_strlist *sl; +na_strlist_t *sl; { long pc, instrptr, i, newlen; uchar instr[1023]; - na_strlist *l1; + na_strlist_t *l1; char *STR1; pc = 1; diff --git a/log/src/logsimed.h b/log/src/logsimed.h index c3208b857eef26266cb90fc654bc6e940326ec98..8a58f5380b6c7c50f0c0ce9f1dee19f611e4089c 100644 --- a/log/src/logsimed.h +++ b/log/src/logsimed.h @@ -11,9 +11,9 @@ extern void edit_16 (uchar **proc, long *proclen, char *name); -extern void dump_16 (uchar **proc, na_strlist **sl, int indenting); +extern void dump_16 (uchar **proc, na_strlist_t **sl, int indenting); -extern void read_16 (uchar **proc, long *proclen, na_strlist *sl); +extern void read_16 (uchar **proc, long *proclen, na_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/logsimh.c b/log/src/logsimh.c index 8b0db122e3dfed5c50aaea83589eee8b82610800..16cb2dcebe44db5909c6e9039dbc5653073f9ee0 100644 --- a/log/src/logsimh.c +++ b/log/src/logsimh.c @@ -153,7 +153,7 @@ static long currunstamp; static log_sigrec *vddsig, *gndsig; static long curstamp, currecstamp, viserrorstamp; -static na_strlist *viserrors; +static na_strlist_t *viserrors; static long oldcolorstamp, showstamp; static short templatecolor, kindcolor, darkwordcolor; @@ -170,13 +170,13 @@ log_grec *g; char *name, *kinds; short def; { - na_strlist *l1; + na_strlist_t *l1; l1 = g->kind->lbl; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) - l1 = strlist_find((na_strlist *)l1->value, name); + l1 = strlist_find((na_strlist_t *)l1->value, name); if (l1 != NULL && strposc(kinds, g->kind->attr[(long)l1->value - 1].dtype, 1L) != 0) return ((long)l1->value); @@ -194,13 +194,13 @@ char *Result; log_grec *g; short i; { - na_strlist *l1; + na_strlist_t *l1; l1 = g->kind->lbl; while (l1 != NULL && l1->kind != '\001') l1 = l1->next; if (l1 != NULL) { - l1 = (na_strlist *)l1->value; + l1 = (na_strlist_t *)l1->value; while (l1 != NULL && (long)l1->value != i) l1 = l1->next; } @@ -229,7 +229,7 @@ short force; controlinfo *cip; dumpmodes newdumpmode; short newoptcolor, newdumpcolor; - log_action *WITH; + log_action_t *WITH; controlinfo *WITH1; WITH = logsima_action.lact; @@ -334,7 +334,7 @@ char *msg; { controlinfo *cip; long i, j, limit; - log_action *WITH; + log_action_t *WITH; WITH = logsima_action.lact; if (hdef->gcontrol == NULL) @@ -374,7 +374,7 @@ hdefrec *hdef; char *msg_; { char msg[256]; - na_strlist *l1; + na_strlist_t *l1; strcpy(msg, msg_); if (logsima_action.lact->msgstamp != viserrorstamp) { @@ -719,7 +719,7 @@ struct LOC_compilepage { instrcount, oldinstrcount, curppin, curpvar, savecurpvar, baseppin, basepvar, numvar, numports, numthings, thingnodes, thingvars; noderec *things; - na_strlist *inertlist; + na_strlist_t *inertlist; log_brec *mybox; uchar *proc; log_nrec **gpins; @@ -1462,7 +1462,7 @@ struct LOC_parsegates *LINK; { log_nrec **ports; long i; - log_action *WITH; + log_action_t *WITH; long FORLIM; WITH = logsima_action.lact; @@ -4062,7 +4062,7 @@ void showstats(LINK) struct LOC_compilepage *LINK; { char buf[256]; - log_action *WITH; + log_action_t *WITH; char STR1[256]; char STR2[256]; @@ -4104,12 +4104,12 @@ hdefrec *hdef_; long i, extrarpt; log_nrec **templs; short *pnumlist; - na_strlist *l1; + na_strlist_t *l1; dependrec *dep; log_lrec *lp; char buf[256], wrd[256]; log_sigrec *sig; - log_action *WITH; + log_action_t *WITH; char STR1[256]; char STR2[256]; char STR3[256]; @@ -4542,7 +4542,7 @@ hdefrec *hdef; int chglabels, wasdefined; log_grec *g1; instinfo *ii1; - log_action *WITH; + log_action_t *WITH; long FORLIM; char STR1[256], STR2[256]; @@ -4662,7 +4662,7 @@ int clearit; hdefrec *hdef; long i; log_nrec **newpins; - log_action *WITH; + log_action_t *WITH; long FORLIM; char STR1[256]; char STR4[256]; @@ -4775,7 +4775,7 @@ log_grec *g_; hdefrec *hdef; long lastnorth, lasteast, lastsouth; short *pnum; - log_action *WITH; + log_action_t *WITH; V.g = g_; WITH = logsima_action.lact; @@ -4807,7 +4807,7 @@ log_grec *g; instinfo *ii; hdefrec *hdef; long i; - log_action *WITH; + log_action_t *WITH; char STR2[12]; char STR3[38]; @@ -4869,7 +4869,7 @@ log_grec *g; static void initcolors_h() { - log_action *WITH; + log_action_t *WITH; WITH = logsima_action.lact; if (WITH->colorstamp == oldcolorstamp) @@ -4931,8 +4931,8 @@ log_16_action *act; int drawflag, attr2; char attr1[256]; hdefrec *hdef; - na_strlist *sl1; - log_action *WITH; + na_strlist_t *sl1; + log_action_t *WITH; log_grec *WITH1; log_gattrrec *WITH2; char STR1[256]; @@ -5192,7 +5192,7 @@ log_16_action *act; { controlinfo *cip; char aname[256]; - log_action *WITH; + log_action_t *WITH; log_grec *WITH1; log_gattrrec *WITH2; char STR1[256]; diff --git a/log/src/logspc.c b/log/src/logspc.c index 544cd3b33578381ca03711c9a53386e6b441fea3..4df187b6ec8d15b69f2af72ee430b985a2219f5c 100644 --- a/log/src/logspc.c +++ b/log/src/logspc.c @@ -157,7 +157,7 @@ typedef struct transrec { typedef struct cellrec { char name[82], cname[82]; char fname[256]; - na_strlist *port; + na_strlist_t *port; long ccount; unsigned loaded : 1, complain1 : 1; struct cellrec *next; @@ -173,10 +173,10 @@ typedef struct primrec { static transrec *transbase, *savetransbase; static cellrec *cellbase, *savecellbase; static primrec *primbase, *saveprimbase; -static na_strlist *filebase, *filecellbase; +static na_strlist_t *filebase, *filecellbase; static int autotop, maincell; static long default_size, default_strength; -static na_strlist *saveglobals, *saveorphans, *saveignored, *saveprims, +static na_strlist_t *saveglobals, *saveorphans, *saveignored, *saveprims, *savetrans, *savelibdirs, *ports, *globals, *orphans, *ignored, *prims, *trans, *libdirs, *notfoundlist, *wignlist; @@ -189,8 +189,8 @@ static char *filename, *cellname; static char nodeprefix[11]; -static na_strlist *strlist_find_r(l1, wrd_) -na_strlist *l1; +static na_strlist_t *strlist_find_r(l1, wrd_) +na_strlist_t *l1; char *wrd_; { char wrd[256]; @@ -206,7 +206,7 @@ static int tryreset(f, fn) FILE **f; char *fn; { - na_strlist *l1; + na_strlist_t *l1; char buf[256]; int found; @@ -245,7 +245,7 @@ char *fn; /* variables for Log_logspc_proc: */ struct LOC_Log_logspc_proc { - log_action *act; + log_action_t *act; int errflag; } ; @@ -360,10 +360,10 @@ struct LOC_Log_logspc_proc *LINK; void readstrlist(buf, l1, LINK) char *buf; -na_strlist **l1; +na_strlist_t **l1; struct LOC_Log_logspc_proc *LINK; { - na_strlist *l2; + na_strlist_t *l2; char arg[256]; do { @@ -376,10 +376,10 @@ struct LOC_Log_logspc_proc *LINK; void readstrlista(buf, l1, LINK) char *buf; -na_strlist **l1; +na_strlist_t **l1; struct LOC_Log_logspc_proc *LINK; { - na_strlist *l2; + na_strlist_t *l2; char arg[256]; do { @@ -394,11 +394,11 @@ struct LOC_Log_logspc_proc *LINK; void readstrlistr(buf, l1, named, LINK) char *buf; -na_strlist **l1; +na_strlist_t **l1; int named; struct LOC_Log_logspc_proc *LINK; { - na_strlist *l2; + na_strlist_t *l2; char arg[256], rex[256]; do { @@ -442,7 +442,7 @@ struct LOC_Log_logspc_proc *LINK; cellrec *c1; transrec *t1; primrec *p1; - na_strlist *l1; + na_strlist_t *l1; long i; char STR1[256]; char STR3[256]; @@ -638,7 +638,7 @@ log_nrec *n; struct LOC_Log_logspc_proc *LINK; { char buf[256], buf2[256]; - na_strlist *l1; + na_strlist_t *l1; long i, FORLIM; if ((char *)n->temp != NULL) @@ -775,7 +775,7 @@ struct LOC_Log_logspc_proc *LINK; primrec *p; char buf[256], buf2[256]; log_nrec **portlist; - na_strlist *l1; + na_strlist_t *l1; long i, tcount, lastn, laste, lasts, lastw; short pnum; short *pnumlist; @@ -1032,11 +1032,11 @@ struct LOC_Log_logspc_proc *LINK; } -na_strlist *mydefndirectory(pg, LINK) +na_strlist_t *mydefndirectory(pg, LINK) short pg; struct LOC_Log_logspc_proc *LINK; { - na_strlist *l1; + na_strlist_t *l1; l1 = defndirectory(pg); if (l1 != NULL) @@ -1069,7 +1069,7 @@ void readcellfile(fn, LINK) char *fn; struct LOC_readcells *LINK; { - na_strlist *l1; + na_strlist_t *l1; int done, copying, prewarp; char *TEMP; char spcstring[256], spcword[256], endsubckt[256]; @@ -1151,7 +1151,7 @@ struct LOC_dologspc *LINK; struct LOC_readcells V; log_grec *g; cellrec *c; - na_strlist *p, *l1; + na_strlist_t *p, *l1; int found; char STR1[256]; char STR2[256]; @@ -1308,12 +1308,12 @@ struct LOC_dologspc *LINK; transrec *t; cellrec *c; primrec *p; - na_strlist *havedone, *l1; + na_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_strlistrec *na_slr; + na_strlist_t *na_slr; int handled; long i, j; char STR1[256], STR2[256]; @@ -1488,7 +1488,7 @@ struct LOC_dologspc *LINK; case 'V': strCount = 0; na_slr = - g->kind->attr[attrCount].UU.U86.v; /* na_strlistrec */ + g->kind->attr[attrCount].UU.U86.v; /* na_strlist_trec */ strcpy (STR1, ""); while (na_slr) { if (strCount == g->kind->attr[attrCount].UU.U86.nv) { @@ -1921,7 +1921,7 @@ void showports(LINK) struct LOC_dologspc *LINK; { char buf[256]; - na_strlist *l1; + na_strlist_t *l1; char STR1[256]; strcpy(buf, "Using port list:"); @@ -1941,7 +1941,7 @@ struct LOC_Log_logspc_proc *LINK; { struct LOC_dologspc V; char args[256]; - na_strlist *l1, *defndir, *argslist, *libpath; + na_strlist_t *l1, *defndir, *argslist, *libpath; FILE *incfp; log_nrec *n1; /*pointer to "node" record*/ log_grec *g1; /*pointer to "gate instance" record*/ @@ -2135,7 +2135,7 @@ struct LOC_Log_logspc_proc *LINK; void probecommand(LINK) struct LOC_Log_logspc_proc *LINK; { - na_strlist *defndir, *l1, *curdef; + na_strlist_t *defndir, *l1, *curdef; int exitflag, boxed; char buf[256], obuf[256], temp[256]; log_grec *probegate, *redgate, *g; @@ -2282,7 +2282,7 @@ char *args_; struct LOC_Log_logspc_proc *LINK; { char args[256]; - na_strlist *defndir, *arglist, *argl; + na_strlist_t *defndir, *arglist, *argl; char buf[256]; log_grec *g; log_nrec *n; @@ -2346,11 +2346,11 @@ struct LOC_Log_logspc_proc *LINK; void Log_logspc_proc(act_) -log_action *act_; +log_action_t *act_; { struct LOC_Log_logspc_proc V; long esc, ior; - log_action *WITH; + log_action_t *WITH; char STR1[256]; V.act = act_; diff --git a/log/src/logspc.h b/log/src/logspc.h index 56b58aeb01f033fbdbffd0d39f30da256d2412b7..09bff6ff733a6f5b80ef0c7deb0062a03aadd429 100644 --- a/log/src/logspc.h +++ b/log/src/logspc.h @@ -10,7 +10,7 @@ #include <p2c/mylib.h> #include <p2c/regex.h> -extern void Log_logspc_proc (log_action *act); +extern void Log_logspc_proc (log_action_t *act); #endif /*LOGSPC_H*/ diff --git a/log/src/lplot.c b/log/src/lplot.c index 5059bbe7206903efe618f975e62384dcae0d3476..5407b190f6209fc81097affea1ac8727f7cbce6d 100644 --- a/log/src/lplot.c +++ b/log/src/lplot.c @@ -125,36 +125,36 @@ typedef struct snapplotrec { #define dft_siz (50L) /* default gate text size */ -static log_action *lp_gg; +static log_action_t *lp_gg; static ne_desc nedesc; -static na_strlist *lplotlbl; +static na_strlist_t *lplotlbl; static short lplotnumattrs; static log_kattrrec *lplotkattr; static log_gattrrec *lplotgattr; -static na_strlist *filelbl; +static na_strlist_t *filelbl; static short filenumattrs; static log_kattrrec *filekattr; static log_gattrrec *filegattr; -static na_strlist *datalbl; +static na_strlist_t *datalbl; static short datanumattrs; static log_kattrrec *datakattr; static log_gattrrec *datagattr; static char xfun[256], yfun[256]; -static na_strlist *varslbl; +static na_strlist_t *varslbl; static short varsnumattrs; static log_kattrrec *varskattr; static log_gattrrec *varsgattr; -static na_strlist *nosoldergates, *noplotgates; +static na_strlist_t *nosoldergates, *noplotgates; -static na_strlist *colors, *pencolors; +static na_strlist_t *colors, *pencolors; static short screenpen[numscreenpens]; @@ -166,7 +166,7 @@ static void lplotproc1() static void lplotproc2() { char buf[256]; - log_action *WITH; + log_action_t *WITH; log_gattrrec *WITH1; WITH = lp_gg; @@ -234,7 +234,7 @@ static void fileproc1() static void fileproc2() { - log_action *WITH; + log_action_t *WITH; log_gattrrec *WITH1; WITH = lp_gg; @@ -317,7 +317,7 @@ long i, j; static void dataproc2() { - log_action *WITH; + log_action_t *WITH; log_gattrrec *WITH1; WITH = lp_gg; @@ -400,7 +400,7 @@ static void varsproc1() static void varsproc2() { - log_action *WITH; + log_action_t *WITH; log_gattrrec *WITH1; WITH = lp_gg; @@ -459,7 +459,7 @@ typedef enum { typedef double realarray[log_million]; -static char *log_actionkinds_NAMES[] = { +static char *log_action_tkinds_NAMES[] = { "ACT_INIT", "ACT_ENDINIT", "ACT_EXIT", "ACT_CLEARMSG", "ACT_STATUS", "ACT_CNF", "ACT_IMMED", "ACT_FUNC", "ACT_COLOR", "ACT_SELECT", "ACT_CLEAR", "ACT_EDIT", "ACT_PASS", "ACT_TSTEP", "ACT_ERASEGATE", "ACT_TOUCHGATE", @@ -492,7 +492,7 @@ char *name_, *def; struct LOC_Log_lplot_proc *LINK; { char name[256]; - na_strlist *l1, *l2; + na_strlist_t *l1, *l2; char STR1[256]; char STR2[256]; @@ -501,11 +501,11 @@ struct LOC_Log_lplot_proc *LINK; strcpy(name, STR1); l1 = strlist_find(colors, name); if (l1 != NULL) - l2 = (na_strlist *)l1->value; + l2 = (na_strlist_t *)l1->value; else { l1 = strlist_find(colors, def); if (l1 != NULL) - l2 = (na_strlist *)l1->value; + l2 = (na_strlist_t *)l1->value; else { l2 = strlist_find(pencolors, def); if (l2 == NULL) @@ -529,7 +529,7 @@ struct LOC_Log_lplot_proc *LINK; long addr, i; char size; char fn[256]; - log_action *WITH; + log_action_t *WITH; long FORLIM; char STR2[256]; @@ -953,7 +953,7 @@ struct LOC_plotfile *LINK; long vx1, vy1, vx2, vy2; short rxx, rxy, ryx, ryy; long i, j, x0, y0, x3, y3; - log_action *WITH; + log_action_t *WITH; long FORLIM, FORLIM1; log_vectorrec *WITH1; @@ -1130,8 +1130,8 @@ struct LOC_doplotfile *LINK; log_nrec *n; double soldersize; int swap, horiz, flag, enabled; - na_strlist *sl1, *sl2; - log_action *WITH; + na_strlist_t *sl1, *sl2; + log_action_t *WITH; long FORLIM; log_vectorrec *WITH2; char STR1[256]; @@ -1795,7 +1795,7 @@ struct LOC_doplotfile *LINK; { long x1, y1, xx1, yy1, x2, y2, xx2, yy2; char ch; - log_action *WITH; + log_action_t *WITH; WITH = lp_gg; y1 = m_down - WITH->t.y; @@ -1847,7 +1847,7 @@ struct LOC_doplotfile *LINK; { long x1, y1, xx1, yy1, x2, y2, xx2, yy2; char ch; - log_action *WITH; + log_action_t *WITH; m_colormode((long)m_xor); WITH = lp_gg; @@ -1921,7 +1921,7 @@ struct LOC_Log_lplot_proc *LINK; struct LOC_doplotfile V; int exitflag; char ch; - log_action *WITH; + log_action_t *WITH; V.LINK = LINK; WITH = lp_gg; @@ -2016,7 +2016,7 @@ struct LOC_Log_lplot_proc *LINK; struct LOC_doplotdata { struct LOC_Log_lplot_proc *LINK; int lrefrflag; - na_strlist *timesym, *timesym2, *constants; + na_strlist_t *timesym, *timesym2, *constants; double time; double *sigs, *vars; double *xvec, *yvec; @@ -2026,7 +2026,7 @@ struct LOC_doplotdata { void initsymtab(LINK) struct LOC_doplotdata *LINK; { - na_strlist *l1; + na_strlist_t *l1; long i; log_hnrec *hn, *hn2; char name[256]; @@ -2345,7 +2345,7 @@ struct LOC_doplotdata *LINK; { double stupid; long x1, y1, x2, y2, i; - log_action *WITH; + log_action_t *WITH; char STR1[17], STR2[17]; log_gattrrec *WITH1; double mintmp,maxtmp,inttmp; @@ -2468,7 +2468,7 @@ struct LOC_Log_lplot_proc *LINK; char xfunc[256], yfunc[256]; int exitflag; char ch; - log_action *WITH; + log_action_t *WITH; V.LINK = LINK; strcpy(xfunc, xfunc_); @@ -2595,7 +2595,7 @@ struct LOC_Log_lplot_proc *LINK; { char args[256], cmd[256], cmd2[256]; long esc, ior; - log_action *WITH; + log_action_t *WITH; char STR3[256]; strcpy(args, args_); @@ -2639,15 +2639,15 @@ struct LOC_Log_lplot_proc *LINK; struct LOC_parsecommand { struct LOC_Log_lplot_proc *LINK; char args[256]; - na_strlist *l1; + na_strlist_t *l1; } ; -na_strlist *getpenname(LINK) +na_strlist_t *getpenname(LINK) struct LOC_parsecommand *LINK; { char word[256], buf[256]; long i; - log_action *WITH; + log_action_t *WITH; char STR1[256]; WITH = lp_gg; @@ -2658,7 +2658,7 @@ struct LOC_parsecommand *LINK; else { LINK->l1 = strlist_find(colors, word); if (LINK->l1 != NULL) - return ((na_strlist *)LINK->l1->value); + return ((na_strlist_t *)LINK->l1->value); else { strcpy(buf, word); (*WITH->hook.getint)(buf, &i, -1L); @@ -2699,9 +2699,9 @@ struct LOC_Log_lplot_proc *LINK; { struct LOC_parsecommand V; char cmd[256], buf[256]; - na_strlist *l2; + na_strlist_t *l2; long i; - log_action *WITH; + log_action_t *WITH; log_gattrrec *WITH1; char STR3[256]; double lw; @@ -2748,7 +2748,7 @@ struct LOC_Log_lplot_proc *LINK; } else if (!strcmp(cmd, "COLORS")) { V.l1 = colors; while (V.l1 != NULL) { - l2 = (na_strlist *)V.l1->value; + l2 = (na_strlist_t *)V.l1->value; sprintf(STR3, "Color %s = %s", V.l1->s, l2->s); (*WITH->hook.message)(STR3); V.l1 = V.l1->next; @@ -2825,8 +2825,8 @@ struct LOC_Log_lplot_proc *LINK; void status_lplot(LINK) struct LOC_Log_lplot_proc *LINK; { - na_strlist *l1; - log_action *WITH; + na_strlist_t *l1; + log_action_t *WITH; WITH = lp_gg; if (!WITH->actflag) @@ -2856,8 +2856,8 @@ struct LOC_Log_lplot_proc *LINK; void init_lplot(LINK) struct LOC_Log_lplot_proc *LINK; { - na_strlist *l1; - log_action *WITH; + na_strlist_t *l1; + log_action_t *WITH; char STR2[26]; WITH = lp_gg; @@ -2960,7 +2960,7 @@ struct LOC_Log_lplot_proc *LINK; /* p2c: lplot.text, line 2541: Note: * Line breaker spent 0.0+2.00 seconds, 5000 tries on line 491 [251] */ - strcpy(s, log_actionkinds_NAMES[(long)action]); + strcpy(s, log_action_tkinds_NAMES[(long)action]); i = strlen(s) + 1; s[i - 1] = '\0'; /* p2c: lplot.text, line 2542: @@ -2970,13 +2970,13 @@ struct LOC_Log_lplot_proc *LINK; -void Log_lplot_proc(log_action *lact) +void Log_lplot_proc(log_action_t *lact) { struct LOC_Log_lplot_proc V; char buf[256]; char STR1[33]; char STR2[44]; - log_action *WITH; + log_action_t *WITH; V.outf = NULL; sprintf(STR2, "LPLOT got %s", actionname(STR1, lact->action, &V)); diff --git a/log/src/lplot.h b/log/src/lplot.h index 0ac3a4e1e7c7f1843227003662401d93a974ecf9..c81fe0faa79336edf3738b237d0e1ff2064dfd86 100644 --- a/log/src/lplot.h +++ b/log/src/lplot.h @@ -16,7 +16,7 @@ #include <p2c/plot_routines.h> #include <p2c/citinfomod.h> -extern void Log_lplot_proc (log_action *lact); +extern void Log_lplot_proc (log_action_t *lact); #endif /*LPLOT_H*/ diff --git a/log/src/tooldir.c b/log/src/tooldir.c index c52145316f48175c8ef447afde039c9f10029d7d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/log/src/tooldir.c +++ b/log/src/tooldir.c @@ -1,148 +0,0 @@ -#include <p2c/p2c.h> -#include "logstuff.h" - -/* Do not modify this file. It is created automatically by "munch". */ - -extern void Log_0_proc(); -extern void Log_16_7seg(); -extern void Log_16_break(); -extern void Log_16_clock(); -extern void Log_16_digh(); -extern void Log_16_inst(); -extern void Log_16_keypad(); -extern void Log_16_ledgate(); -extern void Log_16_ledgate2(); -extern void Log_16_proc(); -extern void Log_16_pulse(); -extern void Log_16_scope(); -extern void Log_16_switch(); -extern void Log_17_proc(); -extern void Log_1_proc(); -extern void Log_2_proc(); -extern void Log_32_proc(); -extern void Log_33_proc(); -extern void Log_7_ginst(); -extern void Log_7_proc(); -extern void Log_7_time(); -extern void Log_capfloat_initlib_32(); -extern void Log_DEVTECHN_initlib_32(); -extern void Log_DEVTECHP_initlib_32(); -extern void Log_dig_inst(); -extern void Log_Diode1_INITLIB_32(); -extern void Log_fwr_initlib_32(); -extern void Log_ganglion_initlib_32(); -extern void Log_hres_initlib_32(); -extern void Log_hwr_initlib_32(); -extern void Log_idiff_initlib_32(); -extern void Log_iscope_initlib_32(); -extern void Log_iswitch1_initlib_32(); -extern void Log_iswitch2_initlib_32(); -extern void Log_logntk_proc(); -extern void Log_logspc_proc(); -extern void Log_lplot_proc(); -extern void Log_mmeter_initlib_32(); -extern void Log_moscap_initlib_32(); -extern void Log_mygates_ascdisp(); -extern void Log_mygates_asckbd(); -extern void Log_mygates_sram8k(); -extern void Log_nfet4_initlib_32(); -extern void Log_NFET5_INITLIB_32(); -extern void Log_NFET7F_INITLIB_32(); -extern void Log_NFET7T_INITLIB_32(); -extern void Log_NPN1_INITLIB_32(); -extern void Log_NPN2_INITLIB_32(); -extern void Log_NSPC1_INITLIB_32(); -extern void Log_numbers_initlib_32(); -extern void Log_opamp_initlib_32(); -extern void Log_pfet4_initlib_32(); -extern void Log_PFET5_INITLIB_32(); -extern void Log_PFET6_INITLIB_32(); -extern void Log_PFET7F_INITLIB_32(); -extern void Log_PFET7T_INITLIB_32(); -extern void Log_PHYSICAL_initlib_32(); -extern void Log_PNP1_INITLIB_32(); -extern void Log_PNP2_INITLIB_32(); -extern void Log_PSPC1_INITLIB_32(); -extern void Log_PWL_INITLIB_32(); -extern void Log_resfloat_initlib_32(); -extern void Log_rtd_initlib_32(); -extern void Log_RUNSPEC_initlib_32(); -extern void Log_stairs_initlib_32(); -extern void Log_THERMAL_initlib_32(); -extern void Log_vdiff_initlib_32(); -extern void Log_vswitch_initlib_32(); -extern void Log_wramp_initlib_32(); - -struct ext_proc ext_proc_table[] = { - "Log_0_proc", Log_0_proc, - "Log_16_7seg", Log_16_7seg, - "Log_16_break", Log_16_break, - "Log_16_clock", Log_16_clock, - "Log_16_digh", Log_16_digh, - "Log_16_inst", Log_16_inst, - "Log_16_keypad", Log_16_keypad, - "Log_16_ledgate2", Log_16_ledgate2, - "Log_16_ledgate", Log_16_ledgate, - "Log_16_proc", Log_16_proc, - "Log_16_pulse", Log_16_pulse, - "Log_16_scope", Log_16_scope, - "Log_16_switch", Log_16_switch, - "Log_17_proc", Log_17_proc, - "Log_1_proc", Log_1_proc, - "Log_2_proc", Log_2_proc, - "Log_32_proc", Log_32_proc, - "Log_33_proc", Log_33_proc, - "Log_7_ginst", Log_7_ginst, - "Log_7_proc", Log_7_proc, - "Log_7_time", Log_7_time, - "Log_capfloat_initlib_32", Log_capfloat_initlib_32, - "Log_DEVTECHN_initlib_32", Log_DEVTECHN_initlib_32, - "Log_DEVTECHP_initlib_32", Log_DEVTECHP_initlib_32, - "Log_dig_inst", Log_dig_inst, - "Log_Diode1_INITLIB_32", Log_Diode1_INITLIB_32, - "Log_fwr_initlib_32", Log_fwr_initlib_32, - "Log_ganglion_initlib_32", Log_ganglion_initlib_32, - "Log_hres_initlib_32", Log_hres_initlib_32, - "Log_hwr_initlib_32", Log_hwr_initlib_32, - "Log_idiff_initlib_32", Log_idiff_initlib_32, - "Log_iscope_initlib_32", Log_iscope_initlib_32, - "Log_iswitch1_initlib_32", Log_iswitch1_initlib_32, - "Log_iswitch2_initlib_32", Log_iswitch2_initlib_32, - "Log_logntk_proc", Log_logntk_proc, - "Log_logspc_proc", Log_logspc_proc, - "Log_lplot_proc", Log_lplot_proc, - "Log_mmeter_initlib_32", Log_mmeter_initlib_32, - "Log_moscap_initlib_32", Log_moscap_initlib_32, - "Log_mygates_ascdisp", Log_mygates_ascdisp, - "Log_mygates_asckbd", Log_mygates_asckbd, - "Log_mygates_sram8k", Log_mygates_sram8k, - "Log_nfet4_initlib_32", Log_nfet4_initlib_32, - "Log_NFET5_INITLIB_32", Log_NFET5_INITLIB_32, - "Log_NFET7F_INITLIB_32", Log_NFET7F_INITLIB_32, - "Log_NFET7T_INITLIB_32", Log_NFET7T_INITLIB_32, - "Log_NPN1_INITLIB_32", Log_NPN1_INITLIB_32, - "Log_NPN2_INITLIB_32", Log_NPN2_INITLIB_32, - "Log_NSPC1_INITLIB_32", Log_NSPC1_INITLIB_32, - "Log_numbers_initlib_32", Log_numbers_initlib_32, - "Log_opamp_initlib_32", Log_opamp_initlib_32, - "Log_pfet4_initlib_32", Log_pfet4_initlib_32, - "Log_PFET5_INITLIB_32", Log_PFET5_INITLIB_32, - "Log_PFET6_INITLIB_32", Log_PFET6_INITLIB_32, - "Log_PFET7F_INITLIB_32", Log_PFET7F_INITLIB_32, - "Log_PFET7T_INITLIB_32", Log_PFET7T_INITLIB_32, - "Log_PHYSICAL_initlib_32", Log_PHYSICAL_initlib_32, - "Log_PNP1_INITLIB_32", Log_PNP1_INITLIB_32, - "Log_PNP2_INITLIB_32", Log_PNP2_INITLIB_32, - "Log_PSPC1_INITLIB_32", Log_PSPC1_INITLIB_32, - "Log_PWL_INITLIB_32", Log_PWL_INITLIB_32, - "Log_resfloat_initlib_32", Log_resfloat_initlib_32, - "Log_rtd_initlib_32", Log_rtd_initlib_32, - "Log_RUNSPEC_initlib_32", Log_RUNSPEC_initlib_32, - "Log_stairs_initlib_32", Log_stairs_initlib_32, - "Log_THERMAL_initlib_32", Log_THERMAL_initlib_32, - "Log_vdiff_initlib_32", Log_vdiff_initlib_32, - "Log_vswitch_initlib_32", Log_vswitch_initlib_32, - "Log_wramp_initlib_32", Log_wramp_initlib_32, - NULL, NULL -}; - diff --git a/psys/src/libp2c.a b/psys/src/libp2c.a new file mode 100644 index 0000000000000000000000000000000000000000..33968a1c311fd23d817316950fc49e53f35f50e1 Binary files /dev/null and b/psys/src/libp2c.a differ diff --git a/psys/src/mamplot.c b/psys/src/mamplot.c index 0508dabe603b3d183a7c781bb59075f94752529c..d86c9fba27e36265973067808ab84ae221770571 100644 --- a/psys/src/mamplot.c +++ b/psys/src/mamplot.c @@ -10,6 +10,7 @@ #include <p2c/citinfomod.h> #include <p2c/sysdevs.h> +#include <limits.h> typedef enum { pt_log, pt_linear diff --git a/psys/src/math.c b/psys/src/math.c index 79b05c526936885c761b0daae1623f2e44d0b9ea..5ea7b909f0cbd5ab4ca48be0157baf5561f878cd 100644 --- a/psys/src/math.c +++ b/psys/src/math.c @@ -1,5 +1,6 @@ #include <p2c/p2c.h> +#include<limits.h> #define MATH_G #include <p2c/math.h> diff --git a/psys/src/mylib.c b/psys/src/mylib.c index ace71f9bec073fe010c9de2088dc36488bd99b24..79f30fd815301f4fc464f07361dd163537c3dd3d 100644 --- a/psys/src/mylib.c +++ b/psys/src/mylib.c @@ -19,7 +19,8 @@ #include <string.h> #endif /* HIRES */ #include <math.h> -# include <time.h> +#include <sys/time.h> +#include <time.h> #include <p2c/p2c.h> #include <p2c/mylib.h> diff --git a/psys/src/newci.c b/psys/src/newci.c index e0a229ed8f61bef9f557042eef7967c2553d7ed7..99014e6902149df4c93985fb426565afde797f9e 100644 --- a/psys/src/newci.c +++ b/psys/src/newci.c @@ -3,7 +3,8 @@ #include <stdio.h> #include <ctype.h> -# include <time.h> +#include <sys/time.h> +#include <time.h> #include <p2c/p2c.h> #include <p2c/newci.h> diff --git a/psys/src/plot.c b/psys/src/plot.c index 8c0a568b37522c30be822ed59402eb71fcbba889..f5f840f0ebccccd47925d9a4d5d19974bb9c8f44 100644 --- a/psys/src/plot.c +++ b/psys/src/plot.c @@ -41,7 +41,7 @@ #define PLOT_G #include <p2c/plot.h> - +#include<limits.h> #ifndef GENERAL_1_H #include <p2c/general_1.h> diff --git a/psys/src/sysdevs.c b/psys/src/sysdevs.c index 8b278af0470dad8619cb934da3f72978b551a9e7..fa194c95725e1e0665a12ed42c508942bf76af56 100644 --- a/psys/src/sysdevs.c +++ b/psys/src/sysdevs.c @@ -1,6 +1,7 @@ #define SYSDEVS_G -# include <time.h> +#include <sys/time.h> +#include <time.h> #include <p2c/p2c.h>