fix tokenisation operator in strings
This commit is contained in:
parent
a65f757a2c
commit
0786aed158
@ -1832,21 +1832,22 @@ static void substallpatterns(unsigned char *line,int buffersize)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void doconcat(const char *line)
|
||||
static void ppconcat(const char *line)
|
||||
{
|
||||
register int i;
|
||||
const char *p, *b;
|
||||
for (i=0; *(line+i)!='\0'; ++i) {
|
||||
if (*(line+i)=='#' && *(line+i+1)=='#') {
|
||||
p=line+i-1;
|
||||
b=line+i+2;
|
||||
register const char *c, *p, *b;
|
||||
for (c=line; *c!='\0'; ++c) {
|
||||
if (is_startstring(c))
|
||||
c=skipstring(c);
|
||||
if(*c=='#' && *(c+1)=='#') {
|
||||
p=c-1;
|
||||
b=c+2;
|
||||
while (*p==' ')
|
||||
p--;
|
||||
while (*b==' ')
|
||||
b++;
|
||||
strcpy((char*)p+1, b);
|
||||
strcpy((char*)p+1,b);
|
||||
} /* if */
|
||||
} /* for */
|
||||
} /* switch */
|
||||
}
|
||||
|
||||
/* preprocess
|
||||
@ -1872,14 +1873,14 @@ SC_FUNC void preprocess(void)
|
||||
stripcom(pline); /* ??? no need for this when reading back from list file (in the second pass) */
|
||||
lptr=pline; /* set "line pointer" to start of the parsing buffer */
|
||||
iscommand=command();
|
||||
doconcat(lptr);
|
||||
ppconcat((char*)lptr);
|
||||
if (iscommand!=CMD_NONE)
|
||||
errorset(sRESET,0); /* reset error flag ("panic mode") on empty line or directive */
|
||||
#if !defined NO_DEFINE
|
||||
if (iscommand==CMD_NONE) {
|
||||
assert(lptr!=term_expr);
|
||||
substallpatterns(pline,sLINEMAX);
|
||||
doconcat(pline);
|
||||
ppconcat((char*)pline);
|
||||
lptr=pline; /* reset "line pointer" to start of the parsing buffer */
|
||||
} /* if */
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user