23 #if defined (HAVE_CONFIG_H)
57 int npat = pat.
numel ();
59 const char *cstr = str.c_str ();
61 for (
int i = 0;
i < npat;
i++)
74 int npat = pat.
numel ();
84 for (
int i = 0;
i < npat;
i++)
90 #if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
91 && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM))
92 std::replace_if (xpat.begin (), xpat.end (),
93 std::bind2nd (std::equal_to<char> (),
'\\'),
105 const char *
const *matches
119 for (
int j = 0; j < n; j++)
123 #if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
124 && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM)
125 std::replace_if (tmp.begin (), tmp.end (),
126 std::bind2nd (std::equal_to<char> (),
140 return retval.
sort ();
150 int npat = pat.
numel ();
160 for (
int i = 0;
i < npat;
i++)
167 escaped.reserve (xpat.length ());
169 for (
size_t j = 0; j < xpat.length (); j++)
171 #if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
172 && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM))
178 if (xpat[j] ==
']' || xpat[j] ==
'[')
186 int len = escaped.length ();
187 if (len >= 3 && escaped.substr (len - 3) ==
"*.*")
188 escaped = escaped.substr (0, len - 2);
198 const char *
const *matches
212 for (
int j = 0; j < n; j++)
217 unescaped.reserve (tmp.length ());
219 for (
size_t m = 0;
m < tmp.
length ();
m++)
221 #if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
222 && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM))
236 retval[k++] = unescaped;
245 return retval.
sort ();
void octave_globfree_wrapper(void *glob_info)
bool fnmatch(const string_vector &pat, const std::string &str, int fnm_flags)
Octave interface to the compression and uncompression libraries.
For example cd octave end example noindent changes the current working directory to file
octave_idx_type numel(void) const
Number of elements in the array.
int octave_glob_num_matches(void *glob_info)
int octave_fnmatch_wrapper(const char *pattern, const char *name, int flags)
void resize(octave_idx_type n, const std::string &rfv="")
int octave_glob_nosort_wrapper(void)
int octave_glob_wrapper(const char *pattern, int flags, void *glob_info)
int octave_fnm_nomatch_wrapper(void)
char ** octave_glob_match_list(void *glob_info)
string_vector windows_glob(const string_vector &pat)
void add_fcn(void(*fcn)(void))
nd deftypefn *octave_map m
void * octave_create_glob_info_struct(void)
string_vector & sort(bool make_uniq=false)
void octave_destroy_glob_info_struct(void *glob_info)
octave::unwind_protect frame
=val(i)}if ode{val(i)}occurs in table i
octave_idx_type length(void) const
OCTAVE_EXPORT octave_value_list error nd deftypefn *const octave_scalar_map err
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
string_vector glob(const string_vector &pat)
static bool single_match_exists(const std::string &file)