56 const char *cstr = str.c_str ();
58 for (
int i = 0; i < npat; i++)
59 if (fnmatch (pat(i).c_str (), cstr, fnmatch_flags) != FNM_NOMATCH)
74 for (
int i = 0; i < npat; i++)
76 std::string xpat = pat(i);
82 #if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
83 && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM)
84 std::replace_if (xpat.begin (), xpat.end (),
85 std::bind2nd (std::equal_to<char> (),
'\\'),
89 int err = gnulib::glob (xpat.c_str (), GLOB_NOSORT, 0, &glob_info);
93 int n = glob_info.gl_pathc;
95 const char *
const *matches = glob_info.gl_pathv;
108 for (
int j = 0; j < n; j++)
110 std::string tmp = matches[j];
112 #if defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM) \
113 && ! defined (OCTAVE_HAVE_POSIX_FILESYSTEM)
114 std::replace_if (tmp.begin (), tmp.end (),
115 std::bind2nd (std::equal_to<char> (),
124 gnulib::globfree (&glob_info);
129 return retval.
sort ();