From 99adb48d94c59cb2e5701ca39d7c40d4f63459b3 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 18 Oct 2025 18:12:19 +0200 Subject: #pragma once --- common.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'common.h') diff --git a/common.h b/common.h index c5b7513..c6ebf9d 100644 --- a/common.h +++ b/common.h @@ -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 *, ...); -- cgit v1.2.3