# HG changeset patch # User jwe # Date 942034728 0 # Node ID ff13d5dec62d5fea81188951f8d216dcb7eb5447 # Parent 466d7a1cac01bc8bb672b2a932e7a54799e5d174 [project @ 1999-11-08 04:18:48 by jwe] diff -r 466d7a1cac01 -r ff13d5dec62d liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Nov 05 19:34:29 1999 +0000 +++ b/liboctave/ChangeLog Mon Nov 08 04:18:48 1999 +0000 @@ -1,3 +1,8 @@ +1999-11-07 John W. Eaton + + * oct-time.cc (Fstrftime): Undo previous change. + (octave_time::octave_time (const octave_base_tm&)): Likewise. + 1999-11-03 John W. Eaton * dbleSVD.cc (SVD::init): Let DGESVD determine work space requirement. diff -r 466d7a1cac01 -r ff13d5dec62d liboctave/oct-time.cc --- a/liboctave/oct-time.cc Fri Nov 05 19:34:29 1999 +0000 +++ b/liboctave/oct-time.cc Mon Nov 08 04:18:48 1999 +0000 @@ -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;