Mercurial > hg > octave-nkf
changeset 1376:b5e74064566f
[project @ 1995-09-12 00:01:39 by jwe]
author | jwe |
---|---|
date | Tue, 12 Sep 1995 00:02:16 +0000 |
parents | 6ff3b87196fb |
children | 44f5d41ff757 |
files | src/timefns.cc |
diffstat | 1 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/timefns.cc +++ b/src/timefns.cc @@ -36,24 +36,24 @@ // Date and time functions. static Octave_map -mk_tm_map (struct tm& tm, double fraction) +mk_tm_map (struct tm *tm, double fraction) { Octave_map m; m ["usec"] = fraction * 1e6; - m ["sec"] = (double) tm.tm_sec; - m ["min"] = (double) tm.tm_min; - m ["hour"] = (double) tm.tm_hour; - m ["mday"] = (double) tm.tm_mday; - m ["mon"] = (double) tm.tm_mon; - m ["year"] = (double) tm.tm_year; - m ["wday"] = (double) tm.tm_wday; - m ["yday"] = (double) tm.tm_yday; - m ["isdst"] = (double) tm.tm_isdst; + m ["sec"] = (double) tm->tm_sec; + m ["min"] = (double) tm->tm_min; + m ["hour"] = (double) tm->tm_hour; + m ["mday"] = (double) tm->tm_mday; + m ["mon"] = (double) tm->tm_mon; + m ["year"] = (double) tm->tm_year; + m ["wday"] = (double) tm->tm_wday; + m ["yday"] = (double) tm->tm_yday; + m ["isdst"] = (double) tm->tm_isdst; #if defined (HAVE_TM_ZONE) - m ["zone"] = tm.tm_zone; + m ["zone"] = tm->tm_zone; #elif defined (HAVE_TZNAME) - if (tm.tm_isdst && tzname[1] && *tzname[1]) + if (tm->tm_isdst && tzname[1] && *tzname[1]) m ["zone"] = tzname[1]; else m ["zone"] = tzname[0]; @@ -137,7 +137,7 @@ double ip; double fraction = modf (tmp, &ip); - retval = tree_constant (mk_tm_map (gmtime (timeval), fraction)); + retval = tree_constant (mk_tm_map (gmtime (&timeval), fraction)); } } else @@ -176,7 +176,7 @@ double ip; double fraction = modf (tmp, &ip); - retval = tree_constant (mk_tm_map (localtime (timeval), fraction)); + retval = tree_constant (mk_tm_map (localtime (&timeval), fraction)); } } else