117 |
Lisp_Object Qfile_name_all_completions; |
Lisp_Object Qfile_name_all_completions; |
118 |
Lisp_Object Qfile_attributes; |
Lisp_Object Qfile_attributes; |
119 |
Lisp_Object Qfile_attributes_lessp; |
Lisp_Object Qfile_attributes_lessp; |
120 |
|
|
121 |
|
static int scmp P_ ((unsigned char *, unsigned char *, int)); |
122 |
|
|
123 |
|
|
124 |
Lisp_Object |
Lisp_Object |
736 |
return Fsignal (Qquit, Qnil); |
return Fsignal (Qquit, Qnil); |
737 |
} |
} |
738 |
|
|
739 |
|
/* Compare exactly LEN chars of strings at S1 and S2, |
740 |
|
ignoring case if appropriate. |
741 |
|
Return -1 if strings match, |
742 |
|
else number of chars that match at the beginning. */ |
743 |
|
|
744 |
|
static int |
745 |
|
scmp (s1, s2, len) |
746 |
|
register unsigned char *s1, *s2; |
747 |
|
int len; |
748 |
|
{ |
749 |
|
register int l = len; |
750 |
|
|
751 |
|
if (completion_ignore_case) |
752 |
|
{ |
753 |
|
while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++)) |
754 |
|
l--; |
755 |
|
} |
756 |
|
else |
757 |
|
{ |
758 |
|
while (l && *s1++ == *s2++) |
759 |
|
l--; |
760 |
|
} |
761 |
|
if (l == 0) |
762 |
|
return -1; |
763 |
|
else |
764 |
|
return len - l; |
765 |
|
} |
766 |
|
|
767 |
static int |
static int |
768 |
file_name_completion_stat (dirname, dp, st_addr) |
file_name_completion_stat (dirname, dp, st_addr) |
769 |
Lisp_Object dirname; |
Lisp_Object dirname; |