diff options
| author | 2025-10-18 18:12:19 +0200 | |
|---|---|---|
| committer | 2025-10-18 18:12:19 +0200 | |
| commit | 99adb48d94c59cb2e5701ca39d7c40d4f63459b3 (patch) | |
| tree | be3c432db54dd7f4e1ceab70848543bba1a4ead8 /common.h | |
| parent | ffca6b54a9654005a121c3557bb8b245ae65ce55 (diff) | |
#pragma once
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -29,11 +29,12 @@ typedef unsigned uint; #define arraylength(a) (sizeof(a) / sizeof 0[a]) struct bytes { uchar *p; uint n; }; +enum { SPANFILEBITS = 10 }; struct span { struct span0 { uint off; - uint len : 24, - file : 8; + uint len : 32-SPANFILEBITS, + file : SPANFILEBITS; } sl, /* original source location */ ex; /* the location after #include/macro expansion */ }; @@ -571,6 +572,10 @@ const char *getfilename(int id); struct memfile *getfile(int id); void addfileline(int id, uint off); void getfilepos(int *line, int *col, int id, uint off); +bool isoncefile(int id); +void markfileonce(int id); +void markfileseen(int id); +bool isfileseen(int id); void closefile(int id); void fatal(const struct span *, const char *, ...); void error(const struct span *, const char *, ...); |