Mercurial > hg > octave-lyh
diff src/variables.cc @ 1792:e6d79e281f7d
[project @ 1996-01-26 02:33:22 by jwe]
author | jwe |
---|---|
date | Fri, 26 Jan 1996 02:35:42 +0000 |
parents | e8e76be43e79 |
children | 4603d7ee0258 |
line wrap: on
line diff
--- a/src/variables.cc +++ b/src/variables.cc @@ -40,8 +40,8 @@ #include <readline/readline.h> -#include "fnmatch.h" - +#include "file-ops.h" +#include "oct-glob.h" #include "str-vec.h" #include "defaults.h" @@ -49,7 +49,6 @@ #include "dirfns.h" #include "dynamic-ld.h" #include "error.h" -#include "file-ops.h" #include "help.h" #include "input.h" #include "lex.h" @@ -1925,13 +1924,13 @@ if (! patstr.empty ()) { - const char *pat = patstr.c_str (); + glob_match pattern (patstr); int i; for (i = 0; i < lcount; i++) { string nm = lvars[i]; - int match = (fnmatch (pat, nm.c_str (), __FNM_FLAGS) == 0); + int match = pattern.match (nm); if ((exclusive && ! match) || (! exclusive && match)) curr_sym_tab->clear (nm); } @@ -1940,7 +1939,7 @@ for (i = 0; i < gcount; i++) { string nm = gvars[i]; - int match = (fnmatch (pat, nm.c_str (), __FNM_FLAGS) == 0); + int match = pattern.match (nm); if ((exclusive && ! match) || (! exclusive && match)) { count = curr_sym_tab->clear (nm); @@ -1952,7 +1951,7 @@ for (i = 0; i < fcount; i++) { string nm = fcns[i]; - int match = (fnmatch (pat, nm.c_str (), __FNM_FLAGS) == 0); + int match = pattern.match (nm); if ((exclusive && ! match) || (! exclusive && match)) { count = curr_sym_tab->clear (nm);