revert diralphasort() tweak

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-02-11 16:02:54 +00:00
parent 0df875a45d
commit 54dca7b7b3
1 changed files with 2 additions and 8 deletions

View File

@ -1965,9 +1965,8 @@ char *real_dir_from_tilde(const char *buf)
} }
#if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER) #if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER)
/* Our sort routine for file listings. Sort directories before /* Our sort routine for file listings. Sort alphabetically and
* filenames, alphabetically and ignoring case differences. Sort * case-insensitively, and sort directories before filenames. */
* filenames the same way, except for ignoring an initial dot. */
int diralphasort(const void *va, const void *vb) int diralphasort(const void *va, const void *vb)
{ {
struct stat fileinfo; struct stat fileinfo;
@ -1981,11 +1980,6 @@ int diralphasort(const void *va, const void *vb)
if (!aisdir && bisdir) if (!aisdir && bisdir)
return 1; return 1;
if (*a == '.')
a++;
if (*b == '.')
b++;
return strcasecmp(a, b); return strcasecmp(a, b);
} }
#endif #endif