From 192eeadb0b68cba1e659f1efac4955d501a29ce9 Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 22 Sep 2015 21:12:31 +0200 Subject: [PATCH] remove crufty comments which where used to support broken text editors --- src/frontend/breakp2.c | 4 ++-- src/frontend/define.c | 16 ++++++++-------- src/frontend/dotcards.c | 8 ++++---- src/frontend/parser/glob.c | 4 ++-- src/frontend/variable.c | 2 +- src/frontend/vectors.c | 6 +++--- src/misc/string.c | 8 ++++---- src/spicelib/devices/ltra/ltraload.c | 1 - 8 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/frontend/breakp2.c b/src/frontend/breakp2.c index 7509e1f00..7e85255bb 100644 --- a/src/frontend/breakp2.c +++ b/src/frontend/breakp2.c @@ -151,11 +151,11 @@ copynode(char *s) else s = copy(s); - l = strrchr(s, '('/*)*/); + l = strrchr(s, '('); if (!l) return s; - r = strchr(s, /*(*/')'); + r = strchr(s, ')'); *r = '\0'; if (*(l - 1) == 'i' || *(l - 1) == 'I') ret = tprintf("%s#branch", l + 1); diff --git a/src/frontend/define.c b/src/frontend/define.c index 0b145e6d4..c1547249c 100644 --- a/src/frontend/define.c +++ b/src/frontend/define.c @@ -58,16 +58,16 @@ com_define(wordlist *wlist) */ buf[0] = '\0'; - for (wl = wlist; wl && (strchr(wl->wl_word, /* ( */ ')') == NULL); + for (wl = wlist; wl && (strchr(wl->wl_word, ')') == NULL); wl = wl->wl_next) (void) strcat(buf, wl->wl_word); if (wl) { for (t = buf; *t; t++) ; - for (s = wl->wl_word; *s && (*s != /* ( */ ')'); s++, t++) + for (s = wl->wl_word; *s && (*s != ')'); s++, t++) *t = *s; - *t++ = /* ( */ ')'; + *t++ = ')'; *t = '\0'; if (*++s) wl->wl_word = copy(s); @@ -87,7 +87,7 @@ com_define(wordlist *wlist) (void) strcpy(tbuf, buf); for (b = tbuf; *b; b++) - if (isspace(*b) || (*b == '(' /* ) */)) { + if (isspace(*b) || (*b == '(')) { *b = '\0'; break; } @@ -115,11 +115,11 @@ com_define(wordlist *wlist) /* Format the name properly and add to the list. */ b = copy(buf); for (s = b; *s; s++) { - if (*s == '(') { /*)*/ + if (*s == '(') { *s = '\0'; - if (s[1] != /*(*/ ')') + if (s[1] != ')') arity++; /* It will have been 0. */ - } else if (*s == /*(*/ ')') { + } else if (*s == ')') { *s = '\0'; } else if (*s == ',') { *s = '\0'; @@ -201,7 +201,7 @@ prdefs(char *name) char *s; if (name) { - s = strchr(name, '(' /* ) */); + s = strchr(name, '('); if (s) *s = '\0'; } diff --git a/src/frontend/dotcards.c b/src/frontend/dotcards.c index ad7b5f9f2..2e3fd5ad2 100644 --- a/src/frontend/dotcards.c +++ b/src/frontend/dotcards.c @@ -421,7 +421,7 @@ fixdotplot(wordlist *wl) /* Is this a trailing (a,b) ? Note that we require it to be * one word. */ - if (!wl->wl_next && (*wl->wl_word == '(')) /*)*/ { + if (!wl->wl_next && (*wl->wl_word == '(')) { s = wl->wl_word + 1; d = ft_numparse(&s, FALSE); if (*s != ',') { @@ -432,7 +432,7 @@ fixdotplot(wordlist *wl) d1 = *d; s++; d = ft_numparse(&s, FALSE); - if ((*s != /*(*/ ')') || s[1]) { + if ((*s != ')') || s[1]) { fprintf(cp_err, "Error: bad limits \"%s\"\n", wl->wl_word); return; @@ -585,7 +585,7 @@ gettoks(char *s) tfree(t); continue; } - l = strrchr(t, '('/*)*/); + l = strrchr(t, '('); if (!l) { wl = wl_cons(copy(t), NULL); *prevp = wl; @@ -594,7 +594,7 @@ gettoks(char *s) continue; } - r = strchr(t, /*(*/')'); + r = strchr(t, ')'); c = strchr(t, ','); if (!c) diff --git a/src/frontend/parser/glob.c b/src/frontend/parser/glob.c index 6d39025f4..ffde3323f 100644 --- a/src/frontend/parser/glob.c +++ b/src/frontend/parser/glob.c @@ -125,7 +125,7 @@ brac1(char *string) nb++; if (*s == cp_ccurl) nb--; - if (*s == '\0') { /* { */ + if (*s == '\0') { fprintf(cp_err, "Error: missing }.\n"); return (NULL); } @@ -180,7 +180,7 @@ brac2(char *string) nb++; if (*s == cp_ccurl) nb--; - if (*s == '\0') { /* { */ + if (*s == '\0') { fprintf(cp_err, "Error: missing }.\n"); return (NULL); } diff --git a/src/frontend/variable.c b/src/frontend/variable.c index d8e796694..03523cdf5 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -334,7 +334,7 @@ cp_setparse(wordlist *wl) strcpy(val, copyval); tfree(copyval); - if (eq(val, "(")) { /* ) */ + if (eq(val, "(")) { /* The beginning of a list... We have to walk down the * list until we find a close paren... If there are nested * ()'s, treat them as tokens... */ diff --git a/src/frontend/vectors.c b/src/frontend/vectors.c index 70c02ef46..b16cad4eb 100644 --- a/src/frontend/vectors.c +++ b/src/frontend/vectors.c @@ -383,11 +383,11 @@ vec_fromplot(char *word, struct plot *plot) } /* scanf("%c(%s)" doesn't do what it should do. ) */ - if (!d && (sscanf(word, "%c(%s", /* ) */ &cc, buf) == 2) && - /* ( */ ((s = strrchr(buf, ')')) != NULL) && + if (!d && (sscanf(word, "%c(%s", &cc, buf) == 2) && + ((s = strrchr(buf, ')')) != NULL) && (s[1] == '\0')) { *s = '\0'; - if (prefix("i(", /* ) */ word) || prefix("I(", /* ) */ word)) { + if (prefix("i(", word) || prefix("I(", word)) { /* Spice dependency... */ (void) sprintf(buf2, "%s#branch", buf); (void) strcpy(buf, buf2); diff --git a/src/misc/string.c b/src/misc/string.c index 07386f43d..9fa420ae1 100644 --- a/src/misc/string.c +++ b/src/misc/string.c @@ -288,9 +288,9 @@ gettok(char **s) return (NULL); beg = *s ; while ((c = **s) != '\0' && !isspace(c)) { - if (c == '('/*)*/) + if (c == '(') paren += 1; - else if (c == /*(*/')') + else if (c == ')') paren -= 1; else if (c == ',' && paren < 1) break; @@ -325,9 +325,9 @@ gettok_iv(char **s) // add v or i to buf spice_dstring_append_char( &buf, *(*s)++ ) ; while ((c = **s) != '\0') { - if (c == '('/*)*/) + if (c == '(') paren += 1; - else if (c == /*(*/')') + else if (c == ')') paren -= 1; if (isspace(c)) (*s)++; diff --git a/src/spicelib/devices/ltra/ltraload.c b/src/spicelib/devices/ltra/ltraload.c index 39160b940..ec65e6ab8 100644 --- a/src/spicelib/devices/ltra/ltraload.c +++ b/src/spicelib/devices/ltra/ltraload.c @@ -149,7 +149,6 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt) #ifdef LTRADEBUG printf("LTRAload: mistake: cannot find delayed timepoint\n"); return E_INTERN; - /*}*/ #else return E_INTERN; #endif