neutrino: fix shortened source file paths

This commit is contained in:
Stefan Seyfried
2013-03-09 21:49:45 +01:00
parent 598361c2a1
commit 1ed105fd5e
3 changed files with 8 additions and 0 deletions

View File

@@ -57,6 +57,7 @@
#include <zapit/getservices.h>
#include <zapit/scan.h>
#include <zapit/zapit.h>
#define __NFILE__ 1
#include <zapit/debug.h>
#include <set>

View File

@@ -29,6 +29,7 @@
#include <config.h>
#endif
#define __NFILE__ 1
#define NEUTRINO_CPP
#include <stdio.h>

View File

@@ -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...) \