Browse Source

remove crufty comments which where used to support broken text editors

pre-master-46
rlar 11 years ago
parent
commit
192eeadb0b
  1. 4
      src/frontend/breakp2.c
  2. 16
      src/frontend/define.c
  3. 8
      src/frontend/dotcards.c
  4. 4
      src/frontend/parser/glob.c
  5. 2
      src/frontend/variable.c
  6. 6
      src/frontend/vectors.c
  7. 8
      src/misc/string.c
  8. 1
      src/spicelib/devices/ltra/ltraload.c

4
src/frontend/breakp2.c

@ -151,11 +151,11 @@ copynode(char *s)
else else
s = copy(s); s = copy(s);
l = strrchr(s, '('/*)*/);
l = strrchr(s, '(');
if (!l) if (!l)
return s; return s;
r = strchr(s, /*(*/')');
r = strchr(s, ')');
*r = '\0'; *r = '\0';
if (*(l - 1) == 'i' || *(l - 1) == 'I') if (*(l - 1) == 'i' || *(l - 1) == 'I')
ret = tprintf("%s#branch", l + 1); ret = tprintf("%s#branch", l + 1);

16
src/frontend/define.c

@ -58,16 +58,16 @@ com_define(wordlist *wlist)
*/ */
buf[0] = '\0'; 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) wl = wl->wl_next)
(void) strcat(buf, wl->wl_word); (void) strcat(buf, wl->wl_word);
if (wl) { if (wl) {
for (t = buf; *t; t++) 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 = *s;
*t++ = /* ( */ ')';
*t++ = ')';
*t = '\0'; *t = '\0';
if (*++s) if (*++s)
wl->wl_word = copy(s); wl->wl_word = copy(s);
@ -87,7 +87,7 @@ com_define(wordlist *wlist)
(void) strcpy(tbuf, buf); (void) strcpy(tbuf, buf);
for (b = tbuf; *b; b++) for (b = tbuf; *b; b++)
if (isspace(*b) || (*b == '(' /* ) */)) {
if (isspace(*b) || (*b == '(')) {
*b = '\0'; *b = '\0';
break; break;
} }
@ -115,11 +115,11 @@ com_define(wordlist *wlist)
/* Format the name properly and add to the list. */ /* Format the name properly and add to the list. */
b = copy(buf); b = copy(buf);
for (s = b; *s; s++) { for (s = b; *s; s++) {
if (*s == '(') { /*)*/
if (*s == '(') {
*s = '\0'; *s = '\0';
if (s[1] != /*(*/ ')')
if (s[1] != ')')
arity++; /* It will have been 0. */ arity++; /* It will have been 0. */
} else if (*s == /*(*/ ')') {
} else if (*s == ')') {
*s = '\0'; *s = '\0';
} else if (*s == ',') { } else if (*s == ',') {
*s = '\0'; *s = '\0';
@ -201,7 +201,7 @@ prdefs(char *name)
char *s; char *s;
if (name) { if (name) {
s = strchr(name, '(' /* ) */);
s = strchr(name, '(');
if (s) if (s)
*s = '\0'; *s = '\0';
} }

8
src/frontend/dotcards.c

@ -421,7 +421,7 @@ fixdotplot(wordlist *wl)
/* Is this a trailing (a,b) ? Note that we require it to be /* Is this a trailing (a,b) ? Note that we require it to be
* one word. * one word.
*/ */
if (!wl->wl_next && (*wl->wl_word == '(')) /*)*/ {
if (!wl->wl_next && (*wl->wl_word == '(')) {
s = wl->wl_word + 1; s = wl->wl_word + 1;
d = ft_numparse(&s, FALSE); d = ft_numparse(&s, FALSE);
if (*s != ',') { if (*s != ',') {
@ -432,7 +432,7 @@ fixdotplot(wordlist *wl)
d1 = *d; d1 = *d;
s++; s++;
d = ft_numparse(&s, FALSE); d = ft_numparse(&s, FALSE);
if ((*s != /*(*/ ')') || s[1]) {
if ((*s != ')') || s[1]) {
fprintf(cp_err, "Error: bad limits \"%s\"\n", fprintf(cp_err, "Error: bad limits \"%s\"\n",
wl->wl_word); wl->wl_word);
return; return;
@ -585,7 +585,7 @@ gettoks(char *s)
tfree(t); tfree(t);
continue; continue;
} }
l = strrchr(t, '('/*)*/);
l = strrchr(t, '(');
if (!l) { if (!l) {
wl = wl_cons(copy(t), NULL); wl = wl_cons(copy(t), NULL);
*prevp = wl; *prevp = wl;
@ -594,7 +594,7 @@ gettoks(char *s)
continue; continue;
} }
r = strchr(t, /*(*/')');
r = strchr(t, ')');
c = strchr(t, ','); c = strchr(t, ',');
if (!c) if (!c)

4
src/frontend/parser/glob.c

@ -125,7 +125,7 @@ brac1(char *string)
nb++; nb++;
if (*s == cp_ccurl) if (*s == cp_ccurl)
nb--; nb--;
if (*s == '\0') { /* { */
if (*s == '\0') {
fprintf(cp_err, "Error: missing }.\n"); fprintf(cp_err, "Error: missing }.\n");
return (NULL); return (NULL);
} }
@ -180,7 +180,7 @@ brac2(char *string)
nb++; nb++;
if (*s == cp_ccurl) if (*s == cp_ccurl)
nb--; nb--;
if (*s == '\0') { /* { */
if (*s == '\0') {
fprintf(cp_err, "Error: missing }.\n"); fprintf(cp_err, "Error: missing }.\n");
return (NULL); return (NULL);
} }

2
src/frontend/variable.c

@ -334,7 +334,7 @@ cp_setparse(wordlist *wl)
strcpy(val, copyval); strcpy(val, copyval);
tfree(copyval); tfree(copyval);
if (eq(val, "(")) { /* ) */
if (eq(val, "(")) {
/* The beginning of a list... We have to walk down the /* The beginning of a list... We have to walk down the
* list until we find a close paren... If there are nested * list until we find a close paren... If there are nested
* ()'s, treat them as tokens... */ * ()'s, treat them as tokens... */

6
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. ) */ /* 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[1] == '\0')) {
*s = '\0'; *s = '\0';
if (prefix("i(", /* ) */ word) || prefix("I(", /* ) */ word)) {
if (prefix("i(", word) || prefix("I(", word)) {
/* Spice dependency... */ /* Spice dependency... */
(void) sprintf(buf2, "%s#branch", buf); (void) sprintf(buf2, "%s#branch", buf);
(void) strcpy(buf, buf2); (void) strcpy(buf, buf2);

8
src/misc/string.c

@ -288,9 +288,9 @@ gettok(char **s)
return (NULL); return (NULL);
beg = *s ; beg = *s ;
while ((c = **s) != '\0' && !isspace(c)) { while ((c = **s) != '\0' && !isspace(c)) {
if (c == '('/*)*/)
if (c == '(')
paren += 1; paren += 1;
else if (c == /*(*/')')
else if (c == ')')
paren -= 1; paren -= 1;
else if (c == ',' && paren < 1) else if (c == ',' && paren < 1)
break; break;
@ -325,9 +325,9 @@ gettok_iv(char **s)
// add v or i to buf // add v or i to buf
spice_dstring_append_char( &buf, *(*s)++ ) ; spice_dstring_append_char( &buf, *(*s)++ ) ;
while ((c = **s) != '\0') { while ((c = **s) != '\0') {
if (c == '('/*)*/)
if (c == '(')
paren += 1; paren += 1;
else if (c == /*(*/')')
else if (c == ')')
paren -= 1; paren -= 1;
if (isspace(c)) if (isspace(c))
(*s)++; (*s)++;

1
src/spicelib/devices/ltra/ltraload.c

@ -149,7 +149,6 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
#ifdef LTRADEBUG #ifdef LTRADEBUG
printf("LTRAload: mistake: cannot find delayed timepoint\n"); printf("LTRAload: mistake: cannot find delayed timepoint\n");
return E_INTERN; return E_INTERN;
/*}*/
#else #else
return E_INTERN; return E_INTERN;
#endif #endif

Loading…
Cancel
Save