|
|
|
@ -896,8 +896,7 @@ readline(FILE *fd) |
|
|
|
while ((c = getc(fd)) != EOF) { |
|
|
|
if (strlen == 0 && (c == '\t' || c == ' ')) /* Leading spaces away */ |
|
|
|
continue; |
|
|
|
strptr[strlen] = (char) c; |
|
|
|
strlen++; |
|
|
|
strptr[strlen++] = (char) c; |
|
|
|
if (strlen >= memlen) { |
|
|
|
memlen += STRGROW; |
|
|
|
if ((strptr = TREALLOC(char, strptr, memlen + 1)) == NULL) |
|
|
|
@ -944,7 +943,8 @@ inp_fix_gnd_name(struct line *c) |
|
|
|
} |
|
|
|
|
|
|
|
static struct line* |
|
|
|
create_new_card(char *card_str, int *line_number) { |
|
|
|
create_new_card(char *card_str, int *line_number) |
|
|
|
{ |
|
|
|
struct line *newcard = alloc(struct line); |
|
|
|
|
|
|
|
newcard->li_line = strdup(card_str); |
|
|
|
@ -1219,7 +1219,7 @@ inp_fix_macro_param_func_paren_io(struct line *card) |
|
|
|
} |
|
|
|
if (*str_ptr == '(') { |
|
|
|
*str_ptr = ' '; |
|
|
|
while (*str_ptr && *str_ptr != '\0') { |
|
|
|
while (*str_ptr != '\0') { |
|
|
|
if (*str_ptr == ')') { |
|
|
|
*str_ptr = ' '; |
|
|
|
break; |
|
|
|
@ -1817,6 +1817,8 @@ inp_fix_ternary_operator(struct line *card) |
|
|
|
for (; card; card = card->li_next) { |
|
|
|
char *line = card->li_line; |
|
|
|
|
|
|
|
if (*line == '*') |
|
|
|
continue; |
|
|
|
/* exclude replacement of ternary function between .control and .endc */ |
|
|
|
if (ciprefix(".control", line)) |
|
|
|
found_control = TRUE; |
|
|
|
@ -1828,8 +1830,6 @@ inp_fix_ternary_operator(struct line *card) |
|
|
|
/* ternary operator for B source done elsewhere */ |
|
|
|
if (*line == 'B' || *line == 'b') |
|
|
|
continue; |
|
|
|
if (*line == '*') |
|
|
|
continue; |
|
|
|
/* .param, .func, and .meas lines handled here (2nd argument FALSE) */ |
|
|
|
if (strchr(line, '?') && strchr(line, ':')) |
|
|
|
card->li_line = inp_fix_ternary_operator_str(line, FALSE); |
|
|
|
@ -1960,7 +1960,7 @@ inp_change_quotes(char *s) |
|
|
|
{ |
|
|
|
bool first_quote = FALSE; |
|
|
|
|
|
|
|
while (*s) { |
|
|
|
for (; *s; s++) |
|
|
|
if (*s == '\'') { |
|
|
|
if (first_quote == FALSE) { |
|
|
|
*s = '{'; |
|
|
|
@ -1970,8 +1970,6 @@ inp_change_quotes(char *s) |
|
|
|
first_quote = FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
s++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -5672,7 +5670,8 @@ inp_poly_err(struct line *card) |
|
|
|
/* get the fourth token in a controlled source line and exit, |
|
|
|
if it is 'poly' */ |
|
|
|
if ((ciprefix("e", curr_line)) || (ciprefix("g", curr_line)) || |
|
|
|
(ciprefix("f", curr_line)) || (ciprefix("h", curr_line))) { |
|
|
|
(ciprefix("f", curr_line)) || (ciprefix("h", curr_line))) |
|
|
|
{ |
|
|
|
txfree(gettok(&curr_line)); |
|
|
|
txfree(gettok(&curr_line)); |
|
|
|
txfree(gettok(&curr_line)); |
|
|
|
|