pptok.pl: don't leak internal codes into pptok.c

If we have internal codes in pptok.c, we may have false matches for
them as tokens, plus, there is no reason for them to exist there. Go
back to putting NULL in those slots.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2019-08-15 01:37:48 -07:00
parent 97cbdd34d0
commit 566a0f2187

View File

@ -203,7 +203,7 @@ if ($what eq 'c') {
# Note that this is global.
printf OUT "const char * const pp_directives[%d] = {\n", scalar(@pptok);
foreach $d (@pptok) {
if (defined($d)) {
if (defined($d) && $d !~ /[A-Z]/) {
print OUT " \"%$d\",\n";
} else {
print OUT " NULL,\n";