summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-02-16 07:31:09 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-02-16 07:31:09 -0800
commit5ce43f94327ebf98b3eaff49fa6fcda8a88470fb (patch)
tree0952148efe10681275eaa0d5fac0f443821e0420 /struct.c
parentaeb76cfe860f14982fc97de262c343b94e11156a (diff)
downloadtxr-5ce43f94327ebf98b3eaff49fa6fcda8a88470fb.tar.gz
txr-5ce43f94327ebf98b3eaff49fa6fcda8a88470fb.tar.bz2
txr-5ce43f94327ebf98b3eaff49fa6fcda8a88470fb.zip
time: fix missing day-of-week and day-of-year.
The time code entirely neglects the tm_wday and tm_yday fields of struct tm; they are missing from the Lisp time structure, and not referenced anywhere. * time.c (wday_s, yday_s): New symbol variables. (tm_to_time_struct): Transfer tm_wday and tm_yday values to Lisp struct. (time_fields_to_tm): Take wday and yday parameters, convert these and store in the given struct tm. (time_struct_to_tm): Retrieve wday and yday slots, and pass these values to time_fields_to_tm. (make_time_impl): Pass nil for wday and yday arguments of time_fields_to_tm, which is OK since mktime doesn't use those. (time_init): Intern the wday and yday symbols. Add those slots to the time structure. * txr.1: Documented new slots.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions