[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs util.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs util.c |
Date: |
Tue, 15 Apr 2008 08:14:07 +0000 |
CVSROOT: /cvsroot/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 08/04/15 08:14:07
Modified files:
. : util.c
Log message:
fixed qe_collate to sort system buffers last
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/util.c?cvsroot=qemacs&r1=1.46&r2=1.47
Patches:
Index: util.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/util.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- util.c 9 Apr 2008 16:15:46 -0000 1.46
+++ util.c 15 Apr 2008 08:14:07 -0000 1.47
@@ -445,7 +445,7 @@
}
/* smart compare strings, lexicographical order, but collate numbers in
- * numeric order */
+ * numeric order, and push * at end */
int qe_collate(const char *s1, const char *s2)
{
int last, c1, c2, res, flags;
@@ -462,7 +462,14 @@
break;
}
}
+ if (c1 == '*')
+ res = 1;
+ else
+ if (c2 == '*')
+ res = -1;
+ else
res = (c1 < c2) ? -1 : 1;
+
for (;;) {
flags = qe_isdigit(c1) * 2 + qe_isdigit(c2);
if (flags == 3) {
- [Qemacs-commit] qemacs util.c,
Charlie Gordon <=