Bug 28453

Summary: Re: strptime: %s formatting missing (patch)
Product: Base System Reporter: Maxim Konovalov <maxim>
Component: binAssignee: greid
Status: Closed FIXED    
Severity: Affects Only Me CC: thz
Priority: Normal    
Version: 1.0-RELEASE   
Hardware: Any   
OS: Any   

Description Maxim Konovalov 2001-06-27 15:20:01 UTC
 Just another patch:
 
 --- strptime.c.orig	Wed Jun 27 16:09:11 2001
 +++ strptime.c	Wed Jun 27 17:08:12 2001
 @@ -86,6 +86,7 @@
  static char *
  _strptime(const char *buf, const char *fmt, struct tm *tm)
  {
 +	long	l;
  	char	c;
  	const char *ptr;
  	int	i,
 @@ -459,6 +460,16 @@
  			if (*buf != 0 && isspace((unsigned char)*buf))
  				while (*ptr != 0 && !isspace((unsigned char)*ptr))
  					ptr++;
 +			break;
 +
 +		case 's':
 +			for (l = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
 +				l *= 10;
 +				l += *buf - '0';
 +			}
 +
 +			(void)localtime_r(&l, tm);
 +
  			break;
 
  		case 'Y':
 
 -- 
 Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
 phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru
Comment 1 greid freebsd_committer freebsd_triage 2001-07-02 19:12:54 UTC
State Changed
From-To: open->closed

Mailing list message; not a PR 


Comment 2 greid freebsd_committer freebsd_triage 2001-07-02 19:12:54 UTC
Responsible Changed
From-To: gnats-admin->greid

Misfiled