From 1ed105fd5e58f33307c0df26f728652ac04b7654 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 9 Mar 2013 21:49:45 +0100 Subject: [PATCH] neutrino: fix shortened source file paths --- src/gui/scan_setup.cpp | 1 + src/neutrino.cpp | 1 + src/zapit/include/zapit/debug.h | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index 70ca5f670..b8562c025 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -57,6 +57,7 @@ #include #include #include +#define __NFILE__ 1 #include #include diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b5ecbbe3f..34b5addd8 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -29,6 +29,7 @@ #include #endif +#define __NFILE__ 1 #define NEUTRINO_CPP #include diff --git a/src/zapit/include/zapit/debug.h b/src/zapit/include/zapit/debug.h index 9dd4c5e79..606e62aad 100644 --- a/src/zapit/include/zapit/debug.h +++ b/src/zapit/include/zapit/debug.h @@ -45,7 +45,13 @@ /* zapit.cpp */ extern int zapit_debug; +#if defined __NFILE__ +/* this is ugly. __FILE__ here is always zapit/include/debug.h, if it is called from + * src/neutrino.cpp, src/gui/... simply strip less characters */ +static int __striplen = strstr(__FILE__, "src/zapit") ? (strstr(__FILE__, "src/zapit") - __FILE__ + 4) : 0; +#else static int __striplen = strstr(__FILE__, "src/zapit") ? (strstr(__FILE__, "src/zapit") - __FILE__ + 14) : 0; +#endif #define __SHORTFILE__ (__FILE__ + __striplen) #define DBG(fmt, args...) \