Local tweaks to ucpp for xrdb:
- exit on the 1st error it finds. Better than stopping processing input - accept -P as a synonym for -l since this is what xrdb uses to suppress #line markers.
This commit is contained in:
parent
f5aa946dbd
commit
cf1d97d9e6
@ -115,6 +115,7 @@ void ucpp_error(long line, char *fmt, ...)
|
|||||||
freemem(sc);
|
freemem(sc);
|
||||||
}
|
}
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2418,6 +2419,8 @@ static int parse_opt(int argc, char *argv[], struct lexer_state *ls)
|
|||||||
ls->flags &= ~FAIL_SHARP;
|
ls->flags &= ~FAIL_SHARP;
|
||||||
} else if (!strcmp(argv[i], "-l")) {
|
} else if (!strcmp(argv[i], "-l")) {
|
||||||
ls->flags &= ~LINE_NUM;
|
ls->flags &= ~LINE_NUM;
|
||||||
|
} else if (!strcmp(argv[i], "-P")) {
|
||||||
|
ls->flags &= ~LINE_NUM;
|
||||||
} else if (!strcmp(argv[i], "-lg")) {
|
} else if (!strcmp(argv[i], "-lg")) {
|
||||||
ls->flags |= GCC_LINE_NUM;
|
ls->flags |= GCC_LINE_NUM;
|
||||||
} else if (!strcmp(argv[i], "-M")) {
|
} else if (!strcmp(argv[i], "-M")) {
|
||||||
|
@ -27,7 +27,7 @@ keep comments in the output.
|
|||||||
if a rogue '#' is encountered, do not emit an error and keep it in
|
if a rogue '#' is encountered, do not emit an error and keep it in
|
||||||
the output.
|
the output.
|
||||||
.TP
|
.TP
|
||||||
.BI \-l
|
.B \-l, \-P
|
||||||
supress the emission of '#line' directives in the output.
|
supress the emission of '#line' directives in the output.
|
||||||
.TP
|
.TP
|
||||||
.BI \-lg
|
.BI \-lg
|
||||||
|
Loading…
Reference in New Issue
Block a user