From bfd58e2c515e8c360fda4bee3d0702c60d92ebf0 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 2 Dec 2025 18:24:54 +0100 Subject: preprocessor: add #ifndef...#endif include guard optimization --- io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 58ebf17..1721f7b 100644 --- a/io.c +++ b/io.c @@ -818,6 +818,7 @@ static struct file { vec_of(uint) lineoffs; bool once; bool seen; + const char *guardmac; } *fileht[1<guardmac; return fileht[id]->once; } + void -markfileonce(int id) +markfileonce(int id, const char *guard) { assert(id < arraylength(fileht) && fileht[id]); fileht[id]->once = 1; + fileht[id]->guardmac = guard; } - void markfileseen(int id) { -- cgit v1.2.3