Mercurial > hg > octave-avbm
changeset 2549:6551a8230ded
[project @ 1996-11-20 06:58:51 by jwe]
author | jwe |
---|---|
date | Wed, 20 Nov 1996 06:58:52 +0000 |
parents | b50cc31aa0cd |
children | c5fdf05ee5da |
files | liboctave/ChangeLog liboctave/oct-glob.cc src/ChangeLog src/sysdep.cc |
diffstat | 4 files changed, 24 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,8 @@ Tue Nov 19 23:07:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + * oct-glob.cc (glob_match::match): Don't expect our flag values to + be the same as they are in fnmatch.h. + * f77-fcn.c, f77-fcn.h: Move to libcruft/misc directory. * Makefile.in (INCLUDES): Delete f77-fcn.h.
--- a/liboctave/oct-glob.cc +++ b/liboctave/oct-glob.cc @@ -42,8 +42,19 @@ const char *str = s.c_str (); + int fnmatch_flags = 0; + + if (flags & pathname) + fnmatch_flags |= FNM_PATHNAME; + + if (flags & noescape) + fnmatch_flags |= FNM_NOESCAPE; + + if (flags & period) + fnmatch_flags |= FNM_PERIOD; + for (int i = 0; i < npat; i++) - if (fnmatch (pat(i).c_str (), str, flags) != FNM_NOMATCH) + if (fnmatch (pat(i).c_str (), str, fnmatch_flags) != FNM_NOMATCH) return true; return false;
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ Wed Nov 20 00:35:57 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + * sysdep.cc (octave_chdir): [__EMX__]: Make copy of string before + converting to upper case. + * getgrent.cc (mk_gr_map): Only set the passwd field if HAVE_GR_PASSWD is defined.
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -381,15 +381,19 @@ #if defined (__EMX__) int retval = -1; + char *tmp_path = strsave (path.c_str ()); + if (path.length () == 2 && path[1] == ':') { - char *upper_case_dir_name = strupr (path.c_str ()); + char *upper_case_dir_name = strupr (tmp_path); _chdrive (upper_case_dir_name[0]); if (_getdrive () == upper_case_dir_name[0]) retval = _chdir2 ("/"); } else - retval = _chdir2 (path.c_str ()); + retval = _chdir2 (tmp_path); + + delete [] tmp_path; return retval; #else