Zdump.c

Olson, Arthur David (NIH/NCI) [E] olsona at dc37a.nci.nih.gov
Thu Dec 22 15:23:39 UTC 2005


Here are proposed changes to zdump.c, reflecting suggestions from Robbin
Kawabata.

				--ado

------- zdump.c -------
*** /tmp/geta11896	Thu Dec 22 10:20:54 2005
--- /tmp/getb11896	Thu Dec 22 10:20:54 2005
***************
*** 1,4 ****
! static char	elsieid[] = "@(#)zdump.c	7.72";
  
  /*
  ** This code has been made independent of the rest of the time
--- 1,4 ----
! static char	elsieid[] = "@(#)zdump.c	7.73";
  
  /*
  ** This code has been made independent of the rest of the time
***************
*** 212,222 ****
  	while (isascii((unsigned char) *cp) && isalpha((unsigned char)
*cp))
  		++cp;
  	if (cp - abbrp == 0)
! 		wp = _("lacks alphabetic at start");
! 	if (cp - abbrp < 3)
! 		wp = _("has fewer than 3 alphabetics");
! 	if (cp - abbrp > 6)
! 		wp = _("has more than 6 alphabetics");
  	if (wp == NULL && (*cp == '+' || *cp == '-')) {
  		++cp;
  		if (isascii((unsigned char) *cp) &&
--- 212,222 ----
  	while (isascii((unsigned char) *cp) && isalpha((unsigned char)
*cp))
  		++cp;
  	if (cp - abbrp == 0)
! 		wp = "lacks alphabetic at start";
! 	else if (cp - abbrp < 3)
! 		wp = "has fewer than 3 alphabetics";
! 	else if (cp - abbrp > 6)
! 		wp = "has more than 6 alphabetics";
  	if (wp == NULL && (*cp == '+' || *cp == '-')) {
  		++cp;
  		if (isascii((unsigned char) *cp) &&
***************
*** 223,237 ****
  			isdigit((unsigned char) *cp))
  				if (*cp++ == '1' && *cp >= '0' && *cp <=
'4')
  					++cp;
  	}
- 	if (*cp != '\0')
- 		wp = _("differs from POSIX standard");
  	if (wp == NULL)
  		return;
  	(void) fflush(stdout);
  	(void) fprintf(stderr,
  		_("%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"),
! 		progname, zone, abbrp, wp);
  	warned = TRUE;
  }
  
--- 223,237 ----
  			isdigit((unsigned char) *cp))
  				if (*cp++ == '1' && *cp >= '0' && *cp <=
'4')
  					++cp;
+ 		if (*cp != '\0')
+ 			wp = "differs from POSIX standard";
  	}
  	if (wp == NULL)
  		return;
  	(void) fflush(stdout);
  	(void) fprintf(stderr,
  		_("%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"),
! 		progname, zone, abbrp, _(wp));
  	warned = TRUE;
  }
  




More information about the tz mailing list