diff options
| author | Dave Love | 2000-06-19 13:07:47 +0000 |
|---|---|---|
| committer | Dave Love | 2000-06-19 13:07:47 +0000 |
| commit | 998e9f8cb3ee57ab87b9cc7eedf3e8687d4b3406 (patch) | |
| tree | 26cadaca50ea363312f676fe6278a6b83417c9ce /src | |
| parent | d150418429115f2161ebdc8dba0f72d5e3a38387 (diff) | |
| download | emacs-998e9f8cb3ee57ab87b9cc7eedf3e8687d4b3406.tar.gz emacs-998e9f8cb3ee57ab87b9cc7eedf3e8687d4b3406.zip | |
Unprotoized.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/mktime.c | 30 |
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 @@ | |||
| 1 | 2000-06-19 Dave Love <fx@gnu.org> | ||
| 2 | |||
| 3 | * mktime.c: Unprotoized. | ||
| 4 | |||
| 1 | 2000-06-19 Richard Stallman <rms@caffeine.ai.mit.edu> | 5 | 2000-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. */ |
| 119 | static struct tm * | 119 | static struct tm * |
| 120 | my_mktime_localtime_r (const time_t *t, struct tm *tp) | 120 | my_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. */ |
| 137 | static time_t | 139 | static time_t |
| 138 | ydhms_tm_diff (int year, int yday, int hour, int min, int sec, | 140 | ydhms_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. */ |
| 169 | static struct tm * | 172 | static struct tm * |
| 170 | ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), | 173 | ranged_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. */ |
| 217 | time_t | 226 | time_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; |