From 7634dd65ac55a0fe4e7ed69cee7e3957f574a03e Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 21 Dec 2021 21:03:05 -0600 Subject: implement RenatoUtsch's trimmed __FILE__ macro --- lily-test.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lily-test.h') diff --git a/lily-test.h b/lily-test.h index a1e63e5..a94f292 100644 --- a/lily-test.h +++ b/lily-test.h @@ -1,6 +1,12 @@ #ifndef LILY_TEST_H #define LILY_TEST_H +/* define SOURCE_PATH_SIZE to strip away the + leading parts of the full compilation path */ +#ifndef SOURCE_PATH_SIZE #define LILY_FILENAME __FILE__ +#else +#define LILY_FILENAME (__FILE__ + SOURCE_PATH_SIZE) +#endif #endif -- cgit v1.2.1