Mercurial > hg > octave-nkf
changeset 3344:ff13d5dec62d
[project @ 1999-11-08 04:18:48 by jwe]
author | jwe |
---|---|
date | Mon, 08 Nov 1999 04:18:48 +0000 |
parents | 466d7a1cac01 |
children | c7ed52f51470 |
files | liboctave/ChangeLog liboctave/oct-time.cc |
diffstat | 2 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +1999-11-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-time.cc (Fstrftime): Undo previous change. + (octave_time::octave_time (const octave_base_tm&)): Likewise. + 1999-11-03 John W. Eaton <jwe@bevo.che.wisc.edu> * dbleSVD.cc (SVD::init): Let DGESVD determine work space requirement.
--- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -47,11 +47,16 @@ #if defined (HAVE_TM_ZONE) string s = tm.zone (); - t.tm_zone = s.c_str (); + char *ps = strsave (s.c_str ()); + t.tm_zone = ps; #endif ot_unix_time = mktime (&t); +#if defined (HAVE_TM_ZONE) + delete [] ps; +#endif + ot_usec = tm.usec (); } @@ -138,7 +143,8 @@ t.tm_isdst = tm_isdst; #if defined (HAVE_TM_ZONE) - t.tm_zone = tm_zone.c_str (); + char *ps = strsave (tm_zone.c_str ()); + t.tm_zone = ps; #endif const char *fmt_str = fmt.c_str (); @@ -158,6 +164,10 @@ bufsize *= 2; } +#if defined (HAVE_TM_ZONE) + delete [] ps; +#endif + retval = buf; delete [] buf;