summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-03-10 09:41:16 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-03-10 09:41:16 +0100
commitbcbb647f1bd0d7c00c32d7501d09cbbf7d7b54af (patch)
tree453dc144aa3786fa4c20a2f5e569c7a9aa518855
parent5ff211f1c12766876a8fc6baedc844cf3398a4c4 (diff)
downloadratpoison-bcbb647f1bd0d7c00c32d7501d09cbbf7d7b54af.zip
Use file names, not paths, in error/warning/debug messages
-rw-r--r--src/ratpoison.h8
1 files changed, 7 insertions, 1 deletions
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 <X11/Xlocale.h>
#include <fcntl.h>
+#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) \