From 7e145a01a440c15aa3f0c1859cd543f4f7a36d4c Mon Sep 17 00:00:00 2001 From: dacctal Date: Sat, 18 Jul 2026 03:23:44 +0000 Subject: search and list are done!!! --- include/globs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/globs.h') diff --git a/include/globs.h b/include/globs.h index 9416923..114083e 100644 --- a/include/globs.h +++ b/include/globs.h @@ -68,11 +68,12 @@ panic("allocation of `%s` failed", #ptr); \ } while (0) -#define panic(...) \ +#define panic(...) \ do { \ + char *tmp = strrchr(__FILE__, '/'); \ eprintf(BOLD RED "panic:" COLOR_RESET " line %d, func \"%s\" in file " \ "\"%s\": ", \ - __LINE__, __func__, __FILE_NAME__); \ + __LINE__, __func__, tmp ? tmp + 1 : __FILE__); \ eprintf(__VA_ARGS__); \ eprintf("\n"); \ fflush(stderr); \ -- cgit v1.2.3