Added line_prefix.h
This commit is contained in:
parent
78aae09a09
commit
75e9a65bcd
2 changed files with 9 additions and 2 deletions
|
@ -69,3 +69,7 @@
|
||||||
#define DOBITS 1 /* use trick to reduce symboltable accesses */
|
#define DOBITS 1 /* use trick to reduce symboltable accesses */
|
||||||
|
|
||||||
|
|
||||||
|
!File: line_prefix.h
|
||||||
|
#define LINE_PREFIX "#" /* prefix for generated line directives,
|
||||||
|
either "#" or "#line"
|
||||||
|
*/
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "idf.h"
|
#include "idf.h"
|
||||||
#include "idfsize.h"
|
#include "idfsize.h"
|
||||||
#include "bits.h"
|
#include "bits.h"
|
||||||
|
#include "line_prefix.h"
|
||||||
|
|
||||||
char _obuf[OBUFSIZE];
|
char _obuf[OBUFSIZE];
|
||||||
|
|
||||||
|
@ -51,8 +52,10 @@ preprocess(fn)
|
||||||
char Xbuf[256];
|
char Xbuf[256];
|
||||||
register char *p = Xbuf;
|
register char *p = Xbuf;
|
||||||
|
|
||||||
sprint(p, "# %d \"%s\"\n", LineNumber,
|
sprint(p, "%s %d \"%s\"\n",
|
||||||
FileName);
|
LINE_PREFIX,
|
||||||
|
LineNumber,
|
||||||
|
FileName);
|
||||||
while (*p) {
|
while (*p) {
|
||||||
echo(*p++);
|
echo(*p++);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue