[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/dired.c
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/dired.c |
Date: |
Tue, 18 Dec 2001 17:50:26 -0500 |
Index: emacs/src/dired.c
diff -c emacs/src/dired.c:1.92 emacs/src/dired.c:1.93
*** emacs/src/dired.c:1.92 Tue Nov 13 02:45:01 2001
--- emacs/src/dired.c Tue Dec 18 17:50:26 2001
***************
*** 117,122 ****
--- 117,124 ----
Lisp_Object Qfile_name_all_completions;
Lisp_Object Qfile_attributes;
Lisp_Object Qfile_attributes_lessp;
+
+ static int scmp P_ ((unsigned char *, unsigned char *, int));
Lisp_Object
***************
*** 732,737 ****
--- 734,767 ----
if (d) closedir (d);
Vquit_flag = Qnil;
return Fsignal (Qquit, Qnil);
+ }
+
+ /* Compare exactly LEN chars of strings at S1 and S2,
+ ignoring case if appropriate.
+ Return -1 if strings match,
+ else number of chars that match at the beginning. */
+
+ static int
+ scmp (s1, s2, len)
+ register unsigned char *s1, *s2;
+ int len;
+ {
+ register int l = len;
+
+ if (completion_ignore_case)
+ {
+ while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++))
+ l--;
+ }
+ else
+ {
+ while (l && *s1++ == *s2++)
+ l--;
+ }
+ if (l == 0)
+ return -1;
+ else
+ return len - l;
}
static int
- [Emacs-diffs] Changes to emacs/src/dired.c,
Richard M. Stallman <=