nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d0b4508798839a20e45abe8e17ba70e3450d520e
parent 0427f70c4ef67a4830b3884a40f9ccb6e01fa3d2
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 14 May 2021 00:20:59 +0530

Change debug macro DBGMODE to DEBUG

Diffstat:
MMakefile | 2+-
Msrc/dbg.h | 4++--
Msrc/nnn.c | 8++++----
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile @@ -40,7 +40,7 @@ ifneq ($(filter noloc,$(MAKECMDGOALS)),) endif ifeq ($(strip $(O_DEBUG)),1) - CPPFLAGS += -DDBGMODE + CPPFLAGS += -DDEBUG CFLAGS += -g endif diff --git a/src/dbg.h b/src/dbg.h @@ -30,7 +30,7 @@ #pragma once -#ifdef DBGMODE +#ifdef DEBUG static int DEBUG_FD; static int xprintf(int fd, const char *fmt, ...) @@ -88,4 +88,4 @@ static void disabledbg(void) #define DPRINTF_U(x) #define DPRINTF_S(x) #define DPRINTF_P(x) -#endif /* DBGMODE */ +#endif /* DEBUG */ diff --git a/src/nnn.c b/src/nnn.c @@ -5259,7 +5259,7 @@ exit: static void populate(char *path, char *lastname) { -#ifdef DBGMODE +#ifdef DEBUG struct timespec ts1, ts2; 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); -#ifdef DBGMODE +#ifdef DEBUG clock_gettime(CLOCK_REALTIME, &ts2); DPRINTF_U(ts2.tv_nsec - ts1.tv_nsec); #endif @@ -7600,7 +7600,7 @@ static void cleanup(void) #endif if (g_state.pluginit) unlink(g_pipepath); -#ifdef DBGMODE +#ifdef DEBUG disabledbg(); #endif } @@ -7769,7 +7769,7 @@ int main(int argc, char *argv[]) env_opts_id = -1; } -#ifdef DBGMODE +#ifdef DEBUG enabledbg(); DPRINTF_S(VERSION); #endif