mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 03:41:27 +00:00
Change debug macro DBGMODE to DEBUG
This commit is contained in:
parent
0427f70c4e
commit
d0b4508798
2
Makefile
2
Makefile
|
@ -40,7 +40,7 @@ ifneq ($(filter noloc,$(MAKECMDGOALS)),)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(O_DEBUG)),1)
|
ifeq ($(strip $(O_DEBUG)),1)
|
||||||
CPPFLAGS += -DDBGMODE
|
CPPFLAGS += -DDEBUG
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef DBGMODE
|
#ifdef DEBUG
|
||||||
static int DEBUG_FD;
|
static int DEBUG_FD;
|
||||||
|
|
||||||
static int xprintf(int fd, const char *fmt, ...)
|
static int xprintf(int fd, const char *fmt, ...)
|
||||||
|
@ -88,4 +88,4 @@ static void disabledbg(void)
|
||||||
#define DPRINTF_U(x)
|
#define DPRINTF_U(x)
|
||||||
#define DPRINTF_S(x)
|
#define DPRINTF_S(x)
|
||||||
#define DPRINTF_P(x)
|
#define DPRINTF_P(x)
|
||||||
#endif /* DBGMODE */
|
#endif /* DEBUG */
|
||||||
|
|
|
@ -5259,7 +5259,7 @@ exit:
|
||||||
|
|
||||||
static void populate(char *path, char *lastname)
|
static void populate(char *path, char *lastname)
|
||||||
{
|
{
|
||||||
#ifdef DBGMODE
|
#ifdef DEBUG
|
||||||
struct timespec ts1, ts2;
|
struct timespec ts1, ts2;
|
||||||
|
|
||||||
clock_gettime(CLOCK_REALTIME, &ts1); /* Use CLOCK_MONOTONIC on FreeBSD */
|
clock_gettime(CLOCK_REALTIME, &ts1); /* Use CLOCK_MONOTONIC on FreeBSD */
|
||||||
|
@ -5271,7 +5271,7 @@ static void populate(char *path, char *lastname)
|
||||||
|
|
||||||
ENTSORT(pdents, ndents, entrycmpfn);
|
ENTSORT(pdents, ndents, entrycmpfn);
|
||||||
|
|
||||||
#ifdef DBGMODE
|
#ifdef DEBUG
|
||||||
clock_gettime(CLOCK_REALTIME, &ts2);
|
clock_gettime(CLOCK_REALTIME, &ts2);
|
||||||
DPRINTF_U(ts2.tv_nsec - ts1.tv_nsec);
|
DPRINTF_U(ts2.tv_nsec - ts1.tv_nsec);
|
||||||
#endif
|
#endif
|
||||||
|
@ -7600,7 +7600,7 @@ static void cleanup(void)
|
||||||
#endif
|
#endif
|
||||||
if (g_state.pluginit)
|
if (g_state.pluginit)
|
||||||
unlink(g_pipepath);
|
unlink(g_pipepath);
|
||||||
#ifdef DBGMODE
|
#ifdef DEBUG
|
||||||
disabledbg();
|
disabledbg();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -7769,7 +7769,7 @@ int main(int argc, char *argv[])
|
||||||
env_opts_id = -1;
|
env_opts_id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DBGMODE
|
#ifdef DEBUG
|
||||||
enabledbg();
|
enabledbg();
|
||||||
DPRINTF_S(VERSION);
|
DPRINTF_S(VERSION);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue