Please provide a unified diff format patch (-u) and a ChangeLog entry. This
patch failed to apply for me.
Thanks
andy
-----Original Message-----
From: xemacs-beta-admin(a)xemacs.org
[mailto:xemacs-beta-adminï¼ xemacs.org]On Behalf Of Nick V. Pakoulin
Sent: Friday, March 29, 2002 4:49 AM
To: xemacs-beta(a)xemacs.org
Cc: xemacs-patches(a)xemacs.org
Subject: [PATCH] Crash on (format-time-string "%s" '(-1 0 0)) and
(decode-time '(-1 0)) on Windows
`decode-time' also suffers from windows implementation of locatime. The
patch fixes both crashes.
Index: editfns.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/editfns.c,v
retrieving revision 1.36
diff -r1.36 editfns.c
1070a1071
> struct tm * tm;
1075c1076,1079
< if (! lisp_to_time (time_, &value))
---
> if (! lisp_to_time (time_, &value) ||
> /* Might happen on MS Windows */
> ! (tm = localtime (&value))
> )
1091c1095
< localtime (&value))
---
> tm)
1120c1124,1127
< if (! lisp_to_time (specified_time, &time_spec))
---
> if (! lisp_to_time (specified_time, &time_spec) ||
> /* Might happen on MS Windows */
> ! (decoded_time = localtime (&time_spec))
> )
1123d1129
< decoded_time = localtime (&time_spec);