remove crufty comments which where used to support broken text editors

This commit is contained in:
rlar 2015-09-22 21:12:31 +02:00
parent a324d86878
commit 192eeadb0b
8 changed files with 24 additions and 25 deletions

View File

@ -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);

View File

@ -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';
}

View File

@ -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)

View File

@ -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);
}

View File

@ -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... */

View File

@ -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);

View File

@ -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)++;

View File

@ -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