Xref: utzoo unix-pc.general:7111 comp.sys.att:11403 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!portal!cup.portal.com!thad From: thad@cup.portal.com (Thad P Floryan) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: 3B1 C runtime library bug; do you have it too? Message-ID: <37666@cup.portal.com> Date: 7 Jan 91 02:12:07 GMT References: <37567@cup.portal.com> <1991Jan5.152216.18838@chance.UUCP> Organization: The Portal System (TM) Lines: 29 john@chance.UUCP (John R. MacMillan) in <1991Jan5.152216.18838@chance.UUCP> writes: | printf ("%0*.*f\n", p+3, p, frac); ^ The printf(3) man page says the spec is "...the character %...zero or more flags...an optional decimal digit specifying minimum field width...a period followed by a decimal digit", and "a field width or precision may be indicated by an asterisk instead of a digit string" Now the '0' after the '%' above is not one of the listed flag chars, but the '*' is only acceptable *instead of* a field width. So I'd say that by the 3.51 man page I have, the specification is illegal. Am I missing something? Nope. I read the 3.51m "man" page and interpret it the same way as you. As mentioned in a prior posting, I've been using the K&R ("The C Programming Language", Kernighan & Ritchie)) and the H&S ("C: A Reference Manual", Harbison and Steele) for so long that I've come to take certain things for granted. It's clear the 3B1's C library is simply obsolete. Every other compiler's runtime I've used (on other systems, even those dated prior to 3.51's 1987 date) do perform per the K&R and H&S specs. I'm going to be "looking into" a replacement for the pertinent functions as mentioned in the just-prior posting. Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]