From owner-freebsd-standards@FreeBSD.ORG Mon Sep 17 01:39:04 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0A1B16A419 for ; Mon, 17 Sep 2007 01:39:04 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 55D7813C46B for ; Mon, 17 Sep 2007 01:39:04 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l8H1O1OQ000826; Sun, 16 Sep 2007 20:24:01 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Sun, 16 Sep 2007 20:24:01 -0500 (CDT) From: "Sean C. Farley" To: freebsd-standards@FreeBSD.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on mail.farley.org Cc: Xin LI , "Sean C. Farley" Subject: vfprintf() string precision type X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 01:39:04 -0000 Xin LI noticed a warning in the code I wrote for setenv() where a precision was provided with a string argument to warnx() (really vfprintf()). The warning appearing on amd64 and not i386 showed that precisions are always 32-bit. Would it be better to change the precision handling to expect size_t? My reasoning is that strlen() and sizeof both return size_t. It makes a cast unnecessary for passing a value returned by either call as the precision. Unfortunately, I could find nothing from SUSv3 that specified what type the precision could be. Sean P.S. I am not on this list; please keep the Cc. -- scf@FreeBSD.org From owner-freebsd-standards@FreeBSD.ORG Mon Sep 17 06:37:37 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25F4316A420 for ; Mon, 17 Sep 2007 06:37:37 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id AFE0713C491 for ; Mon, 17 Sep 2007 06:37:36 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from knop-beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Mon, 17 Sep 2007 08:37:34 +0200 Date: Mon, 17 Sep 2007 08:37:31 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@knop-beagle.kn.op.dlr.de To: "Sean C. Farley" In-Reply-To: Message-ID: <20070917083135.V40808@knop-beagle.kn.op.dlr.de> References: X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 17 Sep 2007 06:37:34.0642 (UTC) FILETIME=[3B26C120:01C7F8F5] Cc: Xin LI , freebsd-standards@FreeBSD.org Subject: Re: vfprintf() string precision type X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 06:37:37 -0000 On Sun, 16 Sep 2007, Sean C. Farley wrote: SCF>Xin LI noticed a warning in the code I wrote for setenv() where a SCF>precision was provided with a string argument to warnx() (really SCF>vfprintf()). The warning appearing on amd64 and not i386 showed that SCF>precisions are always 32-bit. SCF> SCF>Would it be better to change the precision handling to expect size_t? SCF>My reasoning is that strlen() and sizeof both return size_t. It makes a SCF>cast unnecessary for passing a value returned by either call as the SCF>precision. Unfortunately, I could find nothing from SUSv3 that SCF>specified what type the precision could be. The argument to the %.*f is specified to be an int (7.19.6.1/5) so I would assume that internal handling in printf() also uses int. Paragraph 4 of the above section talks about the precision as 'an optional decimal integer'. Well, one could interpret this to mean int, but need not to. harti PS: Not sure that I got your question right :-) From owner-freebsd-standards@FreeBSD.ORG Mon Sep 17 11:08:20 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4673516A4A0 for ; Mon, 17 Sep 2007 11:08:20 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1334513C4B5 for ; Mon, 17 Sep 2007 11:08:20 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HB8JXG049545 for ; Mon, 17 Sep 2007 11:08:19 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8HB8IC0049541 for freebsd-standards@FreeBSD.org; Mon, 17 Sep 2007 11:08:18 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 17 Sep 2007 11:08:18 GMT Message-Id: <200709171108.l8HB8IC0049541@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 11:08:20 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/25542 standards /bin/sh: null char in quoted string o kern/46239 standards posix semaphore implementation errors o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/82654 standards C99 long double math functions are missing o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o stand/114910 standards getaddrinfo() fails to set ai_canonname 6 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/21519 standards sys/dir.h should be deprecated some more o bin/24390 standards Replacing old dir-symlinks when using /bin/ln s stand/24590 standards timezone function not compatible witn Single Unix Spec s kern/28260 standards UIO_MAXIOV needs to be made public s stand/36076 standards Implementation of POSIX fuser command o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings p stand/41576 standards POSIX compliance of ln(1) o stand/44425 standards getcwd() succeeds even if current dir has perm 000. o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/54833 standards [pcvt] more pcvt deficits o stand/54839 standards [pcvt] pcvt deficits p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/56476 standards cd9660 unicode support simple hack o stand/58676 standards grantpt(3) alters storage used by ptsname(3) s stand/62858 standards malloc(0) not C99 compliant s kern/64875 standards [libc] [patch] [feature request] add a system call: fd o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- o stand/66531 standards _gettemp uses a far smaller set of filenames than docu o stand/70813 standards [PATCH] ls(1) not Posix compliant o stand/72006 standards floating point formating in non-C locales o stand/79056 standards regex(3) regression tests a stand/80293 standards sysconf() does not support well-defined unistd values o stand/81287 standards [PATCH]: fingerd(8) might send a line not ending in CR o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/85080 standards output of long double subnormals (with printf) is wron o stand/92360 standards [headers] [patch] Missing TAB3 in kernel headers o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/96016 standards [headers] clock_getres et al should be in o stand/96236 standards [PATCH] [POSIX] sed.1 incorrectly describes a function p stand/99517 standards Missing SIGRTMIN and SIGRTMAX signals o stand/99960 standards [Patch] make(1): Add -p flag o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/104841 standards [libm] [patch] C99 long double square root. o stand/107561 standards [patch] Missing SUS function tcgetsid() o kern/114578 standards [libc] wide character printing using swprintf(dst, n, o stand/114633 standards /etc/rc.subr: line 511: omits a quotation mark: "force o stand/116081 standards make does not work with the directive sinclude o stand/116221 standards SUS issue -- FreeBSD has not flag WNOWAIT for wait*() 40 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Sep 17 12:57:17 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CFA916A418; Mon, 17 Sep 2007 12:57:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx02.syd.optusnet.com.au (fallbackmx02.syd.optusnet.com.au [211.29.133.72]) by mx1.freebsd.org (Postfix) with ESMTP id D6A9F13C4A7; Mon, 17 Sep 2007 12:57:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by fallbackmx02.syd.optusnet.com.au (8.12.11.20060308/8.12.11) with ESMTP id l8H5WZmC023873; Mon, 17 Sep 2007 15:32:35 +1000 Received: from c220-239-235-248.carlnfd3.nsw.optusnet.com.au (c220-239-235-248.carlnfd3.nsw.optusnet.com.au [220.239.235.248]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l8H5WUrW025578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Sep 2007 15:32:33 +1000 Date: Mon, 17 Sep 2007 15:32:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Sean C. Farley" In-Reply-To: Message-ID: <20070917152627.V29498@delplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Xin LI , freebsd-standards@FreeBSD.org Subject: Re: vfprintf() string precision type X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 12:57:17 -0000 On Sun, 16 Sep 2007, Sean C. Farley wrote: > Xin LI noticed a warning in the code I wrote for setenv() where a > precision was provided with a string argument to warnx() (really > vfprintf()). The warning appearing on amd64 and not i386 showed that > precisions are always 32-bit. > > Would it be better to change the precision handling to expect size_t? No. This would be a large standards violation. > My reasoning is that strlen() and sizeof both return size_t. It makes a > cast unnecessary for passing a value returned by either call as the > precision. Unfortunately, I could find nothing from SUSv3 that > specified what type the precision could be. >From n869.txt: [#5] As noted above, a field width, or precision, or both, may be indicated by an asterisk. In this case, an int argument supplies the field width or precision. The >From POSIX-2001 draft7.txt: 13174 A field width, or precision, or both, may be indicated by an asterisk ('*'). In this case an 13175 argument of type int supplies the field width or precision. Applications shall ensure that >From printf.3: A field width or precision, or both, may be indicated by an asterisk .Ql * or an asterisk followed by one or more decimal digits and a .Ql $ instead of a digit string. In this case, an .Vt int argument supplies the field width or precision. Bruce From owner-freebsd-standards@FreeBSD.ORG Mon Sep 17 23:35:39 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3436A16A417; Mon, 17 Sep 2007 23:35:39 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id F33D713C45E; Mon, 17 Sep 2007 23:35:38 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l8HNZVmv022963; Mon, 17 Sep 2007 18:35:32 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Mon, 17 Sep 2007 18:35:31 -0500 (CDT) From: "Sean C. Farley" To: Harti Brandt In-Reply-To: <20070917083135.V40808@knop-beagle.kn.op.dlr.de> Message-ID: References: <20070917083135.V40808@knop-beagle.kn.op.dlr.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on mail.farley.org Cc: Xin LI , freebsd-standards@FreeBSD.org Subject: Re: vfprintf() string precision type X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 23:35:39 -0000 On Mon, 17 Sep 2007, Harti Brandt wrote: > On Sun, 16 Sep 2007, Sean C. Farley wrote: > > SCF>Xin LI noticed a warning in the code I wrote for setenv() where a > SCF>precision was provided with a string argument to warnx() (really > SCF>vfprintf()). The warning appearing on amd64 and not i386 showed > SCF>that precisions are always 32-bit. > SCF> > SCF>Would it be better to change the precision handling to expect > SCF>size_t? My reasoning is that strlen() and sizeof both return > SCF>size_t. It makes a cast unnecessary for passing a value returned > SCF>by either call as the precision. Unfortunately, I could find > SCF>nothing from SUSv3 that specified what type the precision could > SCF>be. > > The argument to the %.*f is specified to be an int (7.19.6.1/5) so I > would assume that internal handling in printf() also uses int. > Paragraph 4 of the above section talks about the precision as 'an > optional decimal integer'. Well, one could interpret this to mean int, > but need not to. Yes, I see your point. It should be int, but it would be nice for the spec to say size_t. :) > PS: Not sure that I got your question right :-) You did. Thank you. Sean -- scf@FreeBSD.org From owner-freebsd-standards@FreeBSD.ORG Mon Sep 17 23:49:05 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73F4A16A419; Mon, 17 Sep 2007 23:49:05 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 224A713C458; Mon, 17 Sep 2007 23:49:05 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l8HNn0L4023108; Mon, 17 Sep 2007 18:49:00 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Mon, 17 Sep 2007 18:49:00 -0500 (CDT) From: "Sean C. Farley" To: Bruce Evans In-Reply-To: <20070917152627.V29498@delplex.bde.org> Message-ID: References: <20070917152627.V29498@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on mail.farley.org Cc: Xin LI , freebsd-standards@FreeBSD.org Subject: Re: vfprintf() string precision type X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 23:49:05 -0000 On Mon, 17 Sep 2007, Bruce Evans wrote: > On Sun, 16 Sep 2007, Sean C. Farley wrote: > >> Xin LI noticed a warning in the code I wrote for setenv() where a >> precision was provided with a string argument to warnx() (really >> vfprintf()). The warning appearing on amd64 and not i386 showed that >> precisions are always 32-bit. >> >> Would it be better to change the precision handling to expect size_t? > > No. This would be a large standards violation. > >> My reasoning is that strlen() and sizeof both return size_t. It >> makes a cast unnecessary for passing a value returned by either call >> as the precision. Unfortunately, I could find nothing from SUSv3 >> that specified what type the precision could be. > > From n869.txt: > [#5] As noted above, a field width, or precision, or both, > may be indicated by an asterisk. In this case, an int > argument supplies the field width or precision. The > > From POSIX-2001 draft7.txt: > 13174 A field width, or precision, or both, may be > indicated by an asterisk ('*'). In this case an > 13175 argument of type int supplies the field width or > precision. Applications shall ensure that > > From printf.3: > A field width or precision, or both, may be indicated by > an asterisk > .Ql * > or an asterisk followed by one or more decimal digits and a > .Ql $ > instead of a > digit string. > In this case, an > .Vt int > argument supplies the field width or precision. This is why I asked. The man page does not specifically state that the type must be int. At least in my head, "decimal digits" could be an integer of any size in base 10. The other quotes you give do specify it. Would it be acceptable to change the man page to state int type, so I do not ask again after I inevitably forget? :) Personally, I prefer standards that agree with me. :) I will go fix my code to remove the warning. Thank you for the answer. Sean -- scf@FreeBSD.org From owner-freebsd-standards@FreeBSD.ORG Tue Sep 18 05:27:31 2007 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4546B16A418; Tue, 18 Sep 2007 05:27:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.freebsd.org (Postfix) with ESMTP id 9FE3D13C457; Tue, 18 Sep 2007 05:27:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c220-239-235-248.carlnfd3.nsw.optusnet.com.au (c220-239-235-248.carlnfd3.nsw.optusnet.com.au [220.239.235.248]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l8I5RPWb012794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Sep 2007 15:27:27 +1000 Date: Tue, 18 Sep 2007 15:27:20 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Sean C. Farley" In-Reply-To: Message-ID: <20070918152516.T32708@delplex.bde.org> References: <20070917152627.V29498@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Xin LI , freebsd-standards@freebsd.org Subject: Re: vfprintf() string precision type X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 05:27:31 -0000 On Mon, 17 Sep 2007, Sean C. Farley wrote: > On Mon, 17 Sep 2007, Bruce Evans wrote: >> From printf.3: >> A field width or precision, or both, may be indicated by >> an asterisk >> .Ql * >> or an asterisk followed by one or more decimal digits and a >> .Ql $ >> instead of a >> digit string. >> In this case, an >> .Vt int ^^^ >> argument supplies the field width or precision. > > This is why I asked. The man page does not specifically state that the > type must be int. At least in my head, "decimal digits" could be an > integer of any size in base 10. The other quotes you give do specify > it. Would it be acceptable to change the man page to state int type, so > I do not ask again after I inevitably forget? :) Er, even the man page specifically says "int", using wording essentially identical to C99. Bruce From owner-freebsd-standards@FreeBSD.ORG Tue Sep 18 14:36:20 2007 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F4E316A475; Tue, 18 Sep 2007 14:36:20 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 27C0F13C4B4; Tue, 18 Sep 2007 14:36:19 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l8IEaFe9038797; Tue, 18 Sep 2007 09:36:15 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Tue, 18 Sep 2007 09:36:15 -0500 (CDT) From: "Sean C. Farley" To: Bruce Evans In-Reply-To: <20070918152516.T32708@delplex.bde.org> Message-ID: References: <20070917152627.V29498@delplex.bde.org> <20070918152516.T32708@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on mail.farley.org Cc: Xin LI , freebsd-standards@FreeBSD.org Subject: Re: vfprintf() string precision type X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 14:36:20 -0000 On Tue, 18 Sep 2007, Bruce Evans wrote: > On Mon, 17 Sep 2007, Sean C. Farley wrote: > >> On Mon, 17 Sep 2007, Bruce Evans wrote: > >>> From printf.3: >>> A field width or precision, or both, may be indicated by >>> an asterisk >>> .Ql * >>> or an asterisk followed by one or more decimal digits and a >>> .Ql $ >>> instead of a >>> digit string. >>> In this case, an >>> .Vt int > ^^^ >>> argument supplies the field width or precision. >> >> This is why I asked. The man page does not specifically state that >> the type must be int. At least in my head, "decimal digits" could be >> an integer of any size in base 10. The other quotes you give do >> specify it. Would it be acceptable to change the man page to state >> int type, so I do not ask again after I inevitably forget? :) > > Er, even the man page specifically says "int", using wording > essentially identical to C99. OK. I must be blind. Maybe, if we make it 24 font in bold with something before it saying "Sean, look here!", then I will actually see it. Watching after a toddler while reading, thinking or even breathing does not seem to work all that well. :) Sean -- scf@FreeBSD.org From owner-freebsd-standards@FreeBSD.ORG Thu Sep 20 22:33:57 2007 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F162B16A468 for ; Thu, 20 Sep 2007 22:33:57 +0000 (UTC) (envelope-from mail@sysfault.org) Received: from smtprelay11.ispgateway.de (smtprelay11.ispgateway.de [80.67.29.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5AF13C465 for ; Thu, 20 Sep 2007 22:33:57 +0000 (UTC) (envelope-from mail@sysfault.org) Received: (qmail 14304 invoked from network); 20 Sep 2007 22:07:16 -0000 Received: from unknown (HELO medusa.sysfault.org) (936934@[89.182.26.187]) (envelope-sender ) by smtprelay11.ispgateway.de (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 20 Sep 2007 22:07:16 -0000 Received: from localhost ([127.0.0.1] helo=medusa.sysfault.org) by medusa.sysfault.org with esmtp (Exim 4.68 (FreeBSD)) (envelope-from ) id 1IYUDb-0009pr-6I for freebsd-standards@freebsd.org; Fri, 21 Sep 2007 00:09:56 +0200 Received: (from marcus@localhost) by medusa.sysfault.org (8.14.1/8.14.1/Submit) id l8KM9qKn037810 for freebsd-standards@freebsd.org; Fri, 21 Sep 2007 00:09:52 +0200 (CEST) (envelope-from marcus) Date: Fri, 21 Sep 2007 00:09:52 +0200 From: Marcus von Appen To: freebsd-standards Message-ID: <20070920220952.GA1083@medusa.sysfault.org> Mail-Followup-To: freebsd-standards MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) X-Spam-Score: -4.4 (----) Subject: cflow and assembler sources X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcus von Appen List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2007 22:33:58 -0000 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, The flow graph generator for C source code is nearly done. Some minor issues with the one or other construct still exist, but for most code it should be stable enough. Tons of bugs were fixed and it can handle K&R definitions now. You can get the latest version as always at http://sysfault.org/freebsd So far so good. Once it is done, assembler will be the next on my task list. The standard however is pretty quiet about what should be extracted from assembler sources and what not. Thus I'd like to have your input about what should be determined as function definition and call in assembler sources. In the following I'm referring to the nasm syntax. Anything within the '.data' and '.bss' segments could be treated as global variables. The 'call' directive would be clearly a function call. 'global'ized labels would be functions definitions, 'extern'ed handled as specified by the standard for undefined functions. A short example: section .data buf: equ 32 ; global variable buf - shown with -i x flag _bla: equ 32 ; global variable _bla - shown with -i x -i _ flag section .text extern foobar ; extern function shown as 'foobar <>' on call global func1 ; function declaration func1: ; output: 'func1: ' sub esp, buflen ; output: ' buflen ' if -i x is used call foobar ; output: ' foobar: <>' call func2 ; output: ' func2: ' global func2 func2: .... global _func3 ; only shown if -i _ is used. _func3: ... Further feedback on what should issue an entry within the graph (like e.g. jmp) would be great :-). Regards Marcus --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFG8u+wo/JpszXavhwRAjJ1AKCO59Gt3ok6+eZRtZwOd1p+PPzFeQCgmfy5 qsdwpHpkiLNMtabyT/2WX2U= =QTMl -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--