git.samba.org
/
tridge
/
junkcode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e203fce
)
sort numerically
author
tridge
<>
Sat, 18 Mar 2006 02:43:28 +0000
(
02:43
+0000)
committer
tridge
<>
Sat, 18 Mar 2006 02:43:28 +0000
(
02:43
+0000)
readframes.c
patch
|
blob
|
history
diff --git
a/readframes.c
b/readframes.c
index 691873ead14a068a740467bfa98572ef6483ffbf..6b3af05f9f405e476db9e06978749d26ac6e7409 100644
(file)
--- a/
readframes.c
+++ b/
readframes.c
@@
-62,10
+62,10
@@
static int name_cmp(char **n1, char **n2)
{
const char *s1=*n1, *s2=*n2;
/* try to do numerical sorting */
- while (*s1 && *s1 == *s2
&& !(isdigit(*s1) || isdigit(*s2))
) {
+ while (*s1 && *s1 == *s2) {
s1++; s2++;
}
- if (isdigit(*s1)) {
+ if (isdigit(*s1)
|| isdigit(*s2)
) {
return atoi(s1) - atoi(s2);
}
return strcmp(s1, s2);