From 1fee6a61abdf2cf332fffbc50bf7adc1842feb40 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 17 Mar 2026 18:33:12 +0100 Subject: Refactor: antcc.h move things around --- src/antcc.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/antcc.h b/src/antcc.h index 2e6c2d7..3224f05 100644 --- a/src/antcc.h +++ b/src/antcc.h @@ -36,16 +36,6 @@ typedef unsigned uint; #define alignup(x, A) (((x) + ((A) - 1)) & -(A)) #define countof(a) (sizeof(a) / sizeof 0[a]) -enum { SPANFILEBITS = 10 }; -struct span { - struct span0 { - uint off; - uint len : 32-SPANFILEBITS, - file : SPANFILEBITS; - } sl, /* original source location */ - ex; /* the location after #include/macro expansion */ -}; - void _assertfmt(const char *file, int line, const char *func, const char *expr); #if HAS_BUILTIN(trap) #define assert(x) (!(x) ? _assertfmt(__FILE__,__LINE__,__func__,#x), __builtin_trap() : (void)0) @@ -360,6 +350,16 @@ void markfileseen(int id); bool isfileseen(int id); void closefile(int id); +enum { SPANFILEBITS = 10 }; +struct span { + struct span0 { + uint off; + uint len : 32-SPANFILEBITS, + file : SPANFILEBITS; + } sl, /* original source location */ + ex; /* the location after #include/macro expansion */ +}; + enum diagkind { DGERROR, DGWARN, DGNOTE, }; void vdiag(const struct span *, enum diagkind, const char *, va_list); NORETURN void fatal(const struct span *, const char *, ...); -- cgit v1.2.3