mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-09-20 19:48:12 +00:00
simplified
SCCS-file: zdump.c SCCS-SID: 3.9
This commit is contained in:
committed by
Paul Eggert
parent
8091897611
commit
4cf6380d1c
@@ -120,7 +120,7 @@ char * argv[];
|
||||
timecnt = 0;
|
||||
leapcnt = 0;
|
||||
} else {
|
||||
char code[4];
|
||||
struct tzhead tzh;
|
||||
|
||||
if (argv[i][0] == '/')
|
||||
fp = fopen(argv[i], "rb");
|
||||
@@ -141,30 +141,12 @@ char * argv[];
|
||||
perror(argv[i]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
/*
|
||||
** Contorted. . .
|
||||
*/
|
||||
{
|
||||
struct tzhead tzh;
|
||||
|
||||
#ifdef lint
|
||||
tzh.tzh_reserved[0] = 0;
|
||||
#endif /* defined lint */
|
||||
(void) fseek(fp,
|
||||
(long) sizeof tzh.tzh_reserved, 0);
|
||||
}
|
||||
if (fread((char *) code, sizeof code, 1, fp) != 1)
|
||||
if (fread((char *) &tzh, sizeof tzh, 1, fp) != 1)
|
||||
readerr(fp, argv[0], argv[i]);
|
||||
leapcnt = tzdecode(code);
|
||||
if (fread((char *) code, sizeof code, 1, fp) != 1)
|
||||
readerr(fp, argv[0], argv[i]);
|
||||
timecnt = tzdecode(code);
|
||||
if (fread((char *) code, sizeof code, 1, fp) != 1)
|
||||
readerr(fp, argv[0], argv[i]);
|
||||
typecnt = tzdecode(code);
|
||||
if (fread((char *) code, sizeof code, 1, fp) != 1)
|
||||
readerr(fp, argv[0], argv[i]);
|
||||
charcnt = tzdecode(code);
|
||||
leapcnt = tzdecode(tzh.tzh_leapcnt);
|
||||
timecnt = tzdecode(tzh.tzh_timecnt);
|
||||
typecnt = tzdecode(tzh.tzh_typecnt);
|
||||
charcnt = tzdecode(tzh.tzh_charcnt);
|
||||
}
|
||||
t = 0x80000000;
|
||||
if (t > 0) /* time_t is unsigned */
|
||||
|
||||
Reference in New Issue
Block a user