aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2001-12-18 22:49:19 +0000
committerRichard M. Stallman2001-12-18 22:49:19 +0000
commit30de3bd61146feebd12bf888adc21afb054c4740 (patch)
treef760a6a21db58cb8078922c7c9c87bb7e8bb5f1d /src
parentcbfe0252e48f2574524f58fcf733f23eaae08bff (diff)
downloademacs-30de3bd61146feebd12bf888adc21afb054c4740.tar.gz
emacs-30de3bd61146feebd12bf888adc21afb054c4740.zip
(scmp): Function moved to dired.c.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 3fd3f985851..12545dbc97c 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1289,42 +1289,6 @@ is used to further constrain the set of candidates. */)
1289 XSETFASTINT (end, bestmatchsize); /* all completions agree */ 1289 XSETFASTINT (end, bestmatchsize); /* all completions agree */
1290 return Fsubstring (bestmatch, zero, end); 1290 return Fsubstring (bestmatch, zero, end);
1291} 1291}
1292
1293/* Compare exactly LEN chars of strings at S1 and S2,
1294 ignoring case if appropriate.
1295 Return -1 if strings match,
1296 else number of chars that match at the beginning. */
1297
1298int
1299scmp (s1, s2, len)
1300 register unsigned char *s1, *s2;
1301 int len;
1302{
1303 register int l = len;
1304
1305 if (completion_ignore_case)
1306 {
1307 while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++))
1308 l--;
1309 }
1310 else
1311 {
1312 while (l && *s1++ == *s2++)
1313 l--;
1314 }
1315 if (l == 0)
1316 return -1;
1317 else
1318 {
1319 int match = len - l;
1320
1321 /* Now *--S1 is the unmatching byte. If it is in the middle of
1322 multi-byte form, we must say that the multi-byte character
1323 there doesn't match. */
1324 while (match && *--s1 >= 0xA0) match--;
1325 return match;
1326 }
1327}
1328 1292
1329DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0, 1293DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0,
1330 doc: /* Search for partial matches to STRING in ALIST. 1294 doc: /* Search for partial matches to STRING in ALIST.