-Thu Apr 17 23:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
+Fri Apr 13 9:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
+ (path_conv::check): Use add_ext_from_sym throughout.
+
+Thu Apr 12 23:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (mkdir): Check for case clash.
* environ.cc: Add extern declaration for `pcheck_case'.
: strcasematch (path1, path2);
}
+#define add_ext_from_sym(sym) \
+ (void)(sym.ext_here && *sym.ext_here && \
+ ( known_suffix = this->path + sym.extn, \
+ (sym.ext_tacked_on && strcpy (known_suffix, sym.ext_here))))
+
/* Convert an arbitrary path SRC to a pure Win32 path, suitable for
passing to Win32 API routines.
if (component == 0)
{
fileattr = sym.fileattr;
- if (sym.ext_here && *sym.ext_here)
- {
- known_suffix = this->path + sym.extn;
- if (sym.ext_tacked_on)
- strcpy (known_suffix, sym.ext_here);
- }
+ add_ext_from_sym (sym);
}
if (pcheck_case == PCHECK_RELAXED)
goto out; // file found
strcpy (path, sym.contents);
goto out;
}
- if (sym.ext_here && *sym.ext_here)
- {
- known_suffix = this->path + sym.extn;
- if (sym.ext_tacked_on)
- strcpy (known_suffix, sym.ext_here);
- }
+ add_ext_from_sym (sym);
if (pcheck_case == PCHECK_RELAXED)
goto out;
/* Avoid further symlink evaluation. Only case checks are
}
/*fillin:*/
- if (sym.ext_here && *sym.ext_here && !(opt & PC_SYM_CONTENTS))
- {
- known_suffix = this->path + sym.extn;
- if (sym.ext_tacked_on)
- strcpy (known_suffix, sym.ext_here);
- }
+ if (!(opt & PC_SYM_CONTENTS))
+ add_ext_from_sym (sym);
out:
/* Deal with Windows stupidity which considers filename\. to be valid