From 3c5c3716e556478bfc6020bf6ef4c7db6fb12832 Mon Sep 17 00:00:00 2001 From: Etienne Brateau <etienne.brateau@gmail.com> Date: Wed, 16 Oct 2019 21:59:07 +0200 Subject: [PATCH] Reindent logdef --- include/logdef.h | 215 ++++++++++++++++++++++++----------------------- 1 file changed, 111 insertions(+), 104 deletions(-) diff --git a/include/logdef.h b/include/logdef.h index 24b180a..bc471e8 100644 --- a/include/logdef.h +++ b/include/logdef.h @@ -78,88 +78,88 @@ typedef char log_pac4[4]; typedef char log_pac8[8]; typedef union log_kflags { - short i; - unsigned short a; - struct { - unsigned noflip : 1; /* gate can't be flipped/rotated */ - unsigned toggle : 1; /* gate is a toggle switch */ - unsigned visible : 1; /* visible even in invisible mode */ - unsigned named : 1; /* has a to/from signal name */ - unsigned nright : 1; /* to/from name is right-justified */ - unsigned nosolder : 1; /* don't add solder in LPLOT */ - unsigned f6 : 1, f7 : 1, f8 : 1, f9 : 1, f10 : 1, f11 : 1, f12 : 1, - expanded : 1; - /* gate uses expanded format in GATES file */ - unsigned user1 : 1, user2 : 1; /* simtype-defined flags */ - } U3; + short i; + unsigned short a; + struct { + unsigned noflip : 1; /* gate can't be flipped/rotated */ + unsigned toggle : 1; /* gate is a toggle switch */ + unsigned visible : 1; /* visible even in invisible mode */ + unsigned named : 1; /* has a to/from signal name */ + unsigned nright : 1; /* to/from name is right-justified */ + unsigned nosolder : 1; /* don't add solder in LPLOT */ + unsigned f6 : 1, f7 : 1, f8 : 1, f9 : 1, f10 : 1, f11 : 1, f12 : 1, + expanded : 1; + /* gate uses expanded format in GATES file */ + unsigned user1 : 1, user2 : 1; /* simtype-defined flags */ + } U3; } log_kflags; typedef struct log_vectorrec { - char vkind; - schar numcoords, x1, y1; - union { - struct { - schar x2, y2, x3, y3, x4, y4; - } U99; - struct { - uchar ux2, uy2, num; - } U98; - struct { - uchar tsize, torg; - char *sp; - } U116; - } UU; + char vkind; + schar numcoords, x1, y1; + union { + struct { + schar x2, y2, x3, y3, x4, y4; + } U99; + struct { + uchar ux2, uy2, num; + } U98; + struct { + uchar tsize, torg; + char *sp; + } U116; + } UU; } log_vectorrec; typedef struct log_pinrec { - schar x, y, s; - uchar c; + schar x, y, s; + uchar c; } log_pinrec; typedef struct log_pnumrec { - schar x, y; - short num; + schar x, y; + short num; } log_pnumrec; typedef struct log_kattrrec { - unsigned blnk : 1, opt : 1; /*default is blank, value is optional*/ - uchar prec; /*display precision (# digits)*/ - uchar vr, vra; /*variant number, variant attribute*/ - uchar x, y; /*alpha coords*/ - uchar dtype; - union { - struct { - double r; - char u[4]; - } U82; - struct { - long i1, i2; - } U73; - char *c; - char *sp; - unsigned b : 1 ; - struct { - strlist_t *v; - short nv, dv; - } U86; - } UU; + unsigned blnk : 1, opt : 1; /*default is blank, value is optional*/ + uchar prec; /*display precision (# digits)*/ + uchar vr, vra; /*variant number, variant attribute*/ + uchar x, y; /*alpha coords*/ + uchar dtype; + union { + struct { + double r; + char u[4]; + } U82; + struct { + long i1, i2; + } U73; + char *c; + char *sp; + unsigned b : 1 ; + struct { + strlist_t *v; + short nv, dv; + } U86; + } UU; } log_kattrrec; typedef struct log_gattrrec { - uchar x2; - unsigned blnk : 1, supr : 1; - /*, touched*/ - unsigned changed : 1; - union { - double r; - struct { - long i1, i2; - } U73; - char *c; - char *sp; - unsigned b : 1 ; - short nv; - } UU; + uchar x2; + unsigned blnk : 1, supr : 1; + /*, touched*/ + unsigned changed : 1; + union { + double r; + struct { + long i1, i2; + } U73; + char *c; + char *sp; + unsigned b : 1 ; + short nv; + } UU; } log_gattrrec; /* Gate attribute entry */ /* Pointer to globals */ @@ -178,65 +178,72 @@ typedef struct log_gattrrec { /* Pointer to sensitive region */ typedef struct log_krec { - na_long info; - uchar *proc; - log_kattrrec *attr; - struct log_tool *simtype; - char name[9]; - uchar group; - short dummy1, dummy2, numvects, numpins, numpnums, numattrs; - log_kflags flag; - schar x1, y1, x2, y2; - long code; - strlist_t *lbl; - log_vectorrec *vector; - log_pinrec *pin; - log_pnumrec *pnum; - struct log_krec *next; - schar bbx1, bby1, bbx2, bby2; /*7/14/88*/ - short bbmax; /*7/14/88*/ - long bigprocsize, biglblsize, bigvectsize; - strlist_t **pinnames; + na_long info; + uchar *proc; + log_kattrrec *attr; + struct log_tool *simtype; + char name[9]; + uchar group; + short dummy1; + short dummy2; + short numvects; + short numpins; + short numpnums; + short numattrs; + log_kflags flag; + schar x1, y1, x2, y2; + long code; + strlist_t *lbl; + log_vectorrec *vector; + log_pinrec *pin; + log_pnumrec *pnum; + struct log_krec *next; + schar bbx1, bby1, bbx2, bby2; /*7/14/88*/ + short bbmax; /*7/14/88*/ + long bigprocsize; + long biglblsize; + long bigvectsize; + strlist_t **pinnames; } log_krec; typedef struct log_pinposrec { - short x, y; + short x, y; } log_pinposrec; typedef struct log_nrec log_nrec; /* Node */ typedef struct log_sigrec { - char *name; - unsigned f : 1, keep : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; - na_long temp; - log_nrec *np; /* Node value */ + char *name; + unsigned f : 1, keep : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; + na_long temp; + log_nrec *np; /* Node value */ } log_sigrec; /* Signal name */ typedef struct log_htrec { - struct log_htrec *next; - double time; - void *val[log_million]; /*NEWFP shortreals*/ + struct log_htrec *next; + double time; + void *val[log_million]; /*NEWFP shortreals*/ } log_htrec; /* History timestep */ typedef struct log_hnrec { - short y, sig, num; - log_gattrrec *attr; - struct log_hnrec *next; + short y, sig, num; + log_gattrrec *attr; + struct log_hnrec *next; } log_hnrec; /* History name */ typedef struct log_brec log_brec; typedef enum { - simst_null, simst_off, simst_notactive, simst_notready, simst_running + simst_null, simst_off, simst_notactive, simst_notready, simst_running } log_simstatekinds; typedef struct log_colorrec { - short backgr, cursor, gate, dimgate, kindgate, catgate, gatepin, pinnum; - short wire[log_wcol_blue - log_wcol_normal + 1]; - short xwire, solder, conflict, menuword, selword, message, baseline, - curbaseline, page1, page2, page3, page4, select, signal, scroll, - labeltext, dashbox, marker, chart, division, popupbox, popupword, - popupsel, redword, blueword, vlsicut; + short backgr, cursor, gate, dimgate, kindgate, catgate, gatepin, pinnum; + short wire[log_wcol_blue - log_wcol_normal + 1]; + short xwire, solder, conflict, menuword, selword, message, baseline, + curbaseline, page1, page2, page3, page4, select, signal, scroll, + labeltext, dashbox, marker, chart, division, popupbox, popupword, + popupsel, redword, blueword, vlsicut; } log_colorrec; -- GitLab