From bcbb647f1bd0d7c00c32d7501d09cbbf7d7b54af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Fri, 10 Mar 2017 09:41:16 +0100 Subject: Use file names, not paths, in error/warning/debug messages --- src/ratpoison.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ratpoison.h b/src/ratpoison.h index e675d54..58381ef 100644 --- a/src/ratpoison.h +++ b/src/ratpoison.h @@ -33,8 +33,14 @@ #include #include +#if defined(__BASE_FILE__) +#define RP_FILE_NAME __BASE_FILE__ +#else +#define RP_FILE_NAME __FILE__ +#endif + /* Helper macro for error and debug reporting. */ -#define PRINT_LINE(type) printf (PACKAGE ":%s:%d: %s: ",__FILE__, __LINE__, #type) +#define PRINT_LINE(type) printf (PACKAGE ":%s:%d: %s: ",RP_FILE_NAME, __LINE__, #type) /* Error and debug reporting macros. */ #define PRINT_ERROR(fmt) \ -- cgit v1.2.3