Commit ffab90cf authored by Jean-Claude Beaudoin's avatar Jean-Claude Beaudoin
Browse files

Update #'wild-pathname-p to new wild pathname component handling.

parent 96ad32aa
......@@ -2255,6 +2255,8 @@ extern "C" {
extern MKCL_API mkcl_object mk_mkcl_probe_file_p(MKCL, mkcl_object filename);
extern MKCL_API mkcl_object mk_mkcl_stream_filename(MKCL, mkcl_object x);
extern MKCL_API bool mkcl_pathname_component_string_is_wild_p(MKCL, mkcl_object comp_str);
/* unixint.c */
#if MKCL_DEBUG_INTERRUPT_MASK
......
......@@ -910,17 +910,15 @@ mk_cl_logical_pathname(MKCL, mkcl_object x)
}
if (component == mk_cl_Cnil || component == @':name') {
mkcl_object name = pathname->pathname.name;
if (name != mk_cl_Cnil &&
(name == @':wild' ||
(!MKCL_SYMBOLP(name) && mkcl_member_char(env, '*', name))))
if (name != mk_cl_Cnil
&& (name == @':wild' || mkcl_pathname_component_string_is_wild_p(env, name)))
@(return mk_cl_Ct);
checked = 1;
}
if (component == mk_cl_Cnil || component == @':type') {
mkcl_object name = pathname->pathname.type;
if (name != mk_cl_Cnil &&
(name == @':wild' ||
(!MKCL_SYMBOLP(name) && mkcl_member_char(env, '*', name))))
if (name != mk_cl_Cnil
&& (name == @':wild' || mkcl_pathname_component_string_is_wild_p(env, name)))
@(return mk_cl_Ct);
checked = 1;
}
......@@ -929,9 +927,9 @@ mk_cl_logical_pathname(MKCL, mkcl_object x)
checked = 1;
mkcl_loop_for_on_unsafe(list) {
mkcl_object name = MKCL_CONS_CAR(list);
if (name != mk_cl_Cnil &&
(name == @':wild' || name == @':wild-inferiors' ||
(!MKCL_SYMBOLP(name) && mkcl_member_char(env, '*', name))))
if (name != mk_cl_Cnil
&& (name == @':wild' || name == @':wild-inferiors'
|| mkcl_pathname_component_string_is_wild_p(env, name)))
{
@(return mk_cl_Ct);
}
......
......@@ -1176,7 +1176,7 @@ raw_string_is_wild_p(mkcl_OSstring_raw_type p)
return FALSE;
}
bool mkcl_component_string_is_wild_p(MKCL, mkcl_object comp_str)
bool mkcl_pathname_component_string_is_wild_p(MKCL, mkcl_object comp_str)
{
if (MKCL_STRINGP(comp_str))
{
......@@ -1268,7 +1268,7 @@ list_directory(MKCL, struct OSpath * wd_path, mkcl_object mask, bool only_dir)
mkcl_object os_path = mkcl_string_to_OSstring(env, mkcl_namestring(env, wd_path->pathname, FALSE));
if (!(mask == @':wild' || mkcl_component_string_is_wild_p(env, mask)))
if (!(mask == @':wild' || mkcl_pathname_component_string_is_wild_p(env, mask)))
{
struct stat buf;
int rc;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment