Paul Eggert
5bfa967c17
Avoid (void) before calls.
...
Although the cast to void in usage like '(void) printf ("Hello")'
may have been helpful decades ago when Lint Was Your Friend,
nowadays such casts are not helpful. The tz code is currently not
consistent about this: sometimes the casts are present, and
sometimes absent. As they make the code harder to read, let's
remove them.
* asctime.c, date.c, ialloc.c, localtime.c, strftime.c, zdump.c, zic.c:
Don't cast calls to 'void'.
2014-08-25 08:19:47 -07:00
Paul Eggert
2151ca6b20
Restore 'register'.
...
* asctime.c (asctime_r, asctime):
* date.c (main, dogmt, reset, nondigit, sametm, convert, checkfinal):
* ialloc.c (icatalloc):
* localtime.c (detzcode, detzcode64, settzname, tzload)
(typesequiv, getzname, getqzname, getnum, getsecs, getoffset)
(getrule, transtime, tzparse, tzset, localsub, gmtsub)
(leaps_thru_end_of, timesub, increment_overflow)
(long_increment_overflow, normalize_overflow)
(long_normalize_overflow, tmcomp, time2sub, time1, leapcorr):
* scheck.c (scheck):
* strftime.c (_yconv):
* zdump.c (my_localtime, abbrok, main, yeartot, hunt)
(delta, show, abbr, dumptime):
* zic.c (main, dolink, itsdir, associate, infile, inrule)
(inzone, inzcont, inzsub, inleap, inlink, rulesub, convert64)
(writezone, doabbr, stringoffset, stringrule, stringzone)
(outzone, addtype, leapadd, adjleap, ciequal, itsabbr, byword)
(getfields, rpytime, newabbr, mkdirs):
Restore the uses of 'register', reverting that part of the
"More C modernization" patch. See Arthur David Olson in
<http://mm.icann.org/pipermail/tz/2012-October/018385.html >.
2012-10-26 17:37:42 -07:00
Paul Eggert
c350bfd55f
More C modernization.
...
* Makefile (typecheck): Add -D__time_t_defined to CFLAGS,
for glibc 2.15.
* asctime.c (asctime_r, asctime):
* date.c (main, dogmt, reset, nondigit, sametm, convert, checkfinal):
* ialloc.c (icatalloc):
* localtime.c (detzcode, detzcode64, settzname, tzload)
(typesequiv, getzname, getqzname, getnum, getsecs, getoffset)
(getrule, transtime, tzparse, tzset, localsub, gmtsub)
(leaps_thru_end_of, timesub, increment_overflow)
(long_increment_overflow, normalize_overflow)
(long_normalize_overflow, tmcomp, time2sub, time1, leapcorr):
* scheck.c (scheck):
* strftime.c (_yconv):
* zdump.c (my_localtime, abbrok, main, yeartot, hunt)
(delta, show, abbr, dumptime):
* zic.c (main, dolink, itsdir, associate, infile, inrule)
(inzone, inzcont, inzsub, inleap, inlink, rulesub, convert64)
(writezone, doabbr, stringoffset, stringrule, stringzone)
(outzone, addtype, leapadd, adjleap, ciequal, itsabbr, byword)
(getfields, rpytime, newabbr, mkdirs):
Omit 'register', as it adds no value these days. See Christos Zoulas in
<http://mm.icann.org/pipermail/tz/2012-October/018376.html >.
* date.c (netsettime) [TSP_SETDATE]: Add forward decl.
Don't rely on implicit int. Now static. Use NULL, not 0.
* zdump.c: Include "limits.h".
(absolute_min_time, absolute_max_time): Compute at compile-time,
as the run-time tests relied on undefined behavior.
(checkabsolutes): Rename from setabsolutes. Just check, since
there's nothing to set now. All uses changed.
2012-10-26 00:48:01 -07:00
Paul Eggert
400ecf36bb
Assume C89.
...
* Makefile (GCC_DEBUG_FLAGS): Modernize for GCC 4.6.3 x86.
* asctime.c (asctime_r, asctime):
* date.c (main, dogmt, reset, wildinput, nondigit, oops, display)
(timeout, sametm, netsettime):
* difftime.c (difftime):
* ialloc.c (icatalloc, icpyalloc):
* localtime.c (detzcode, detzcode64, differ_by_repeat)
(tzload, typesequiv, getzname, getnum, getsecs, getoffset)
(getrule, transtime, tzparse, gmtload, tzsetwall, tzset)
(localsub, localtime, localtime_r, gmtsub, gmtime, gmtime_r)
(offtime, leaps_thru_end_of, timesub, ctime, ctime_r)
(increment_overflow, long_increment_overflow)
(normalize_overflow, long_normalize_overflow, tmcomp, time2sub)
(time2, time1, mktime, timelocal, timegm, timeoff, gtime)
(leapcorr, time2posix, posix2time):
* scheck.c (scheck):
* strftime.c (strftime, _fmt, _conv, _add, _yconv, _loc):
* zdump.c (my_localtime, abbrok, usage, main, yeartot)
(delta, abbr, dumptime):
* zic.c (memcheck, eats, eat, error, warning, main)
(dolink, itsdir, rcomp, associate, infile, gethms, inrule)
(inzone, inzcont, inzsub, inleap, inlink, rulesub, convert)
(convert64, puttzcode, puttzcode64, atcomp, is32, writezone, DO)
(doabbr, updateminmax, stringoffset, stringrule, stringzone)
(outzone, addtt, addtype, leapadd, yearistype, lowerit, ciequal)
(itsabbr, byword, getfields, oadd, tadd, rpytime, newabbr)
(mkdirs, eitol):
Assume C89 or better. Mostly this consists of using function
prototypes. In a few places, prototypes are required for
portability to hosts where time_t does not promote to itself and
where a preceding prototype does not override a definition. But
while we're at it we might as well be consistent: it's safe to
assume at-least-C89 these days.
* ialloc.c (nonzero, imalloc, icalloc, irealloc, ifree, icfree):
Remove; no longer needed now that we assume C89 or better.
All callers changed to use malloc, calloc, realloc, free.
* localtime.c (getzname, getqzname, leaps_thru_end_of, transtime):
* zdump.c (delta, yeartot):
* zic.c (eitol):
Now pure.
* private.h, zdump.c (ATTRIBUTE_PURE): New macro.
* private.h (icalloc, imalloc, irealloc, icfree, ifree): Remove decls.
* zic.c: Remove no-longer-necessary forward decls.
(max_time, min_time): Now const.
(setboundaries): Remove.
2012-10-12 07:53:12 -07:00
Paul Eggert
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
Arthur David Olson
f5aba3674d
public domain notice
...
SCCS-file: ialloc.c
SCCS-SID: 8.30
2012-07-18 03:02:58 -04:00
Arthur David Olson
86a00be0be
Eggert mods
...
SCCS-file: ialloc.c
SCCS-SID: 8.29
2012-07-18 03:02:26 -04:00
Arthur David Olson
d3d4e49354
MAL gunk goes
...
SCCS-file: ialloc.c
SCCS-SID: 8.28
2012-07-18 03:02:17 -04:00
Arthur David Olson
cd1bc5f8ef
simplified
...
SCCS-file: ialloc.c
SCCS-SID: 8.27
2012-07-18 03:02:17 -04:00
Arthur David Olson
abf968df97
generic_T goes
...
SCCS-file: ialloc.c
SCCS-SID: 8.26
2012-07-18 03:02:17 -04:00
Arthur David Olson
3705dcb3b5
genericptr_T -> generic_T *
...
SCCS-file: ialloc.c
SCCS-SID: 8.25
2012-07-18 03:02:15 -04:00
Arthur David Olson
40b576bbc5
_t -> _T; P() redefined
...
SCCS-file: ialloc.c
SCCS-SID: 8.24
2012-07-18 03:02:14 -04:00
Arthur David Olson
b81cddecdc
more delinting
...
SCCS-file: ialloc.c
SCCS-SID: 8.23
2012-07-18 03:02:14 -04:00
Arthur David Olson
5e6f0851dd
fluff
...
SCCS-file: ialloc.c
SCCS-SID: 8.21
2012-07-18 03:02:11 -04:00
Arthur David Olson
fc06745b34
delinted
...
SCCS-file: ialloc.c
SCCS-SID: 8.20
2012-07-18 03:02:09 -04:00
Arthur David Olson
3999720a97
POSIX work
...
SCCS-file: ialloc.c
SCCS-SID: 6.6.1.1
2012-07-18 03:02:03 -04:00
Arthur David Olson
099595ddca
headers redone; delinted
...
SCCS-file: ialloc.c
SCCS-SID: 8.19
2012-07-18 03:01:57 -04:00
Arthur David Olson
709020d7e9
const work
...
SCCS-file: ialloc.c
SCCS-SID: 8.18
2012-07-18 03:01:52 -04:00
Arthur David Olson
f8ad188401
standardized and delinted
...
SCCS-file: ialloc.c
SCCS-SID: 8.17
2012-07-18 03:01:48 -04:00
Arthur David Olson
f68e3deb93
turbification
...
SCCS-file: ialloc.c
SCCS-SID: 8.16
2012-07-18 03:01:47 -04:00
Arthur David Olson
3ac1286f18
stdio.h added
...
SCCS-file: ialloc.c
SCCS-SID: 8.15
2012-07-18 03:01:47 -04:00
Arthur David Olson
d31155cab3
nonstd.h
...
SCCS-file: ialloc.c
SCCS-SID: 8.14
2012-07-18 03:01:47 -04:00
Arthur David Olson
0da076a44f
standardization
...
SCCS-file: ialloc.c
SCCS-SID: 8.13
2012-07-18 03:01:47 -04:00
Arthur David Olson
b7ffc0f6de
prototypes
...
SCCS-file: ialloc.c
SCCS-SID: 8.12
2012-07-18 03:01:47 -04:00
Arthur David Olson
ec28f03698
minix work
...
SCCS-file: ialloc.c
SCCS-SID: 8.11
2012-07-18 03:01:47 -04:00
Arthur David Olson
06b3a12766
delinted
...
SCCS-file: ialloc.c
SCCS-SID: 8.10
2012-07-18 03:01:47 -04:00
Arthur David Olson
6f7ad84900
updates for TZ distribution
...
SCCS-file: ialloc.c
SCCS-SID: 8.9
2012-07-18 03:01:47 -04:00
Arthur David Olson
26958ab815
more turbo/BSD work
...
SCCS-file: ialloc.c
SCCS-SID: 8.8
2012-07-18 03:01:46 -04:00
Arthur David Olson
a7b3767a5d
more STDC work
...
SCCS-file: ialloc.c
SCCS-SID: 8.7
2012-07-18 03:01:46 -04:00
Arthur David Olson
0682af4106
STDC work
...
SCCS-file: ialloc.c
SCCS-SID: 8.6
2012-07-18 03:01:46 -04:00
Arthur David Olson
cf3e1f81f6
relaxed TURBOC bug fix
...
SCCS-file: ialloc.c
SCCS-SID: 8.5
2012-07-18 03:01:46 -04:00
Arthur David Olson
f2dc9a94e4
optimization?
...
SCCS-file: ialloc.c
SCCS-SID: 8.4
2012-07-18 03:01:46 -04:00
Arthur David Olson
521cac8fe4
for measures release
...
SCCS-file: ialloc.c
SCCS-SID: 8.3
2012-07-18 03:01:45 -04:00
Arthur David Olson
861255a339
TURBOC bug food
...
SCCS-file: ialloc.c
SCCS-SID: 8.2
2012-07-18 03:01:45 -04:00
Arthur David Olson
3474d90f4d
icfree and ecfree added
...
SCCS-file: ialloc.c
SCCS-SID: 7.14
2012-07-18 03:01:44 -04:00
Arthur David Olson
f55523eb9f
slight optimization
...
SCCS-file: ialloc.c
SCCS-SID: 7.13
2012-07-18 03:01:42 -04:00
Arthur David Olson
7ac59478f3
better zero handling in icalloc
...
SCCS-file: ialloc.c
SCCS-SID: 7.12
2012-07-18 03:01:41 -04:00
Arthur David Olson
51b164fa66
#else/#endif work
...
SCCS-file: ialloc.c
SCCS-SID: 7.11
2012-07-18 03:01:41 -04:00
Arthur David Olson
02bd5bbfcb
split alloc.c into ialloc.c and ealloc.c
...
SCCS-file: ialloc.c
SCCS-SID: 7.10
2012-07-18 03:01:41 -04:00
Arthur David Olson
70fb73ef11
OBJECTID -> !NOID
...
SCCS-file: ialloc.c
SCCS-SID: 7.9
2012-07-18 03:01:41 -04:00
Arthur David Olson
e81ba7fc9c
boost sizes of zero to one to foil proposed ANSI idiocy
...
SCCS-file: ialloc.c
SCCS-SID: 7.8
2012-07-18 03:01:38 -04:00
Arthur David Olson
0630a01131
simplified
...
SCCS-file: ialloc.c
SCCS-SID: 7.7
2012-07-18 03:01:37 -04:00
Arthur David Olson
9acedfd9f9
yet more variants
...
SCCS-file: ialloc.c
SCCS-SID: 7.6
2012-07-18 03:01:37 -04:00
Arthur David Olson
d58f3fe141
arg4alloc->alloc_t; slight reformatting
...
SCCS-file: ialloc.c
SCCS-SID: 7.5
2012-07-18 03:01:34 -04:00
Arthur David Olson
77c0fda34b
optimized
...
SCCS-file: ialloc.c
SCCS-SID: 7.4
2012-07-18 03:01:34 -04:00
Arthur David Olson
ab0aef2ecc
added functions
...
SCCS-file: ialloc.c
SCCS-SID: 7.3
2012-07-18 03:01:34 -04:00
Arthur David Olson
01b8495b97
consistency
...
SCCS-file: ialloc.c
SCCS-SID: 7.2
2012-07-18 03:01:34 -04:00
Arthur David Olson
b8787c694b
none
...
SCCS-file: ialloc.c
SCCS-SID: 6.6
2012-07-18 03:01:34 -04:00
Arthur David Olson
d0431bb3dd
alloc.h; #include; #else; typedef
...
SCCS-file: ialloc.c
SCCS-SID: 6.5
2012-07-18 03:01:34 -04:00
Arthur David Olson
78d0cd039a
register int and static int and some reformatting
...
SCCS-file: ialloc.c
SCCS-SID: 6.4
2012-07-18 03:01:34 -04:00