summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-03-02 02:07:13 +0000
committerThomas Martitz <kugel@rockbox.org>2009-03-02 02:07:13 +0000
commit4fd02fdd42cb389e2b63c7f1fd86377c4780b1d7 (patch)
tree95ca22b8155a860ae5517e0868c0cc1eb4140fb4
parentc64575231414a7fbc40d58402e6204b3274c334e (diff)
downloadrockbox-4fd02fdd42cb389e2b63c7f1fd86377c4780b1d7.tar.gz
rockbox-4fd02fdd42cb389e2b63c7f1fd86377c4780b1d7.zip
FS#9972 - Simplify strnatcmp. As we do ignore leading zeros (as opposed to the original version), we can remove some unused code.
Also, change the header to state that we changed it and do not use the original version. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20166 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/common/strnatcmp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/common/strnatcmp.c b/firmware/common/strnatcmp.c
index 84e0d38362..c67bda6b81 100644
--- a/firmware/common/strnatcmp.c
+++ b/firmware/common/strnatcmp.c
@@ -1,5 +1,4 @@
1/* -*- mode: c; c-file-style: "k&r" -*- 1/* Based on:
2
3 strnatcmp.c -- Perform 'natural order' comparisons of strings in C. 2 strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
4 Copyright (C) 2000, 2004 by Martin Pool <mbp sourcefrog net> 3 Copyright (C) 2000, 2004 by Martin Pool <mbp sourcefrog net>
5 4
@@ -28,6 +27,10 @@
28 * Eric Sosman pointed out that ctype functions take a parameter whose 27 * Eric Sosman pointed out that ctype functions take a parameter whose
29 * value must be that of an unsigned int, even on platforms that have 28 * value must be that of an unsigned int, even on platforms that have
30 * negative chars in their default char type. 29 * negative chars in their default char type.
30 *
31 *
32 * This version is changed to ignore leading zeros, it does not equal to the
33 * original software.
31 */ 34 */
32 35
33#include <ctype.h> 36#include <ctype.h>