aboutsummaryrefslogtreecommitdiffstats
path: root/src/strftime.c
diff options
context:
space:
mode:
authorJoakim Verona2010-08-27 10:58:44 +0200
committerJoakim Verona2010-08-27 10:58:44 +0200
commit362120833bcbbaea94976b6701633e2ed75f6051 (patch)
tree632690a24a934bb51a32303add5172d63b6b9e00 /src/strftime.c
parent1800c4865b15a9e1154bf1f03d87d1aaf750a527 (diff)
parent1a868076f51b5d6f1cf78117463e6f9c614551ec (diff)
downloademacs-362120833bcbbaea94976b6701633e2ed75f6051.tar.gz
emacs-362120833bcbbaea94976b6701633e2ed75f6051.zip
merge from trunk, fix conflicts
Diffstat (limited to 'src/strftime.c')
-rw-r--r--src/strftime.c28
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
190static struct tm *my_strftime_gmtime_r __P ((const time_t *, struct tm *)); 182static struct tm *my_strftime_gmtime_r (const time_t *, struct tm *);
191static struct tm * 183static struct tm *
192my_strftime_gmtime_r (t, tp) 184my_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
203static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *)); 195static struct tm *my_strftime_localtime_r (const time_t *, struct tm *);
204static struct tm * 196static struct tm *
205my_strftime_localtime_r (t, tp) 197my_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
374static CHAR_T *memcpy_lowcase __P ((CHAR_T *dest, const CHAR_T *src, 366static 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
377static CHAR_T * 369static CHAR_T *
378memcpy_lowcase (dest, src, len LOCALE_PARAM) 370memcpy_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
389static CHAR_T *memcpy_uppcase __P ((CHAR_T *dest, const CHAR_T *src, 381static 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
392static CHAR_T * 384static CHAR_T *
393memcpy_uppcase (dest, src, len LOCALE_PARAM) 385memcpy_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
409static int tm_diff __P ((const struct tm *, const struct tm *)); 401static int tm_diff (const struct tm *, const struct tm *);
410static int 402static int
411tm_diff (a, b) 403tm_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)
443static int iso_week_days __P ((int, int)); 435static 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;