diag.h (641B)
1 #ifndef KIT_DIAG_H 2 #define KIT_DIAG_H 3 4 #include "core/core.h" 5 6 /* DiagKind / DiagSink struct are public (see <kit.h>). The internal 7 * aliases below keep terse names; the unprefixed enum constants below 8 * are the names libkit's source uses internally. */ 9 typedef KitDiagKind DiagKind; 10 #define DIAG_NOTE KIT_DIAG_NOTE 11 #define DIAG_WARN KIT_DIAG_WARN 12 #define DIAG_ERROR KIT_DIAG_ERROR 13 #define DIAG_FATAL KIT_DIAG_FATAL 14 15 /* Convenience varargs wrappers around `sink->emit`. Internal use only. */ 16 void diag_emit(DiagSink*, DiagKind, SrcLoc, const char* fmt, ...); 17 void diag_emitv(DiagSink*, DiagKind, SrcLoc, const char* fmt, va_list); 18 19 #endif