projects
/
nnn.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cce877
)
Ignore case in version compare
author
Arun Prakash Jana <engineerarun@gmail.com>
Mon, 1 Apr 2019 15:41:23 +0000 (21:11 +0530)
committer
Arun Prakash Jana <engineerarun@gmail.com>
Mon, 1 Apr 2019 15:41:23 +0000 (21:11 +0530)
src/nnn.c
patch
|
blob
|
history
diff --git
a/src/nnn.c
b/src/nnn.c
index 6ea7a03e5257952708950aaa795081127043bed8..46a07c3878a899e3769b1b5e6895c8ba17690da6 100644
(file)
--- a/
src/nnn.c
+++ b/
src/nnn.c
@@
-1310,8
+1310,10
@@
static int xstrverscmp(const char * const s1, const char * const s2)
if (p1 == p2)
return 0;
- c1 = *p1++;
- c2 = *p2++;
+ c1 = TOUPPER(*p1);
+ ++p1;
+ c2 = TOUPPER(*p2);
+ ++p2;
/* Hint: '0' is a digit too. */
state = S_N + ((c1 == '0') + (xisdigit(c1) != 0));
@@
-1321,8
+1323,10
@@
static int xstrverscmp(const char * const s1, const char * const s2)
return diff;
state = next_state[state];
- c1 = *p1++;
- c2 = *p2++;
+ c1 = TOUPPER(*p1);
+ ++p1;
+ c2 = TOUPPER(*p2);
+ ++p2;
state += (c1 == '0') + (xisdigit(c1) != 0);
}