mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-21 11:41:53 +00:00
* 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>.
33 lines
621 B
C
33 lines
621 B
C
/*
|
|
** This file is in the public domain, so clarified as of
|
|
** 2006-07-17 by Arthur David Olson.
|
|
*/
|
|
|
|
/*LINTLIBRARY*/
|
|
|
|
#include "private.h"
|
|
|
|
char *
|
|
icatalloc(char *const old, const char *const new)
|
|
{
|
|
register char * result;
|
|
register int oldsize, newsize;
|
|
|
|
newsize = (new == NULL) ? 0 : strlen(new);
|
|
if (old == NULL)
|
|
oldsize = 0;
|
|
else if (newsize == 0)
|
|
return old;
|
|
else oldsize = strlen(old);
|
|
if ((result = realloc(old, oldsize + newsize + 1)) != NULL)
|
|
if (new != NULL)
|
|
(void) strcpy(result + oldsize, new);
|
|
return result;
|
|
}
|
|
|
|
char *
|
|
icpyalloc(const char *const string)
|
|
{
|
|
return icatalloc(NULL, string);
|
|
}
|