diff options
| author | Joakim Verona | 2010-08-27 10:58:44 +0200 |
|---|---|---|
| committer | Joakim Verona | 2010-08-27 10:58:44 +0200 |
| commit | 362120833bcbbaea94976b6701633e2ed75f6051 (patch) | |
| tree | 632690a24a934bb51a32303add5172d63b6b9e00 /src/strftime.c | |
| parent | 1800c4865b15a9e1154bf1f03d87d1aaf750a527 (diff) | |
| parent | 1a868076f51b5d6f1cf78117463e6f9c614551ec (diff) | |
| download | emacs-362120833bcbbaea94976b6701633e2ed75f6051.tar.gz emacs-362120833bcbbaea94976b6701633e2ed75f6051.zip | |
merge from trunk, fix conflicts
Diffstat (limited to 'src/strftime.c')
| -rw-r--r-- | src/strftime.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/strftime.c b/src/strftime.c index 7a9506e55d3..a7617427793 100644 --- a/src/strftime.c +++ b/src/strftime.c | |||
| @@ -131,14 +131,6 @@ extern char *tzname[]; | |||
| 131 | # endif | 131 | # endif |
| 132 | #endif | 132 | #endif |
| 133 | 133 | ||
| 134 | #ifndef __P | ||
| 135 | # if defined __GNUC__ || (defined __STDC__ && __STDC__) || defined (PROTOTYPES) | ||
| 136 | # define __P(args) args | ||
| 137 | # else | ||
| 138 | # define __P(args) () | ||
| 139 | # endif /* GCC. */ | ||
| 140 | #endif /* Not __P. */ | ||
| 141 | |||
| 142 | #ifndef PTR | 134 | #ifndef PTR |
| 143 | # ifdef __STDC__ | 135 | # ifdef __STDC__ |
| 144 | # define PTR void * | 136 | # define PTR void * |
| @@ -187,7 +179,7 @@ extern char *tzname[]; | |||
| 187 | Similarly for localtime_r. */ | 179 | Similarly for localtime_r. */ |
| 188 | 180 | ||
| 189 | # if ! HAVE_TM_GMTOFF | 181 | # if ! HAVE_TM_GMTOFF |
| 190 | static struct tm *my_strftime_gmtime_r __P ((const time_t *, struct tm *)); | 182 | static struct tm *my_strftime_gmtime_r (const time_t *, struct tm *); |
| 191 | static struct tm * | 183 | static struct tm * |
| 192 | my_strftime_gmtime_r (t, tp) | 184 | my_strftime_gmtime_r (t, tp) |
| 193 | const time_t *t; | 185 | const time_t *t; |
| @@ -200,7 +192,7 @@ my_strftime_gmtime_r (t, tp) | |||
| 200 | return tp; | 192 | return tp; |
| 201 | } | 193 | } |
| 202 | 194 | ||
| 203 | static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *)); | 195 | static struct tm *my_strftime_localtime_r (const time_t *, struct tm *); |
| 204 | static struct tm * | 196 | static struct tm * |
| 205 | my_strftime_localtime_r (t, tp) | 197 | my_strftime_localtime_r (t, tp) |
| 206 | const time_t *t; | 198 | const time_t *t; |
| @@ -371,8 +363,8 @@ static const CHAR_T zeroes[16] = /* "0000000000000000" */ | |||
| 371 | more reliable way to accept other sets of digits. */ | 363 | more reliable way to accept other sets of digits. */ |
| 372 | #define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) | 364 | #define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) |
| 373 | 365 | ||
| 374 | static CHAR_T *memcpy_lowcase __P ((CHAR_T *dest, const CHAR_T *src, | 366 | static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, |
| 375 | size_t len LOCALE_PARAM_PROTO)); | 367 | size_t len LOCALE_PARAM_PROTO); |
| 376 | 368 | ||
| 377 | static CHAR_T * | 369 | static CHAR_T * |
| 378 | memcpy_lowcase (dest, src, len LOCALE_PARAM) | 370 | memcpy_lowcase (dest, src, len LOCALE_PARAM) |
| @@ -386,8 +378,8 @@ memcpy_lowcase (dest, src, len LOCALE_PARAM) | |||
| 386 | return dest; | 378 | return dest; |
| 387 | } | 379 | } |
| 388 | 380 | ||
| 389 | static CHAR_T *memcpy_uppcase __P ((CHAR_T *dest, const CHAR_T *src, | 381 | static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, |
| 390 | size_t len LOCALE_PARAM_PROTO)); | 382 | size_t len LOCALE_PARAM_PROTO); |
| 391 | 383 | ||
| 392 | static CHAR_T * | 384 | static CHAR_T * |
| 393 | memcpy_uppcase (dest, src, len LOCALE_PARAM) | 385 | memcpy_uppcase (dest, src, len LOCALE_PARAM) |
| @@ -406,7 +398,7 @@ memcpy_uppcase (dest, src, len LOCALE_PARAM) | |||
| 406 | /* Yield the difference between *A and *B, | 398 | /* Yield the difference between *A and *B, |
| 407 | measured in seconds, ignoring leap seconds. */ | 399 | measured in seconds, ignoring leap seconds. */ |
| 408 | # define tm_diff ftime_tm_diff | 400 | # define tm_diff ftime_tm_diff |
| 409 | static int tm_diff __P ((const struct tm *, const struct tm *)); | 401 | static int tm_diff (const struct tm *, const struct tm *); |
| 410 | static int | 402 | static int |
| 411 | tm_diff (a, b) | 403 | tm_diff (a, b) |
| 412 | const struct tm *a; | 404 | const struct tm *a; |
| @@ -440,7 +432,7 @@ tm_diff (a, b) | |||
| 440 | #define ISO_WEEK_START_WDAY 1 /* Monday */ | 432 | #define ISO_WEEK_START_WDAY 1 /* Monday */ |
| 441 | #define ISO_WEEK1_WDAY 4 /* Thursday */ | 433 | #define ISO_WEEK1_WDAY 4 /* Thursday */ |
| 442 | #define YDAY_MINIMUM (-366) | 434 | #define YDAY_MINIMUM (-366) |
| 443 | static int iso_week_days __P ((int, int)); | 435 | static int iso_week_days (int, int); |
| 444 | #ifdef __GNUC__ | 436 | #ifdef __GNUC__ |
| 445 | __inline__ | 437 | __inline__ |
| 446 | #endif | 438 | #endif |
| @@ -499,8 +491,8 @@ static CHAR_T const month_name[][10] = | |||
| 499 | #if !defined _LIBC && !defined(WINDOWSNT) && HAVE_TZNAME && HAVE_TZSET | 491 | #if !defined _LIBC && !defined(WINDOWSNT) && HAVE_TZNAME && HAVE_TZSET |
| 500 | /* Solaris 2.5 tzset sometimes modifies the storage returned by localtime. | 492 | /* Solaris 2.5 tzset sometimes modifies the storage returned by localtime. |
| 501 | Work around this bug by copying *tp before it might be munged. */ | 493 | Work around this bug by copying *tp before it might be munged. */ |
| 502 | size_t _strftime_copytm __P ((char *, size_t, const char *, | 494 | size_t _strftime_copytm (char *, size_t, const char *, |
| 503 | const struct tm * extra_args_spec_iso)); | 495 | const struct tm * extra_args_spec_iso); |
| 504 | size_t | 496 | size_t |
| 505 | my_strftime (s, maxsize, format, tp extra_args) | 497 | my_strftime (s, maxsize, format, tp extra_args) |
| 506 | CHAR_T *s; | 498 | CHAR_T *s; |