aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Love2000-06-19 13:07:47 +0000
committerDave Love2000-06-19 13:07:47 +0000
commit998e9f8cb3ee57ab87b9cc7eedf3e8687d4b3406 (patch)
tree26cadaca50ea363312f676fe6278a6b83417c9ce /src
parentd150418429115f2161ebdc8dba0f72d5e3a38387 (diff)
downloademacs-998e9f8cb3ee57ab87b9cc7eedf3e8687d4b3406.tar.gz
emacs-998e9f8cb3ee57ab87b9cc7eedf3e8687d4b3406.zip
Unprotoized.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/mktime.c30
2 files changed, 26 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 33a1180a509..8d90ca6889c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12000-06-19 Dave Love <fx@gnu.org>
2
3 * mktime.c: Unprotoized.
4
12000-06-19 Richard Stallman <rms@caffeine.ai.mit.edu> 52000-06-19 Richard Stallman <rms@caffeine.ai.mit.edu>
2 6
3 * data.c (set_internal): If variable is frame-local, 7 * data.c (set_internal): If variable is frame-local,
diff --git a/src/mktime.c b/src/mktime.c
index 3b3330eea06..3f36e33a235 100644
--- a/src/mktime.c
+++ b/src/mktime.c
@@ -117,7 +117,9 @@ const unsigned short int __mon_yday[2][13] =
117 localtime to localtime_r, since many localtime_r implementations 117 localtime to localtime_r, since many localtime_r implementations
118 are buggy. */ 118 are buggy. */
119static struct tm * 119static struct tm *
120my_mktime_localtime_r (const time_t *t, struct tm *tp) 120my_mktime_localtime_r (t, tp)
121 const time_t *t;
122 struct tm *tp;
121{ 123{
122 struct tm *l = localtime (t); 124 struct tm *l = localtime (t);
123 if (! l) 125 if (! l)
@@ -135,8 +137,9 @@ my_mktime_localtime_r (const time_t *t, struct tm *tp)
135 If TP is null, return a nonzero value. 137 If TP is null, return a nonzero value.
136 If overflow occurs, yield the low order bits of the correct answer. */ 138 If overflow occurs, yield the low order bits of the correct answer. */
137static time_t 139static time_t
138ydhms_tm_diff (int year, int yday, int hour, int min, int sec, 140ydhms_tm_diff (year, yday, hour, min, sec, tp)
139 const struct tm *tp) 141 int year, yday, hour, min, sec;
142 const struct tm *tp;
140{ 143{
141 if (!tp) 144 if (!tp)
142 return 1; 145 return 1;
@@ -167,8 +170,14 @@ ydhms_tm_diff (int year, int yday, int hour, int min, int sec,
167 If *T is out of range for conversion, adjust it so that 170 If *T is out of range for conversion, adjust it so that
168 it is the nearest in-range value and then convert that. */ 171 it is the nearest in-range value and then convert that. */
169static struct tm * 172static struct tm *
170ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), 173ranged_convert (convert, t, tp)
171 time_t *t, struct tm *tp) 174#ifdef PROTOTYPES
175 struct tm *(*convert) (const time_t *, struct tm *);
176#else
177 struct tm *(*convert)();
178#endif
179 time_t *t;
180 struct tm *tp;
172{ 181{
173 struct tm *r; 182 struct tm *r;
174 183
@@ -215,9 +224,14 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
215 compared to what the result would be for UTC without leap seconds. 224 compared to what the result would be for UTC without leap seconds.
216 If *OFFSET's guess is correct, only one CONVERT call is needed. */ 225 If *OFFSET's guess is correct, only one CONVERT call is needed. */
217time_t 226time_t
218__mktime_internal (struct tm *tp, 227__mktime_internal (tp, convert, offset)
219 struct tm *(*convert) (const time_t *, struct tm *), 228 struct tm *tp;
220 time_t *offset) 229#ifdef PROTOTYPES
230 struct tm *(*convert) (const time_t *, struct tm *);
231#else
232 struct tm *(*convert)();
233#endif
234 time_t *offset;
221{ 235{
222 time_t t, dt, t0, t1, t2; 236 time_t t, dt, t0, t1, t2;
223 struct tm tm; 237 struct tm tm;