diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-10-04 07:43:07 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-10-04 08:10:31 +0530 |
commit | 133f55170bdd33fe53d397faa011d9aee00c4c3d (patch) | |
tree | ec6f4be83456d00c9968d9bd5c4d5ce661c0a0ce /src | |
parent | 241a261531280ba8e925d93314af117dfc97dcd3 (diff) | |
download | nnn-133f55170bdd33fe53d397faa011d9aee00c4c3d.tar.gz |
Target nolocale: saves more on memory
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -74,7 +74,9 @@ #ifdef __gnu_hurd__ #define PATH_MAX 4096 #endif +#ifndef NOLOCALE #include <locale.h> +#endif #include <stdio.h> #ifndef NORL #include <readline/history.h> @@ -1349,7 +1351,11 @@ static int xstricmp(const char * const s1, const char * const s2) } /* Handle 1. all non-numeric and 2. both same numeric value cases */ +#ifndef NOLOCALE return strcoll(s1, s2); +#else + return strcasecmp(s1, s2); +#endif } /* @@ -4960,8 +4966,10 @@ int main(int argc, char *argv[]) return _FAILURE; } +#ifndef NOLOCALE /* Set locale */ setlocale(LC_ALL, ""); +#endif #ifndef NORL #if RL_READLINE_VERSION >= 0x0603 |