move skipping white spaces to fcn create_circbyline() now ' .end' is acknowledged
This commit is contained in:
parent
55b2a0218e
commit
5f5eacc48e
|
|
@ -1483,6 +1483,9 @@ create_circbyline(char *line)
|
|||
FILE *fp = NULL;
|
||||
if (!circarray)
|
||||
circarray = TMALLOC(char*, memlen);
|
||||
char *p = skip_ws(line);
|
||||
if (line < p)
|
||||
memmove(line, p, strlen(p) + 1);
|
||||
circarray[linec++] = line;
|
||||
if (linec < memlen) {
|
||||
if (ciprefix(".end", line) && (line[4] == '\0' || isspace_c(line[4]))) {
|
||||
|
|
|
|||
|
|
@ -676,15 +676,11 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
|
|||
for (;;) {
|
||||
/* derive lines from circarray */
|
||||
if (intfile) {
|
||||
char *p;
|
||||
buffer = circarray[cirlinecount++];
|
||||
if (!buffer) {
|
||||
tfree(circarray);
|
||||
break;
|
||||
}
|
||||
p = skip_ws(buffer);
|
||||
if (buffer < p)
|
||||
memmove(buffer, p, strlen(p) + 1);
|
||||
}
|
||||
/* read lines from file fp */
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue