Commit 936a2007 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] avoid trigraphs in generated pci ids

parent 9153f34e
/* /*
* Generate devlist.h and classlist.h from the PCI ID file. * Generate devlist.h and classlist.h from the PCI ID file.
* *
* (c) 1999--2000 Martin Mares <mj@ucw.cz> * (c) 1999--2002 Martin Mares <mj@ucw.cz>
*/ */
#include <stdio.h> #include <stdio.h>
...@@ -15,8 +15,13 @@ pq(FILE *f, const char *c) ...@@ -15,8 +15,13 @@ pq(FILE *f, const char *c)
while (*c) { while (*c) {
if (*c == '"') if (*c == '"')
fprintf(f, "\\\""); fprintf(f, "\\\"");
else else {
fputc(*c, f); fputc(*c, f);
if (*c == '?' && c[1] == '?') {
/* Avoid trigraphs */
fprintf(f, "\" \"");
}
}
c++; c++;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment