From b2e7c28127dc07999c78be17adcf61447f486d14 Mon Sep 17 00:00:00 2001 From: Stefan Schippers Date: Fri, 25 Sep 2020 17:54:50 +0200 Subject: [PATCH] remove old obsolete comments --- src/save.c | 60 +++++++++++++++++++++++++--------------------------- src/xschem.h | 7 +++--- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/src/save.c b/src/save.c index 2cecc003..c6af27f4 100644 --- a/src/save.c +++ b/src/save.c @@ -1292,17 +1292,17 @@ int load_sym_def(const char *name, FILE *embed_fd) int incremented_level=0; int level = 0; int max_level, save; - char name2[PATH_MAX]; /* 20161122 overflow safe */ - char name3[PATH_MAX]; /* 20161122 overflow safe */ - char name4[PATH_MAX]; /* 20161122 overflow safe */ + char name2[PATH_MAX]; + char name3[PATH_MAX]; + char name4[PATH_MAX]; Box tmp,boundbox; - int i,c,count=0, k, poly_points; /* 20171115 polygon stuff */ + int i,c,count=0, k, poly_points; char *aux_ptr=NULL; char *prop_ptr=NULL, *symtype=NULL; double inst_x0, inst_y0; int inst_rot, inst_flip; char *symname = NULL; - char tag[1]; /* overflow safe 20161122 */ + char tag[1]; int *lastl = my_malloc(333, cadlayers * sizeof(lastl)); int *lastr = my_malloc(334, cadlayers * sizeof(int)); int *lastp = my_malloc(335, cadlayers * sizeof(int)); @@ -1311,7 +1311,7 @@ int load_sym_def(const char *name, FILE *embed_fd) Box **bb = my_malloc(338, cadlayers * sizeof(Box *)); xArc **aa = my_malloc(339, cadlayers * sizeof(xArc *)); xPolygon **pp = my_malloc(340, cadlayers * sizeof(xPolygon *)); - int lastt; /* 20171115 lastp */ + int lastt; Text *tt; int endfile; const char *str; @@ -1354,7 +1354,7 @@ int load_sym_def(const char *name, FILE *embed_fd) endfile=0; for(c=0;c=cadlayers) { fprintf(errfp,"FATAL: box layer > defined cadlayers, increase cadlayers\n"); tcleval( "exit"); - } /* 20150408 */ + } if (level>0 && c == PINLAYER) /* Don't care about pins inside SYM */ c = 7; i=lastr[c]; @@ -1576,7 +1575,7 @@ int load_sym_def(const char *name, FILE *embed_fd) bb[c][i].x1 = lcc[level].x0 + rx1; bb[c][i].y1 = lcc[level].y0 + ry1; bb[c][i].x2 = lcc[level].x0 + rx2; bb[c][i].y2 = lcc[level].y0 + ry2; } - RECTORDER(bb[c][i].x1, bb[c][i].y1, bb[c][i].x2, bb[c][i].y2); /* 20180108 */ + RECTORDER(bb[c][i].x1, bb[c][i].y1, bb[c][i].x2, bb[c][i].y2); bb[c][i].prop_ptr=NULL; load_ascii_string( &bb[c][i].prop_ptr, lcc[level].fd); dbg(2, "l_d_s(): loaded rect: ptr=%lx\n", (unsigned long)bb[c]); @@ -1616,14 +1615,14 @@ int load_sym_def(const char *name, FILE *embed_fd) dbg(1, "l_d_s(): loaded text : t=%s p=%s\n", tt[i].txt_ptr, tt[i].prop_ptr); - my_strdup(351, &tt[i].font, get_tok_value(tt[i].prop_ptr, "font", 0));/*20171206 */ + my_strdup(351, &tt[i].font, get_tok_value(tt[i].prop_ptr, "font", 0)); str = get_tok_value(tt[i].prop_ptr, "hcenter", 0); tt[i].hcenter = strcmp(str, "true") ? 0 : 1; str = get_tok_value(tt[i].prop_ptr, "vcenter", 0); tt[i].vcenter = strcmp(str, "true") ? 0 : 1; - str = get_tok_value(tt[i].prop_ptr, "layer", 0); /*20171206 */ + str = get_tok_value(tt[i].prop_ptr, "layer", 0); if(str[0]) tt[i].layer = atoi(str); else tt[i].layer = -1; @@ -1652,7 +1651,7 @@ int load_sym_def(const char *name, FILE *embed_fd) ll[WIRELAYER][i].x1 = lcc[level].x0 + rx1; ll[WIRELAYER][i].y1 = lcc[level].y0 + ry1; ll[WIRELAYER][i].x2 = lcc[level].x0 + rx2; ll[WIRELAYER][i].y2 = lcc[level].y0 + ry2; } - ORDER(ll[WIRELAYER][i].x1, ll[WIRELAYER][i].y1, ll[WIRELAYER][i].x2, ll[WIRELAYER][i].y2); /* 20180108 */ + ORDER(ll[WIRELAYER][i].x1, ll[WIRELAYER][i].y1, ll[WIRELAYER][i].x2, ll[WIRELAYER][i].y2); ll[WIRELAYER][i].prop_ptr=NULL; load_ascii_string( &ll[WIRELAYER][i].prop_ptr, lcc[level].fd); dbg(2, "l_d_s(): loaded line: ptr=%lx\n", (unsigned long)ll[WIRELAYER]); @@ -1712,7 +1711,7 @@ int load_sym_def(const char *name, FILE *embed_fd) my_realloc(652, &bb[PINLAYER], (i + 1) * sizeof(Box)); bb[PINLAYER][i].x1 = inst_x0 - 2.5; bb[PINLAYER][i].x2 = inst_x0 + 2.5; bb[PINLAYER][i].y1 = inst_y0 - 2.5; bb[PINLAYER][i].y2 = inst_y0 + 2.5; - RECTORDER(bb[PINLAYER][i].x1, bb[PINLAYER][i].y1, bb[PINLAYER][i].x2, bb[PINLAYER][i].y2); /* 20180108 */ + RECTORDER(bb[PINLAYER][i].x1, bb[PINLAYER][i].y1, bb[PINLAYER][i].x2, bb[PINLAYER][i].y2); bb[PINLAYER][i].prop_ptr = NULL; label = get_tok_value(prop_ptr, "lab", 0); @@ -1879,7 +1878,7 @@ int load_sym_def(const char *name, FILE *embed_fd) tmp.x1=bb[c][i].x1;tmp.y1=bb[c][i].y1;tmp.x2=bb[c][i].x2;tmp.y2=bb[c][i].y2; updatebbox(count,&boundbox,&tmp); } - for(i=0;i 1) return; /*20121122 */ + if(lastselected > 1) return; if(lastselected==1 && selectedgroup[0].type==ELEMENT) { - if(modified) { /* 20161209 */ + if(modified) { if(save(1)) return; } my_snprintf(name, S(name), "%s", inst_ptr[selectedgroup[0].n].name); @@ -2091,7 +2089,7 @@ void descend_symbol(void) else return; /* build up current hierarchy path */ - my_strdup(363, &str, inst_ptr[selectedgroup[0].n].instname); /* 20180911 */ + my_strdup(363, &str, inst_ptr[selectedgroup[0].n].instname); my_strdup(364, &sch_path[currentsch+1], sch_path[currentsch]); my_strcat(365, &sch_path[currentsch+1], str); my_strcat(366, &sch_path[currentsch+1], "."); diff --git a/src/xschem.h b/src/xschem.h index 23538e4f..216b61b6 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -23,7 +23,7 @@ #ifndef CADGLOBALS #define CADGLOBALS -#define XSCHEM_VERSION "2.9.7" +#define XSCHEM_VERSION "2.9.8" #define XSCHEM_FILE_VERSION "1.2" #if HAS_PIPE == 1 @@ -100,7 +100,6 @@ extern char win_temp_dir[PATH_MAX]; #include #include -/* #include "memwatch.h" */ #define CADHEIGHT 700 /* initial window size */ #define CADWIDTH 1000 @@ -141,7 +140,7 @@ extern char win_temp_dir[PATH_MAX]; #define CADCHUNKALLOC 512 /* was 256 20102004 */ #define CADDRAWBUFFERSIZE 128 -/* 20180104 when x-width of drawing area s below this threshold use spatial */ +/* when x-width of drawing area s below this threshold use spatial */ /* hash table for drawing wires and instances (for faster lookup) instead of */ /* looping through the whole wire[] and inst_ptr[] arrays */ /* when drawing area is very big using spatial hash table may take longer than */ @@ -170,7 +169,7 @@ extern char win_temp_dir[PATH_MAX]; #define MENUSTARTLINE 2048 /* start line invoked from menu */ #define MENUSTARTRECT 4096 /* start rect invoked from menu */ #define MENUSTARTZOOM 8192 /* start zoom box invoked from menu */ -#define STARTPAN2 16384 /* new pan method with mouse button3 20121123 */ +#define STARTPAN2 16384 /* new pan method with mouse button3 */ #define MENUSTARTTEXT 32768 /* 20161201 click to place text if action starts from menu */ #define MENUSTARTSNAPWIRE 65536 /* start wire invoked from menu, snap to pin variant 20171022 */ #define STARTPOLYGON 131072 /* 20171115 */