mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-21 21:45:42 +00:00
SCCS-file: zdump.c
SCCS-SID: 7.59
This commit is contained in:
committed by
Paul Eggert
parent
842255250e
commit
f9f1feea3b
18
zdump.c
18
zdump.c
@ -151,7 +151,7 @@ static void dumptime P((const struct tm * tmp));
|
||||
static time_t hunt P((char * name, time_t lot, time_t hit));
|
||||
static void setabsolutes();
|
||||
static void show P((char * zone, time_t t, int v));
|
||||
static char * tformat P((void));
|
||||
static const char * tformat P((void));
|
||||
static time_t yeartot P((long y));
|
||||
|
||||
int
|
||||
@ -505,21 +505,29 @@ struct tm * tmp;
|
||||
return (result == NULL) ? &nada : result;
|
||||
}
|
||||
|
||||
static char *
|
||||
/*
|
||||
** The code below can fail on certain theoretical systems;
|
||||
** it works on all known real-world systems as of 2004-12-30.
|
||||
*/
|
||||
|
||||
static const char *
|
||||
tformat()
|
||||
{
|
||||
if (0.5 == (time_t) 0.5) /* floating */
|
||||
if (0.5 == (time_t) 0.5) { /* floating */
|
||||
if (sizeof (time_t) > sizeof (double))
|
||||
return "%Lg";
|
||||
return "%g";
|
||||
}
|
||||
if (0 > (time_t) -1) { /* signed */
|
||||
if (sizeof (time_t) > sizeof (long))
|
||||
return "%lld";
|
||||
if (sizeof (time_t) == sizeof (long))
|
||||
if (sizeof (time_t) > sizeof (int))
|
||||
return "%ld";
|
||||
return "%d";
|
||||
}
|
||||
if (sizeof (time_t) > sizeof (unsigned long))
|
||||
return "%llu";
|
||||
if (sizeof (time_t) == sizeof (unsigned long))
|
||||
if (sizeof (time_t) > sizeof (unsigned int))
|
||||
return "%lu";
|
||||
return "%u";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user