Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mkcl
mkcl
Commits
ffab90cf
Commit
ffab90cf
authored
May 19, 2020
by
Jean-Claude Beaudoin
Browse files
Update #'wild-pathname-p to new wild pathname component handling.
parent
96ad32aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/c/mkcl/external.h
View file @
ffab90cf
...
...
@@ -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
...
...
src/c/pathname.d
View file @
ffab90cf
...
...
@@ -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
);
}
...
...
src/c/unixfsys.d
View file @
ffab90cf
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment