]> Sergey Matveev's repositories - nnn.git/commitdiff
Use a shorter macro
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 21 Feb 2019 23:49:04 +0000 (05:19 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 21 Feb 2019 23:49:04 +0000 (05:19 +0530)
Makefile
src/nnn.c

index fffb0eb5bb9e0497db3944df1d666da866b5ae45..07a7d5f7face9b536d3b70584dcb2e32b6051b82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ $(BIN): $(SRC)
        $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
 
 debug: $(SRC)
-       $(CC) -DDEBUGMODE -g $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(BIN) $^ $(LDLIBS)
+       $(CC) -DDBGMODE -g $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(BIN) $^ $(LDLIBS)
 
 install: all
        $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin
index 9348a879f2dd67f1e7fe182a20450914a484956d..10f9e6e9fc4df3265c69ffa12f845253d60e891a 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
 
 #include "nnn.h"
 
-#ifdef DEBUGMODE
+#ifdef DBGMODE
 static int DEBUG_FD;
 
 static int
@@ -158,7 +158,7 @@ disabledbg()
 #define DPRINTF_U(x)
 #define DPRINTF_S(x)
 #define DPRINTF_P(x)
-#endif /* DEBUGMODE */
+#endif /* DBGMODE */
 
 /* Macro definitions */
 #define VERSION "2.3"
@@ -2717,7 +2717,7 @@ static int dentfind(const char *fname, int n)
 
 static void populate(char *path, char *lastname)
 {
-#ifdef DEBUGMODE
+#ifdef DBGMODE
        struct timespec ts1, ts2;
 
        clock_gettime(CLOCK_REALTIME, &ts1); /* Use CLOCK_MONOTONIC on FreeBSD */
@@ -2729,7 +2729,7 @@ static void populate(char *path, char *lastname)
 
        qsort(dents, ndents, sizeof(*dents), entrycmp);
 
-#ifdef DEBUGMODE
+#ifdef DBGMODE
        clock_gettime(CLOCK_REALTIME, &ts2);
        DPRINTF_U(ts2.tv_nsec - ts1.tv_nsec);
 #endif
@@ -4252,7 +4252,7 @@ int main(int argc, char *argv[])
 #endif
        read_history(NULL);
 
-#ifdef DEBUGMODE
+#ifdef DBGMODE
        enabledbg();
 #endif
        if (!initcurses())
@@ -4286,7 +4286,7 @@ int main(int argc, char *argv[])
        close(kq);
 #endif
 
-#ifdef DEBUGMODE
+#ifdef DBGMODE
        disabledbg();
 #endif
        return 0;