[Midnightbsd-cvs] src [11087] trunk/contrib/tzcode: update

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Jun 19 10:35:29 EDT 2018


Revision: 11087
          http://svnweb.midnightbsd.org/src/?rev=11087
Author:   laffer1
Date:     2018-06-19 10:35:28 -0400 (Tue, 19 Jun 2018)
Log Message:
-----------
update

Modified Paths:
--------------
    trunk/contrib/tzcode/stdtime/asctime.c
    trunk/contrib/tzcode/stdtime/ctime.3
    trunk/contrib/tzcode/stdtime/difftime.c
    trunk/contrib/tzcode/stdtime/localtime.c
    trunk/contrib/tzcode/stdtime/private.h
    trunk/contrib/tzcode/stdtime/time2posix.3
    trunk/contrib/tzcode/stdtime/tzfile.5
    trunk/contrib/tzcode/stdtime/tzfile.h
    trunk/contrib/tzcode/zic/README
    trunk/contrib/tzcode/zic/Theory
    trunk/contrib/tzcode/zic/ialloc.c
    trunk/contrib/tzcode/zic/private.h
    trunk/contrib/tzcode/zic/scheck.c
    trunk/contrib/tzcode/zic/zdump/Makefile
    trunk/contrib/tzcode/zic/zdump.8
    trunk/contrib/tzcode/zic/zdump.c
    trunk/contrib/tzcode/zic/zic/Makefile
    trunk/contrib/tzcode/zic/zic.8
    trunk/contrib/tzcode/zic/zic.c

Modified: trunk/contrib/tzcode/stdtime/asctime.c
===================================================================
--- trunk/contrib/tzcode/stdtime/asctime.c	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/asctime.c	2018-06-19 14:35:28 UTC (rev 11087)
@@ -15,7 +15,7 @@
 static char	elsieid[] __unused = "@(#)asctime.c	8.5";
 #endif /* !defined NOID */
 #endif /* !defined lint */
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/contrib/tzcode/stdtime/asctime.c 214411 2010-10-27 07:14:46Z edwin $");
 
 /*LINTLIBRARY*/
 

