diff options
| author | dacctal <donotcontactmevia@email.invalid> | 2026-07-18 03:23:44 +0000 |
|---|---|---|
| committer | dacctal <donotcontactmevia@email.invalid> | 2026-07-18 03:23:44 +0000 |
| commit | 7e145a01a440c15aa3f0c1859cd543f4f7a36d4c (patch) | |
| tree | d2372e34199a63e83420e8527d769aa647256f69 /include/globs.h | |
| parent | 9efe3b443e6f84f75ecfb6d5193ae1ff1eb3d485 (diff) | |
search and list are done!!!
Diffstat (limited to 'include/globs.h')
| -rw-r--r-- | include/globs.h | 5 |
1 files changed, 3 insertions, 2 deletions
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); \ |
