diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-11-15 22:44:51 -0800 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-11-15 22:44:51 -0800 |
commit | d2762c86419d6d55bf59fd62ea1c9fa3525411c0 (patch) | |
tree | e1ba41021fe7ba2f29a79a51f23785f352547dc2 /src/mktime.c | |
parent | 0073e0313a029f5bba231a147f0d4f1bb029dd43 (diff) | |
download | emacs-d2762c86419d6d55bf59fd62ea1c9fa3525411c0.tar.gz emacs-d2762c86419d6d55bf59fd62ea1c9fa3525411c0.tar.bz2 emacs-d2762c86419d6d55bf59fd62ea1c9fa3525411c0.zip |
Convert definitions to standard C.
* src/strftime.c (LOCALE_PARAM_DECL): Update for standard C.
(LOCALE_PARAM, LOCALE_PARAM_PROTO): Remove, unused.
(memcpy_lowcase, so_week_days, extra_args_spec, emacs_strftimeu):
Convert definitions to standard C.
* src/regex.c: Do not include <stdlib.h>, config.h does it.
Include unistd.h.
(xrealloc, init_syntax_once, re_match, regcomp, regexec)
(regerror, regfree): Convert definitions to standard C.
* src/mktime.c (my_mktime_localtime_r, ydhms_tm_diff, ranged_convert)
(__mktime_internal): Convert definitions to standard C.
Diffstat (limited to 'src/mktime.c')
-rw-r--r-- | src/mktime.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/mktime.c b/src/mktime.c index 3570cecd451..ede151981f4 100644 --- a/src/mktime.c +++ b/src/mktime.c @@ -110,9 +110,7 @@ const unsigned short int __mon_yday[2][13] = localtime to localtime_r, since many localtime_r implementations are buggy. */ static struct tm * -my_mktime_localtime_r (t, tp) - const time_t *t; - struct tm *tp; +my_mktime_localtime_r (const time_t *t, struct tm *tp) { struct tm *l = localtime (t); if (! l) @@ -130,9 +128,7 @@ my_mktime_localtime_r (t, tp) If TP is null, return a nonzero value. If overflow occurs, yield the low order bits of the correct answer. */ static time_t -ydhms_tm_diff (year, yday, hour, min, sec, tp) - int year, yday, hour, min, sec; - const struct tm *tp; +ydhms_tm_diff (int year, int yday, int hour, int min, int sec, const struct tm *tp) { if (!tp) return 1; @@ -163,14 +159,8 @@ ydhms_tm_diff (year, yday, hour, min, sec, tp) If *T is out of range for conversion, adjust it so that it is the nearest in-range value and then convert that. */ static struct tm * -ranged_convert (convert, t, tp) -#ifdef PROTOTYPES - struct tm *(*convert) (const time_t *, struct tm *); -#else - struct tm *(*convert)(); -#endif - time_t *t; - struct tm *tp; +ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), + time_t *t, struct tm *tp) { struct tm *r; @@ -217,14 +207,8 @@ ranged_convert (convert, t, tp) compared to what the result would be for UTC without leap seconds. If *OFFSET's guess is correct, only one CONVERT call is needed. */ time_t -__mktime_internal (tp, convert, offset) - struct tm *tp; -#ifdef PROTOTYPES - struct tm *(*convert) (const time_t *, struct tm *); -#else - struct tm *(*convert)(); -#endif - time_t *offset; +__mktime_internal (struct tm *tp, struct tm *(*convert) (const time_t *, struct tm *), + time_t *offset) { time_t t, dt, t0, t1, t2; struct tm tm; @@ -558,5 +542,3 @@ compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mkti End: */ -/* arch-tag: 9456752f-7ddd-47cb-8286-fa807b1355ae - (do not change this comment) */ |