NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/39135: /usr/bin/awk: printf supports extra- (and broken) formatting rules



The following reply was made to PR bin/39135; it has been noted by GNATS.

From: Aleksey Cheusov <cheusov%tut.by@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/39135: /usr/bin/awk: printf supports extra- (and broken) 
formatting rules
Date: Sat, 12 Jul 2008 21:51:21 +0300

 >  |    http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=5523
 >  
 >  But if you follow the link:
 >  
 >  http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap05.html
 >  
 >  You'll see that there is no mention of the 'l' modifier, and OpenBSD
 >  similarly closed the PR.
 Yes, "length modifiers" are not allowed for awk's printf operator
 and it's safer to disallow them explicitly.
 
 Quick check: between % sign and [diouxXfeEgGcs] character (on the right side)
 only the following chars are allowed: [-+0-9 #].
 
 >  The question is should we completely remove support for %l, do a half-assed
 >  job like we do now, by not handling long long, or fix %lld?
 %l should be disabled because there is no such "conversion
 specifiers". %lld - too because "length modifiers" are
 not allowed for awk's printf (see above).
 
 -- 
 Best regards, Aleksey Cheusov.
 


Home | Main Index | Thread Index | Old Index