O_DEBUG := 0 # debug binary
O_NORL := 0 # no readline support
O_PCRE := 0 # link with PCRE library
-O_NOLOC := 0 # no locale support
+O_NOLC := 0 # no locale support
O_NOMOUSE := 0 # no mouse support
O_NOBATCH := 0 # no built-in batch renamer
O_NOFIFO := 0 # no FIFO previewer support
ifneq ($(filter norl,$(MAKECMDGOALS)),)
O_NORL := 1
endif
-ifneq ($(filter noloc,$(MAKECMDGOALS)),)
+ifneq ($(filter nolc,$(MAKECMDGOALS)),)
O_NORL := 1
- O_NOLOC := 1
+ O_NOLC := 1
endif
ifeq ($(strip $(O_DEBUG)),1)
LDLIBS += -lpcre
endif
-ifeq ($(strip $(O_NOLOC)),1)
- CPPFLAGS += -DNOLOCALE
+ifeq ($(strip $(O_NOLC)),1)
+ CPPFLAGS += -DNOLC
endif
ifeq ($(strip $(O_NOMOUSE)),1)
# targets for backwards compatibility
debug: $(BIN)
norl: $(BIN)
-noloc: $(BIN)
+nolc: $(BIN)
install-desktop: $(DESKTOPFILE)
$(INSTALL) -m 0755 -d $(DESTDIR)$(DESKTOPPREFIX)
O_DEBUG := 0 # debug binary
O_NORL := 0 # no readline support
O_PCRE := 0 # link with PCRE library
-O_NOLOC := 0 # no locale support
+O_NOLC := 0 # no locale support
O_NOMOUSE := 0 # no mouse support
O_NOBATCH := 0 # no built-in batch renamer
O_NOFIFO := 0 # no FIFO previewer support
ifneq ($(filter norl,$(MAKECMDGOALS)),)
O_NORL := 1
endif
-ifneq ($(filter noloc,$(MAKECMDGOALS)),)
+ifneq ($(filter nolc,$(MAKECMDGOALS)),)
O_NORL := 1
- O_NOLOC := 1
+ O_NOLC := 1
endif
ifeq ($(strip $(O_DEBUG)),1)
- CPPFLAGS += -DDBGMODE
+ CPPFLAGS += -DDEBUG
CFLAGS += -g
LDLIBS += -lrt
endif
LDLIBS += -lpcre
endif
-ifeq ($(strip $(O_NOLOC)),1)
- CPPFLAGS += -DNOLOCALE
+ifeq ($(strip $(O_NOLC)),1)
+ CPPFLAGS += -DNOLC
endif
ifeq ($(strip $(O_NOMOUSE)),1)
# targets for backwards compatibility
debug: $(BIN)
norl: $(BIN)
-noloc: $(BIN)
+nolc: $(BIN)
install: all
$(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin
$(STRIP) $^
static:
+ # regular static binary
make O_STATIC=1 strip
mv $(BIN) $(BIN)-static
#include <fcntl.h>
#include <libgen.h>
#include <limits.h>
-#ifndef NOLOCALE
+#ifndef NOLC
#include <locale.h>
#endif
#include <stdio.h>
}
/* Handle 1. all non-numeric and 2. both same numeric value cases */
-#ifndef NOLOCALE
+#ifndef NOLC
return strcoll(s1, s2);
#else
return strcasecmp(s1, s2);
* Adjust string length to maxcols if > 0;
* Max supported str length: NAME_MAX;
*/
-#ifdef NOLOCALE
+#ifdef NOLC
static char *unescape(const char *str, uint_t maxcols)
{
char * const wbuf = g_buf;
if (!ind)
++namecols;
-#ifndef NOLOCALE
+#ifndef NOLC
addwstr(unescape(ent->name, namecols));
#else
addstr(unescape(ent->name, MIN(namecols, ent->nlen) + 1));
return EXIT_FAILURE;
}
-#ifndef NOLOCALE
+#ifndef NOLC
/* Set locale */
setlocale(LC_ALL, "");
#ifdef PCRE