static int mswindows_ls_sort_case_insensitive;
-static int mswindows_ls_round_file_size;
+static Fixnum mswindows_ls_round_file_size;
Lisp_Object Qmswindows_insert_directory;
/* PATTERN might be a flawed regular expression. Rather than
catching and signalling our own errors, we just call
compile_pattern to do the work for us. */
- bufp = compile_pattern (pattern, 0, 0, 0, ERROR_ME);
+ bufp = compile_pattern (pattern, 0, Qnil, 0, ERROR_ME);
}
/* Now *bufp is the compiled form of PATTERN; don't call anything
which might compile a new regexp until we're done with the loop! */
(file, switches, wildcard, full_directory_p))
{
Lisp_Object result, handler, wildpat, fns, basename;
- char *filename;
char *switchstr;
- int len, nfiles, i;
+ int nfiles, i;
int hide_system, hide_dot, reverse, display_size;
WIN32_FIND_DATA *files, **sorted_files;
enum mswindows_sortby sort_by;
}
}
- /*
- * Sometimes we get ".../foo* /" as FILE (without the space).
- * While the shell and `ls' don't mind, we certainly do,
- * because it makes us think there is no wildcard, only a
- * directory name.
- */
- if (!NILP(Fstring_match(build_string("[[?*]"), file, Qnil, Qnil)))
- {
- wildcard = Qt;
- filename = XSTRING_DATA(file);
- len = strlen(filename);
- if (len > 0 && (filename[len - 1] == '\\' ||
- filename[len - 1] == '/'))
- {
- filename[len - 1] = '\0';
- }
- file = build_string(filename);
- }
if (!NILP(wildcard))
{
Lisp_Object newfile;
+ file = Fdirectory_file_name (file);
basename = Ffile_name_nondirectory(file);
fns = intern("wildcard-to-regexp");
wildpat = call1(fns, basename);