diff options
| author | Paul Eggert | 2018-10-03 09:10:00 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-10-06 23:31:03 -0700 |
| commit | b5d08da1e9ea7ee1334d810348c656babe6a15d2 (patch) | |
| tree | e42a93a11f341db5cde167332790ebf9ad717525 /src/w32.h | |
| parent | 44bf4a6b012f65327718b8c8334bfac1aee26370 (diff) | |
| download | emacs-b5d08da1e9ea7ee1334d810348c656babe6a15d2.tar.gz emacs-b5d08da1e9ea7ee1334d810348c656babe6a15d2.zip | |
Move timestamp-related stuff to timefns.c
This does not change behavior; it’s just long-overdue
refactoring (Bug#32902).
* src/emacs.c (main): Call init_timefns, syms_of_timefns.
* src/timefns.c: New file, containing timestamp-related stuff
from editfns.c and sysdep.c.
* src/Makefile.in (base_obj): Add timefns.o.
* src/editfns.c: Simplify by moving a big chunk to timefns.c.
Do not include systime.h, sys/resource.h, sys/param.h,
strftime.h, coding.h.
(HAVE_TZALLOC_BUG, TM_YEAR_BASE, HAVE_TM_GMTOFF, tzeqlen)
(local_tz, utc_tz, emacs_localtime_rz, emacs_mktime_z)
(invalid_time_zone_specification, xtzfree, tzlookup)
(TIME_T_MIN, TIME_T_MAX, time_overflow, invalid_time)
(check_time_validity, hi_time, lo_time, Fcurrent_time)
(time_add, time_subtract, time_arith, Ftime_add)
(Ftime_subtract, Ftime_less_p, Fget_internal_run_time)
(make_lisp_time, disassemble_lisp_time, decode_float_time)
(lisp_to_timespec, lisp_time_struct, lisp_time_argument)
(lisp_seconds_argument, Ffloat_time, emacs_nmemftime)
(Fformat_time_string, format_time_string, Fdecode_time)
(check_tm_member, Fencode_time, Fcurrent_time_string)
(tm_gmtoff, Fcurrent_time_zone, Fset_time_zone_rule)
(emacs_getenv_TZ, emacs_setenv_TZ): Move to timefns.c.
* src/emacs.c (main): Adjust to initialization changes.
* src/sysdep.c: Include <sys/resource.h> if it's present.
Regularize includes a bit.
(Fget_internal_run_time): Move here from editfns.c.
(init_timefns, syms_of_timefns): New functions.
* src/w32.h (w32_get_internal_run_time): Move decl here
so that it need not be cloned.
* test/src/editfns-tests.el:
* test/src/editfns-tests.el (format-time-string-with-zone)
(format-time-string-with-outlandish-zone)
(editfns-tests--have-leap-seconds)
(format-time-string-with-bignum-on-32-bit):
Move to ...
* test/src/timefns-tests.el: ... this new file.
Diffstat (limited to 'src/w32.h')
| -rw-r--r-- | src/w32.h | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -195,6 +195,7 @@ extern int filename_from_ansi (const char *, char *); | |||
| 195 | extern int filename_to_ansi (const char *, char *); | 195 | extern int filename_to_ansi (const char *, char *); |
| 196 | extern int filename_from_utf16 (const wchar_t *, char *); | 196 | extern int filename_from_utf16 (const wchar_t *, char *); |
| 197 | extern int filename_to_utf16 (const char *, wchar_t *); | 197 | extern int filename_to_utf16 (const char *, wchar_t *); |
| 198 | extern Lisp_Object w32_get_internal_run_time (void); | ||
| 198 | extern void w32_init_file_name_codepage (void); | 199 | extern void w32_init_file_name_codepage (void); |
| 199 | extern int codepage_for_filenames (CPINFO *); | 200 | extern int codepage_for_filenames (CPINFO *); |
| 200 | extern Lisp_Object ansi_encode_filename (Lisp_Object); | 201 | extern Lisp_Object ansi_encode_filename (Lisp_Object); |