Modified: trunk/contrib/tzcode/stdtime/ctime.3
===================================================================
--- trunk/contrib/tzcode/stdtime/ctime.3	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/ctime.3	2018-06-19 14:35:28 UTC (rev 11087)
@@ -28,7 +28,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     From: @(#)ctime.3	8.1 (Berkeley) 6/4/93
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/contrib/tzcode/stdtime/ctime.3 266557 2014-05-22 20:55:57Z gavin $
 .\"
 .Dd January 2, 1999
 .Dt CTIME 3

Modified: trunk/contrib/tzcode/stdtime/difftime.c
===================================================================
--- trunk/contrib/tzcode/stdtime/difftime.c	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/difftime.c	2018-06-19 14:35:28 UTC (rev 11087)
@@ -9,7 +9,7 @@
 static char	elsieid[] __unused = "@(#)difftime.c	8.1";
 #endif /* !defined NOID */
 #endif /* !defined lint */
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/contrib/tzcode/stdtime/difftime.c 192625 2009-05-23 06:31:50Z edwin $");
 
 /*LINTLIBRARY*/
 
@@ -18,7 +18,9 @@
 #include "un-namespace.h"
 
 double
-difftime(const time_t time1, const time_t time0)
+difftime(time1, time0)
+const time_t	time1;
+const time_t	time0;
 {
 	/*
 	** If (sizeof (double) > sizeof (time_t)) simply convert and subtract

Modified: trunk/contrib/tzcode/stdtime/localtime.c
===================================================================
--- trunk/contrib/tzcode/stdtime/localtime.c	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/localtime.c	2018-06-19 14:35:28 UTC (rev 11087)
@@ -9,7 +9,7 @@
 static char	elsieid[] __unused = "@(#)localtime.c	8.14";
 #endif /* !defined NOID */
 #endif /* !defined lint */
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/contrib/tzcode/stdtime/localtime.c 314446 2017-03-01 01:44:40Z emaste $");
 
 /*
 ** Leap second handling from Bradley White.
@@ -173,9 +173,8 @@
 static long		detzcode(const char * codep);
 static time_t		detzcode64(const char * codep);
 static int		differ_by_repeat(time_t t1, time_t t0);
-static const char *	getzname(const char * strp) ATTRIBUTE_PURE;
-static const char *	getqzname(const char * strp, const int delim)
-  ATTRIBUTE_PURE;
+static const char *	getzname(const char * strp);
+static const char *	getqzname(const char * strp, const int delim);
 static const char *	getnum(const char * strp, int * nump, int min,
 				int max);
 static const char *	getsecs(const char * strp, long * secsp);
@@ -187,7 +186,7 @@
 static struct tm *	localsub(const time_t * timep, long offset,
 				struct tm * tmp);
 static int		increment_overflow(int * number, int delta);
-static int		leaps_thru_end_of(int y) ATTRIBUTE_PURE;
+static int		leaps_thru_end_of(int y);
 static int		long_increment_overflow(long * number, int delta);
 static int		long_normalize_overflow(long * tensptr,
 				int * unitsptr, int base);
@@ -211,8 +210,7 @@
 static int		tmcomp(const struct tm * atmp,
 				const struct tm * btmp);
 static time_t		transtime(time_t janfirst, int year,
-				  const struct rule * rulep, long offset)
-  ATTRIBUTE_PURE;
+				const struct rule * rulep, long offset);
 static int		typesequiv(const struct state * sp, int a, int b);
 static int		tzload(const char * name, struct state * sp,
 				int doextend);
@@ -271,7 +269,8 @@
 #endif /* defined ALTZONE */
 
 static long
-detzcode(const char *const codep)
+detzcode(codep)
+const char * const	codep;
 {
 	long	result;
 	int	i;
@@ -283,7 +282,8 @@
 }
 
 static time_t
-detzcode64(const char *const codep)
+detzcode64(codep)
+const char * const	codep;
 {
 	register time_t	result;
 	register int	i;
@@ -355,7 +355,9 @@
 }
 
 static int
-differ_by_repeat(const time_t t1, const time_t t0)
+differ_by_repeat(t1, t0)
+const time_t	t1;
+const time_t	t0;
 {
 	int_fast64_t _t0 = t0;
 	int_fast64_t _t1 = t1;
@@ -1215,7 +1217,8 @@
 }
 
 static void
-gmtload(struct state *const sp)
+gmtload(sp)
+struct state * const	sp;
 {
 	if (tzload(gmt, sp, TRUE) != 0)
 		(void) tzparse(gmt, sp, TRUE);
@@ -1238,7 +1241,7 @@
 
 #ifdef ALL_STATE
 	if (lclptr == NULL) {
-		lclptr = calloc(1, sizeof *lclptr);
+		lclptr = (struct state *) calloc(1, sizeof *lclptr);
 		if (lclptr == NULL) {
 			settzname();	/* all we can do */
 			_RWLOCK_UNLOCK(&lcl_rwlock);
@@ -1338,7 +1341,10 @@
 
 /*ARGSUSED*/
 static struct tm *
-localsub(const time_t *const timep, const long offset, struct tm *const tmp)
+localsub(timep, offset, tmp)
+const time_t * const	timep;
+const long		offset;
+struct tm * const	tmp;
 {
 	struct state *		sp;
 	const struct ttinfo *	ttisp;
@@ -1434,7 +1440,8 @@
 }
 
 struct tm *
-localtime(const time_t *const timep)
+localtime(timep)
+const time_t * const	timep;
 {
 	struct tm *p_tm;
 
@@ -1453,14 +1460,13 @@
 		}
 		_RWLOCK_RDLOCK(&lcl_rwlock);
 		tzset_basic(1);
-		localsub(timep, 0L, p_tm);
+		p_tm = localsub(timep, 0L, p_tm);
 		_RWLOCK_UNLOCK(&lcl_rwlock);
-		return(p_tm);
 	} else {
 		tzset_basic(0);
-		localsub(timep, 0L, &tm);
-		return(&tm);
+		p_tm = localsub(timep, 0L, &tm);
 	}
+	return(p_tm);
 }
 
 /*
@@ -1468,11 +1474,13 @@
 */
 
 struct tm *
-localtime_r(const time_t *const timep, struct tm *tmp)
+localtime_r(timep, tmp)
+const time_t * const	timep;
+struct tm *		tmp;
 {
 	_RWLOCK_RDLOCK(&lcl_rwlock);
 	tzset_basic(1);
-	localsub(timep, 0L, tmp);
+	tmp = localsub(timep, 0L, tmp);
 	_RWLOCK_UNLOCK(&lcl_rwlock);
 	return tmp;
 }
@@ -1532,7 +1540,8 @@
 }
 
 struct tm *
-gmtime(const time_t *const timep)
+gmtime(timep)
+const time_t * const	timep;
 {
 	struct tm *p_tm;
 
@@ -1567,7 +1576,9 @@
 */
 
 struct tm *
-gmtime_r(const time_t *const timep, struct tm *tmp)
+gmtime_r(timep, tmp)
+const time_t * const	timep;
+struct tm *		tmp;
 {
 	return gmtsub(timep, 0L, tmp);
 }
@@ -1575,7 +1586,9 @@
 #ifdef STD_INSPIRED
 
 struct tm *
-offtime(const time_t *const timep, const long offset)
+offtime(timep, offset)
+const time_t * const	timep;
+const long		offset;
 {
 	return gmtsub(timep, offset, &tm);
 }
@@ -1730,7 +1743,8 @@
 }
 
 char *
-ctime(const time_t *const timep)
+ctime(timep)
+const time_t * const	timep;
 {
 /*
 ** Section 4.12.3.2 of X3.159-1989 requires that
@@ -1742,7 +1756,9 @@
 }
 
 char *
-ctime_r(const time_t *const timep, char *buf)
+ctime_r(timep, buf)
+const time_t * const	timep;
+char *			buf;
 {
 	struct tm	mytm;
 
@@ -1791,7 +1807,10 @@
 }
 
 static int
-normalize_overflow(int *const tensptr, int *const unitsptr, const int base)
+normalize_overflow(tensptr, unitsptr, base)
+int * const	tensptr;
+int * const	unitsptr;
+const int	base;
 {
 	int	tensdelta;
 
@@ -1803,7 +1822,10 @@
 }
 
 static int
-long_normalize_overflow(long *const tensptr, int *const unitsptr, const int base)
+long_normalize_overflow(tensptr, unitsptr, base)
+long * const	tensptr;
+int * const	unitsptr;
+const int	base;
 {
 	register int	tensdelta;
 
@@ -1831,11 +1853,12 @@
 }
 
 static time_t
-time2sub(struct tm *const tmp,
-	 struct tm *(*const funcp)(const time_t *, long, struct tm *),
-	 const long offset,
-	 int *const okayp,
-	 const int do_norm_secs)
+time2sub(tmp, funcp, offset, okayp, do_norm_secs)
+struct tm * const	tmp;
+struct tm * (* const	funcp)(const time_t*, long, struct tm*);
+const long		offset;
+int * const		okayp;
+const int		do_norm_secs;
 {
 	const struct state *	sp;
 	int			dir;
@@ -2017,10 +2040,11 @@
 }
 
 static time_t
-time2(struct tm * const	tmp,
-      struct tm * (*const funcp)(const time_t *, long, struct tm *),
-      const long offset,
-      int *const okayp)
+time2(tmp, funcp, offset, okayp)
+struct tm * const	tmp;
+struct tm * (* const	funcp)(const time_t*, long, struct tm*);
+const long		offset;
+int * const		okayp;
 {
 	time_t	t;
 
@@ -2112,7 +2136,8 @@
 }
 
 time_t
-mktime(struct tm *const tmp)
+mktime(tmp)
+struct tm * const	tmp;
 {
 	time_t mktime_return_value;
 	_RWLOCK_RDLOCK(&lcl_rwlock);
@@ -2125,7 +2150,8 @@
 #ifdef STD_INSPIRED
 
 time_t
-timelocal(struct tm *const tmp)
+timelocal(tmp)
+struct tm * const	tmp;
 {
 	if (tmp != NULL)
 		tmp->tm_isdst = -1;	/* in case it wasn't initialized */
@@ -2133,7 +2159,8 @@
 }
 
 time_t
-timegm(struct tm *const tmp)
+timegm(tmp)
+struct tm * const	tmp;
 {
 	if (tmp != NULL)
 		tmp->tm_isdst = 0;
@@ -2141,7 +2168,9 @@
 }
 
 time_t
-timeoff(struct tm *const tmp, const long offset)
+timeoff(tmp, offset)
+struct tm * const	tmp;
+const long		offset;
 {
 	if (tmp != NULL)
 		tmp->tm_isdst = 0;
@@ -2158,7 +2187,8 @@
 */
 
 long
-gtime(struct tm *const tmp)
+gtime(tmp)
+struct tm * const	tmp;
 {
 	const time_t	t = mktime(tmp);
 
@@ -2184,7 +2214,8 @@
 */
 
 static long
-leapcorr(time_t *timep)
+leapcorr(timep)
+time_t *	timep;
 {
 	struct state *		sp;
 	struct lsinfo *	lp;
@@ -2201,7 +2232,8 @@
 }
 
 time_t
-time2posix(time_t t)
+time2posix(t)
+time_t	t;
 {
 	tzset();
 	return t - leapcorr(&t);
@@ -2208,7 +2240,8 @@
 }
 
 time_t
-posix2time(time_t t)
+posix2time(t)
+time_t	t;
 {
 	time_t	x;
 	time_t	y;

Modified: trunk/contrib/tzcode/stdtime/private.h
===================================================================
--- trunk/contrib/tzcode/stdtime/private.h	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/private.h	2018-06-19 14:35:28 UTC (rev 11087)
@@ -6,7 +6,7 @@
 ** This file is in the public domain, so clarified as of
 ** 1996-06-05 by Arthur David Olson.
 **
-** $MidnightBSD$
+** $FreeBSD: stable/10/contrib/tzcode/stdtime/private.h 192625 2009-05-23 06:31:50Z edwin $
 */
 
 /* Stuff moved from Makefile.inc to reduce clutter */
@@ -173,12 +173,6 @@
 #define INT32_MIN (-1 - INT32_MAX)
 #endif /* !defined INT32_MIN */
 
-#if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)
-# define ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define ATTRIBUTE_PURE /* empty */
-#endif
-
 /*
 ** Workarounds for compilers/systems.
 */
@@ -197,8 +191,13 @@
 ** Private function declarations.
 */
 
+char *		icalloc(int nelem, int elsize);
 char *		icatalloc(char * old, const char * new);
 char *		icpyalloc(const char * string);
+char *		imalloc(int n);
+void *		irealloc(void * pointer, int size);
+void		icfree(char * pointer);
+void		ifree(char * pointer);
 const char *	scheck(const char * string, const char * format);
 
 /*

Modified: trunk/contrib/tzcode/stdtime/time2posix.3
===================================================================
--- trunk/contrib/tzcode/stdtime/time2posix.3	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/time2posix.3	2018-06-19 14:35:28 UTC (rev 11087)
@@ -1,4 +1,4 @@
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/contrib/tzcode/stdtime/time2posix.3 192890 2009-05-27 12:18:39Z edwin $
 .\"
 .Dd September 11, 2005
 .Dt TIME2POSIX 3

Modified: trunk/contrib/tzcode/stdtime/tzfile.5
===================================================================
--- trunk/contrib/tzcode/stdtime/tzfile.5	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/tzfile.5	2018-06-19 14:35:28 UTC (rev 11087)
@@ -1,4 +1,4 @@
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/contrib/tzcode/stdtime/tzfile.5 200832 2009-12-22 11:17:10Z edwin $
 .Dd September 13, 1994
 .Dt TZFILE 5
 .Os
@@ -6,7 +6,7 @@
 .Nm tzfile
 .Nd timezone information
 .Sh SYNOPSIS
-.Fd #include \&"/usr/src/contrib/tzcode/stdtime/tzfile.h\&"
+.Fd #include \&"/usr/src/lib/libc/stdtime/tzfile.h\&"
 .Sh DESCRIPTION
 The time zone information files used by
 .Xr tzset 3

Modified: trunk/contrib/tzcode/stdtime/tzfile.h
===================================================================
--- trunk/contrib/tzcode/stdtime/tzfile.h	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/stdtime/tzfile.h	2018-06-19 14:35:28 UTC (rev 11087)
@@ -6,7 +6,7 @@
 ** This file is in the public domain, so clarified as of
 ** 1996-06-05 by Arthur David Olson.
 **
-** $MidnightBSD$
+** $FreeBSD: stable/10/contrib/tzcode/stdtime/tzfile.h 192625 2009-05-23 06:31:50Z edwin $
 */
 
 /*

Modified: trunk/contrib/tzcode/zic/README
===================================================================
--- trunk/contrib/tzcode/zic/README	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/README	2018-06-19 14:35:28 UTC (rev 11087)
@@ -2,7 +2,7 @@
 This file is in the public domain, so clarified as of
 2009-05-17 by Arthur David Olson.
 
-$MidnightBSD$
+$FreeBSD: stable/10/contrib/tzcode/zic/README 192890 2009-05-27 12:18:39Z edwin $
 
 "What time is it?" -- Richard Deacon as The King
 "Any time you want it to be." -- Frank Baxter as The Scientist

Modified: trunk/contrib/tzcode/zic/Theory
===================================================================
--- trunk/contrib/tzcode/zic/Theory	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/Theory	2018-06-19 14:35:28 UTC (rev 11087)
@@ -1,7 +1,7 @@
 @(#)Theory	8.4
 This file is in the public domain, so clarified as of
 2009-05-17 by Arthur David Olson.
-$MidnightBSD$
+$FreeBSD: stable/10/contrib/tzcode/zic/Theory 200832 2009-12-22 11:17:10Z edwin $
 
 ----- Outline -----
 

Modified: trunk/contrib/tzcode/zic/ialloc.c
===================================================================
--- trunk/contrib/tzcode/zic/ialloc.c	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/ialloc.c	2018-06-19 14:35:28 UTC (rev 11087)
@@ -11,7 +11,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/contrib/tzcode/zic/ialloc.c 192625 2009-05-23 06:31:50Z edwin $";
 #endif /* not lint */
 
 /*LINTLIBRARY*/

Modified: trunk/contrib/tzcode/zic/private.h
===================================================================
--- trunk/contrib/tzcode/zic/private.h	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/private.h	2018-06-19 14:35:28 UTC (rev 11087)
@@ -13,7 +13,7 @@
  * I have removed all of the ifdef spaghetti which is not relevant to
  * zic from this file.
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/contrib/tzcode/zic/private.h 207590 2010-05-03 22:32:26Z emaste $
  */
 
 /*

Modified: trunk/contrib/tzcode/zic/scheck.c
===================================================================
--- trunk/contrib/tzcode/zic/scheck.c	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/scheck.c	2018-06-19 14:35:28 UTC (rev 11087)
@@ -11,7 +11,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/contrib/tzcode/zic/scheck.c 192625 2009-05-23 06:31:50Z edwin $";
 #endif /* not lint */
 
 /*LINTLIBRARY*/

Modified: trunk/contrib/tzcode/zic/zdump/Makefile
===================================================================
--- trunk/contrib/tzcode/zic/zdump/Makefile	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/zdump/Makefile	2018-06-19 14:35:28 UTC (rev 11087)
@@ -1,4 +1,4 @@
-# $MidnightBSD$
+# $FreeBSD: stable/10/contrib/tzcode/zic/zdump/Makefile 201390 2010-01-02 11:07:44Z ed $
 
 .PATH: ${.CURDIR}/..
 

Modified: trunk/contrib/tzcode/zic/zdump.8
===================================================================
--- trunk/contrib/tzcode/zic/zdump.8	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/zdump.8	2018-06-19 14:35:28 UTC (rev 11087)
@@ -2,7 +2,7 @@
 .\"	@(#)zdump.8	8.2
 .\" This file is in the public domain, so clarified as of
 .\" 2009-05-17 by Arthur David Olson.
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/contrib/tzcode/zic/zdump.8 192890 2009-05-27 12:18:39Z edwin $
 .\"
 .Dd June 20, 2004
 .Dt ZDUMP 8

Modified: trunk/contrib/tzcode/zic/zdump.c
===================================================================
--- trunk/contrib/tzcode/zic/zdump.c	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/zdump.c	2018-06-19 14:35:28 UTC (rev 11087)
@@ -5,7 +5,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/contrib/tzcode/zic/zdump.c 307359 2016-10-15 12:38:21Z bapt $";
 static char	elsieid[] = "@(#)zdump.c	8.10";
 #endif /* not lint */
 
@@ -212,24 +212,16 @@
 		return;
 	cp = abbrp;
 	wp = NULL;
-	while (isascii((unsigned char) *cp) && isalpha((unsigned char) *cp))
+	while (isascii((unsigned char) *cp) &&
+		(isalnum((unsigned char)*cp) || *cp == '-' || *cp == '+'))
 		++cp;
-	if (cp - abbrp == 0)
-		wp = _("lacks alphabetic at start");
-	else if (cp - abbrp < 3)
-		wp = _("has fewer than 3 alphabetics");
+	if (cp - abbrp < 3)
+		wp = _("has fewer than 3 characters");
 	else if (cp - abbrp > 6)
-		wp = _("has more than 6 alphabetics");
-	if (wp == NULL && (*cp == '+' || *cp == '-')) {
-		++cp;
-		if (isascii((unsigned char) *cp) &&
-			isdigit((unsigned char) *cp))
-				if (*cp++ == '1' && *cp >= '0' && *cp <= '4')
-					++cp;
-		if (*cp != '\0')
-			wp = _("differs from POSIX standard");
-	}
-	if (wp == NULL)
+		wp = _("has more than 6 characters");
+	else if (*cp)
+		wp = "has characters other than ASCII alphanumerics, '-' or '+'";
+	else
 		return;
 	(void) fflush(stdout);
 	(void) fprintf(stderr,

Modified: trunk/contrib/tzcode/zic/zic/Makefile
===================================================================
--- trunk/contrib/tzcode/zic/zic/Makefile	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/zic/Makefile	2018-06-19 14:35:28 UTC (rev 11087)
@@ -1,4 +1,4 @@
-# $FreeBSD$
+# $FreeBSD: stable/10/contrib/tzcode/zic/zic/Makefile 201390 2010-01-02 11:07:44Z ed $
 
 .PATH: ${.CURDIR}/..
 

Modified: trunk/contrib/tzcode/zic/zic.8
===================================================================
--- trunk/contrib/tzcode/zic/zic.8	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/zic.8	2018-06-19 14:35:28 UTC (rev 11087)
@@ -1,4 +1,4 @@
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/contrib/tzcode/zic/zic.8 214411 2010-10-27 07:14:46Z edwin $
 .Dd June 20, 2004
 .Dt ZIC 8
 .Os

Modified: trunk/contrib/tzcode/zic/zic.c
===================================================================
--- trunk/contrib/tzcode/zic/zic.c	2018-06-19 14:26:06 UTC (rev 11086)
+++ trunk/contrib/tzcode/zic/zic.c	2018-06-19 14:35:28 UTC (rev 11087)
@@ -7,7 +7,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/contrib/tzcode/zic/zic.c 307359 2016-10-15 12:38:21Z bapt $";
 #endif /* not lint */
 
 #include "private.h"
@@ -2615,29 +2615,15 @@
 		register const char *	cp;
 		register char *		wp;
 
-		/*
-		** Want one to ZIC_MAX_ABBR_LEN_WO_WARN alphabetics
-		** optionally followed by a + or - and a number from 1 to 14.
-		*/
 		cp = string;
 		wp = NULL;
 		while (isascii((unsigned char) *cp) &&
-			isalpha((unsigned char) *cp))
+			(isalnum((unsigned char)*cp) || *cp == '-' || *cp == '+'))
 				++cp;
-		if (cp - string == 0)
-wp = _("time zone abbreviation lacks alphabetic at start");
 		if (noise && cp - string > 3)
-wp = _("time zone abbreviation has more than 3 alphabetics");
+wp = _("time zone abbreviation has more than 3 characters");
 		if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN)
-wp = _("time zone abbreviation has too many alphabetics");
-		if (wp == NULL && (*cp == '+' || *cp == '-')) {
-			++cp;
-			if (isascii((unsigned char) *cp) &&
-				isdigit((unsigned char) *cp))
-					if (*cp++ == '1' &&
-						*cp >= '0' && *cp <= '4')
-							++cp;
-		}
+wp = _("time zone abbreviation has too many characters");
 		if (*cp != '\0')
 wp = _("time zone abbreviation differs from POSIX standard");
 		if (wp != NULL) {



More information about the Midnightbsd-cvs mailing list