X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/14d55bce6e2bcc97b24307e45d2f5b61780471fe..f676886a9ea3e4f2cb9275a658c69c899056a500:/src/dired.c diff --git a/src/dired.c b/src/dired.c index feb68ed050..f04ed25588 100644 --- a/src/dired.c +++ b/src/dired.c @@ -46,14 +46,11 @@ extern struct direct *readdir (); #endif -#undef NULL - #include "lisp.h" #include "buffer.h" #include "commands.h" #include "regex.h" -#include "search.h" #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -82,7 +79,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ int length; Lisp_Object list, name; - if (!NULL (match)) + if (!NILP (match)) { CHECK_STRING (match, 3); /* Compile it now so we don't get an error after opendir */ @@ -111,10 +108,10 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ len = NAMLEN (dp); if (dp->d_ino) { - if (NULL (match) + if (NILP (match) || (0 <= re_search (&searchbuf, dp->d_name, len, 0, len, 0))) { - if (!NULL (full)) + if (!NILP (full)) { int index = XSTRING (dirname)->size; int total = len + index; @@ -141,7 +138,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ } } closedir (d); - if (!NULL (nosort)) + if (!NILP (nosort)) return list; return Fsort (Fnreverse (list), Qstring_lessp); } @@ -234,7 +231,7 @@ file_name_completion (file, dirname, all_flag, ver_flag) ** It would not actually be helpful to the user to ignore any possible completions when making a list of them.** */ - for (passcount = !!all_flag; NULL (bestmatch) && passcount < 2; passcount++) + for (passcount = !!all_flag; NILP (bestmatch) && passcount < 2; passcount++) { if (!(d = opendir (XSTRING (Fdirectory_file_name (dirname))->data))) report_file_error ("Opening directory", Fcons (dirname, Qnil)); @@ -255,7 +252,7 @@ file_name_completion (file, dirname, all_flag, ver_flag) len = NAMLEN (dp); - if (!NULL (Vquit_flag) && NULL (Vinhibit_quit)) + if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) goto quit; if (!dp->d_ino || len < XSTRING (file)->size @@ -298,7 +295,7 @@ file_name_completion (file, dirname, all_flag, ver_flag) matchcount++; - if (all_flag || NULL (bestmatch)) + if (all_flag || NILP (bestmatch)) { /* This is a possible completion */ if (directoryp) @@ -342,7 +339,7 @@ file_name_completion (file, dirname, all_flag, ver_flag) unbind_to (count, Qnil); - if (all_flag || NULL (bestmatch)) + if (all_flag || NILP (bestmatch)) return bestmatch; if (matchcount == 1 && bestmatchsize == XSTRING (file)->size) return Qt;