1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-21 01:52:06 +00:00

64 Commits

Author SHA1 Message Date
7eb7c7349c Use bool for boolean.
The tz source code predates C99 and so used int, 0 and 1 for boolean,
but nowadays bool is available and makes the code clearer.
Include backwards-compatibility definitions for pre-C99 platforms,
and don't go beyond what the backwards-compatibility defintions support.
* date.c (main, reset, sametm, convert, checkfinal, iffy, netsettime):
* localtime.c (struct ttinfo, struct state, gmt_is_set)
(differ_by_repeat, tzload, typesequiv, getoffset, transtime)
(tzparse, gmtload, tzsetwall_unlocked, tzset_unlocked, gmtcheck)
(localtime_tzset, timesub, increment_overflow)
(increment_overflow32, increment_overflow_time)
(normalize_overflow, normalize_overflow32, time2sub, time2)
(time1):
* strftime.c (_fmt, _yconv, _loc):
* zdump.c (warned, errout, is_alpha, my_localtime, abbrok)
(main, hunt, show):
* zic.c (struct rule, errors, warnings, leapseen, noise)
(leap_types, ttisstds, ttisgmts, error, warning, main, dolink)
(associate, infile, gethms, inzone, inzcont, inzsub, inleap)
(rulesub, is32, writezone, doabbr, stringoffset, stringrule)
(stringzone, outzone, addtype, leapadd, yearistype, is_space)
(is_alpha, ciequal, itsabbr, mkdirs):
Use bool for boolean.
* localtime.c (tzload, tzparse):
* zic.c (stringoffset, mkdirs):
Return true for success and false for failure instead of 0 and -1.
All callers changed.
* private.h, zdump.c (TRUE, FALSE): Remove, replacing by ...
(true, false, bool): Define by <stdbool.h> if C99 or later,
by macros otherwise.
* tzfile.h: Remove mention of TRUE and FALSE from commentary.
* zic.c (addtype): Remove now-unnecessary checks that a bool is a
boolean.
2014-08-25 08:19:48 -07:00
a577b388f3 Distinguish hyphen from minus from dashes.
Most of this patch is to commentary, to distinguish better among
the similar characters hyphen '-', minus sign '−', en dash '–' (used
for ranges), and em dash '—'.  Render ordinary dashes in text as
spaced en dashes, as this gives better-looking results in monospaced
fonts.
* yearistype.sh, zic.c: Reword diagnostics so that they do not use
hyphens as if they were dashes.  Since we are sticking to ASCII in
programs, we can't use proper dashes in diagnostics.
2014-06-17 18:46:31 -07:00
a3129e54ee * tzfile.h (TZ_MAX_TIMES), NEWS: Increase from 1200 to 2000.
This lets localtime handle Troll station.  Hack suggested by Zefram.
2014-03-20 18:41:02 -07:00
1b2656774f build: remove NOSOLAR option
The current tzdata now goes to 17, which is uncomfortably close to
the NOSOLAR limit of 20.
* Makefile (CFLAGS): Remove NOSOLAR comment.
* tzfile.h (TZ_MAX_TYPES): Ignore NOSOLAR; always default to 256.
* NEWS: Document this.
2013-11-13 00:49:41 -08:00
a46793a95b Revert the change that added meta-information to version-3 format.
Further testing found that it was incompatible with Ubuntu 12.04 glibc
so this feature requires redesign and more testing.
* Makefile (ZFLAGS): Remove comment about name and version info.
Make it an empty var instead.
* tzfile.5, tzfile.h: Remove description of meta-information.
* zic.8: Remove options -n and -o.
* zic.c: Don't include <stddef.h>.
(genoption, genoptions, genname, addgenoption, writevalue): Remove.
(usage, main, writezone): Remove support for -n and -o.
2013-09-11 02:42:07 -07:00
8dada0cec8 * tzfile.h: Fix tzfile.h comment.
Spelling problem reported by Nathan Stratton Treadway in
<http://mm.icann.org/pipermail/tz/2013-September/020121.html>.
2013-09-10 13:15:22 -07:00
27c15f3625 Bump tzfile format to version 3.
Also, improve the documentation and diagnostics in this area.
Suggested by Arthur David Olson in
<http://mm.icann.org/pipermail/tz/2013-September/020064.html>.
* tzfile.5, tzfile.h: Bump tzfile format to version 3.
* zic.8: Document -v better.
* zic.c (ZIC_VERSION): Bump from '2' to '3'.
(stringrule, stringzone, outzone): Report compatibility issues
more carefully, mentioning client dates.
2013-09-08 23:04:07 -07:00
42801d2b1f Correct some UTC-vs-UT solecisms.
In several places the code and documentation incorrectly used
"UTC" to describe time stamps that might precede the introduction
of UTC and for which UTC is therefore undefined.  Change these
uses to "UT", as that's the correct term when talking about these
time stamps.  Problem reported by Steve Allen in
<http://mm.icann.org/pipermail/tz/2013-September/019907.html>.
The major compatibility issue here is with 'zdump -v'; it'll now
output "UT" instead of the possibly-incorrect "UTC".
Many files change in minor ways in the commentary.
* zdump.c (show):
* zic.c (inzsub, addtype):
In output, say "UT" rather than "UTC", since the time stamp we're
talking about might precede the introduction of UTC.
2013-09-04 19:07:31 -07:00
f0133dd86a Port to NetBSD, where, e.g., 'time_t' is wider than 'long'.
I audited the code and fixed as many width-asssumptions as I could
find, including several places where the code assumed that 'time_t'
was no wider than 'long'; this assumption is not true on 32-bit
NetBSD platforms.  This caught every problem that is already fixed
in the NetBSD zic.c, and caught quite a few more.
* Makefile: Add comments re HAVE_DOS_FILE_NAMES and HAVE_INTTYPES_H.
* date.c (checkfinal, netsettime): Don't use 'long' where 'int' will do.
* difftime.c (difftime): Mark with ATTRIBUTE_CONST.
Use uintmax_t, not unsigned long, for the widest unsigned integer type.
Use long double, not double, if time_t is wider than uintmax_t;
this can in theory help on nonstandard platforms, such as GCC
with 64-bit uintmax_t and 128-bit __int128_t.
* localtime.c (struct ttinfo.tt_gmtoff, struct rule.r_time)
(detzcode, getsecs, getoffset, gmtsub, localsub, increment_overflow32)
(normalize_overflow32, time1, time2, timesub, transtime, tzparse)
(time2sub, timeoff, gtime):
* tzfile.h (SECSPERDAY):
* zdump.c (SECSPERDAY):
* zic.c (convert, puttzcode):
Use int_fast32_t, not long, when all we care is that values up to
2**31 can be stored.  This doesn't fix any bugs, but it allows
more opportunity for compiler optimization.
(struct lsinfo.ls_corr, timesub, leapcorr):
Use int_fast64_t, not long, when values up to 2**63 can be stored.
(timesub): Make it clearer when we are truncating 0.5 to 0.
(increment_overflow32): Rename from long_increment_overflow.
All uses changed.
(normalize_overflow32): Rename from long_normalize_overflow.
All uses changed.
* private.h (HAVE_INTTYPES_H, ATTRIBUTE_CONST): New macros.
Include <inttypes.h> if HAVE_INTTYPES_H.
(INT_FAST64_MIN, INT_FAST64_MAX, SCNdFAST64, int_fast32_t, PRIdMAX)
(uintmax_t, PRIuMAX, _Noreturn):
Define to reasonable values if it's an older compiler.
* scheck.c (scheck): Add support for arbitrary formats, such as
those that SCNdFAST64 can expand to, at the price of no longer
supporting weird conversion specs like "%[%]".
* strftime.c (_fmt): Use intmax_t and uintmax_t to format time_t,
not long and unsigned long.
* zdump.c (int_fast32_t, intmax_t, PRIdMAX, SCNdMAX):
Define for pre-C99 compilers, like private.h does.
(delta, yeartot, main): Use intmax_t, not long.
(hunt): Use time_t, not long, since the diff must be nonnegative.
(tformat): Allow for time_t wider than long.
* zic.c (ZIC_MIN, ZIC_MAX, SCNdZIC): New macros.
(OFFSET_STRLEN_MAXIMUM, RULE_STRLEN_MAXIMUM): Remove.
(struct rule): Make r_loyear, r_hiyear, r_tod, r_stdoff, z_gmtoff,
z_stdoff zic_t, not long.
(addtype, gethms, oadd, rpytime, tadd, gmtoffs, corr, inleap)
(stringoffset, stringrule, outzone, addtype, adjleap, rpytime)
(LDAYSPERWEEK):
Use zic_t, not long.
(leapminyear, leapmaxyear, min_year, max_year, rulesub, updateminmax)
(outzone, rpytime):
Use zic_t, not int.
(usage): Now _Noreturn.
(main): Use S_IWGRP, not 'unix', to determine whether to call umask.
(writezone): Omit unnecessary cast.
(mkdirs): Use HAVE_DOS_FILE_NAMES, not 'unix', to determine
whether to parse DOS file anmes.
(eitol): Remove; no longer needed.
2013-05-27 21:26:18 -07:00
dccd5a16af Switch from SCCS to git.
Remove the SCCS keyword '%W%' from all files.
Mostly this just remove comments.
Remove trailing white space, too.
* Makefile (TZCODE_VERSION): New macro.
(version.h): New rule.
(tzselect): Interpolate TZCODE_VERSION.
(clean): Remove version.h.
(zdump.o, zic.o): Depend on version.h.
* asctime.c, date.c, difftime.c, ialloc.c, localtime.c, scheck.c:
* strftime.c, zdump.c, zic.c: Remove elsieid.
* private.h: Remove privatehid.
* tzfile.h: Remove tzfilehid.
* tzselect.h (TZCODE_VERSION): Rename from VERSION.
* zdump.c, zic.c: Include "version.h",
and use TZCODE_VERSION instead of elsieid.
2012-07-18 17:30:38 -07:00
1ab18b876f 64-bit version
SCCS-file: tzfile.h
SCCS-SID: 8.1
2012-07-18 03:02:55 -04:00
b412fa7bf4 electronic mail addresses purged
SCCS-file: tzfile.h
SCCS-SID: 7.18
2012-07-18 03:02:51 -04:00
dc5e39f48e delinted
SCCS-file: tzfile.h
SCCS-SID: 7.17
2012-07-18 03:02:47 -04:00
e86c95c46e SCCS-file: tzfile.h
SCCS-SID: 7.16
2012-07-18 03:02:44 -04:00
c3308686ca SCCS-file: tzfile.h
SCCS-SID: 7.15
2012-07-18 03:02:44 -04:00
792cd8b42b Eggert mods
SCCS-file: tzfile.h
SCCS-SID: 7.14
2012-07-18 03:02:29 -04:00
6c2324c5d3 back out time stamp stuff
SCCS-file: tzfile.h
SCCS-SID: 7.13
2012-07-18 03:02:28 -04:00
ffbc3cbef4 magic number
SCCS-file: tzfile.h
SCCS-SID: 7.12
2012-07-18 03:02:28 -04:00
11d664d148 add seconds to time stamp
SCCS-file: tzfile.h
SCCS-SID: 7.11
2012-07-18 03:02:28 -04:00
1cd5da7399 SCCS-file: tzfile.h
SCCS-SID: 7.10
2012-07-18 03:02:28 -04:00
b94c3ab0aa convert dates
SCCS-file: tzfile.h
SCCS-SID: 7.9
2012-07-18 03:02:24 -04:00
7e538b4a13 disclaimers
SCCS-file: tzfile.h
SCCS-SID: 7.8
2012-07-18 03:02:23 -04:00
2143f48eda Eggert tuneups
SCCS-file: tzfile.h
SCCS-SID: 7.7
2012-07-18 03:02:22 -04:00
057d405cf2 Riga work
SCCS-file: tzfile.h
SCCS-SID: 7.6
2012-07-18 03:02:18 -04:00
74441355d6 work on allowing European rules as templates
SCCS-file: tzfile.h
SCCS-SID: 7.5
2012-07-18 03:02:17 -04:00
a9ad5fef18 fluff
SCCS-file: tzfile.h
SCCS-SID: 7.4
2012-07-18 03:02:12 -04:00
d66151601c avoid tabs after preprocessor keywords
SCCS-file: tzfile.h
SCCS-SID: 7.3
2012-07-18 03:02:11 -04:00
a37b9f16f9 delinted
SCCS-file: tzfile.h
SCCS-SID: 7.2
2012-07-18 03:02:09 -04:00
be26c554ae disclaimer added
SCCS-file: tzfile.h
SCCS-SID: 4.8
2012-07-18 03:01:57 -04:00
72feaac7c2 etc -> usr/local/etc
SCCS-file: tzfile.h
SCCS-SID: 4.7
2012-07-18 03:01:57 -04:00
eb5c0f2c6a SECS_PER_MIN reinstalled
SCCS-file: tzfile.h
SCCS-SID: 4.6
2012-07-18 03:01:57 -04:00
d0237b1c3c Harris changes
SCCS-file: tzfile.h
SCCS-SID: 4.5
2012-07-18 03:01:53 -04:00
bdaf1150a7 posix work
SCCS-file: tzfile.h
SCCS-SID: 4.4
2012-07-18 03:01:51 -04:00
b9eeb280c5 TZDEFRULES
SCCS-file: tzfile.h
SCCS-SID: 4.3
2012-07-18 03:01:51 -04:00
98eb994a9b eliminate duplicate TM_SUNDAY
SCCS-file: tzfile.h
SCCS-SID: 4.2
2012-07-18 03:01:50 -04:00
487fe82be9 delinted
SCCS-file: tzfile.h
SCCS-SID: 3.7
2012-07-18 03:01:48 -04:00
d4487f9050 more standard work
SCCS-file: tzfile.h
SCCS-SID: 3.6
2012-07-18 03:01:47 -04:00
c33c8bd57b standardization
SCCS-file: tzfile.h
SCCS-SID: 3.5
2012-07-18 03:01:47 -04:00
90d3fbbed5 more STDC work
SCCS-file: tzfile.h
SCCS-SID: 3.4
2012-07-18 03:01:47 -04:00
fb61c9f2b5 comment fix
SCCS-file: tzfile.h
SCCS-SID: 3.3
2012-07-18 03:01:46 -04:00
c398828171 bww updates
SCCS-file: tzfile.h
SCCS-SID: 3.2
2012-07-18 03:01:45 -04:00
037dc99170 last minute stuff
SCCS-file: tzfile.h
SCCS-SID: 3.1
2012-07-18 03:01:44 -04:00
65650b7c43 fixes from guy
SCCS-file: tzfile.h
SCCS-SID: 2.13
2012-07-18 03:01:43 -04:00
33968c05a0 more defines
SCCS-file: tzfile.h
SCCS-SID: 2.12
2012-07-18 03:01:43 -04:00
6a1ebfe90e boost TZ_MAX_TIMES
SCCS-file: tzfile.h
SCCS-SID: 2.10
2012-07-18 03:01:42 -04:00
23e789eabb SAUDI->NOSOLAR
SCCS-file: tzfile.h
SCCS-SID: 2.9
2012-07-18 03:01:42 -04:00
00935e4e76 SAUDI fix
SCCS-file: tzfile.h
SCCS-SID: 2.8
2012-07-18 03:01:42 -04:00
8d5c5df303 mktime splitoff; long -> time_t
SCCS-file: tzfile.h
SCCS-SID: 2.7
2012-07-18 03:01:42 -04:00
d078d04cc7 tzfile.h work
SCCS-file: tzfile.h
SCCS-SID: 2.6
2012-07-18 03:01:41 -04:00
2b060e5f76 miscellaneous "improvements"
SCCS-file: tzfile.h
SCCS-SID: 2.5
2012-07-18 03:01:41 -04:00