/[emacs]/emacs/src/dired.c
ViewVC logotype

Diff of /emacs/src/dired.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.92 by pj, Tue Nov 13 07:45:01 2001 UTC revision 1.93 by rms, Tue Dec 18 22:50:26 2001 UTC
# Line 117  Lisp_Object Qfile_name_completion; Line 117  Lisp_Object Qfile_name_completion;
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
# Line 734  file_name_completion (file, dirname, all Line 736  file_name_completion (file, dirname, all
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;

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26