In article <[EMAIL PROTECTED]>,
=?koi8-r?B?RG1pdHJ5IEtvaG1hbnl1ayDkzcnU0snKIOvPyM3BzsDL?= <[EMAIL PROTECTED]> wrote:
>On Wed, Mar 06, 2002 at 08:56:18PM -0800, Yitzchak Scott-Thoennes wrote:
>> >Apparently, when I did a "man printf", I got the one in FreeBSD's Section 1:
>> >>       The format string is reused as often as necessary to satisfy the
>> >>       arguments.  Any extra format specifications are evaluated with zero or
>> >>       the null string.
>> 
>> Thats funky.
>
>       this is section *1* manual, for commands, right?  

Whoops.  Didn't notice the section number, my apologies.

>       It's possible that printf *program* does that, but that's really weird.
>
>       (yes, indeed: printf(1) FreeBSD 3.5, Linux 2.2.14, and SunOS 5.8 aka Solaris 8 
>are
>       documented and work this way.)
>
>> POSIX (IEEE 1003.1-2001) says:
>> If the format is exhausted while arguments remain, the excess
>> arguments shall be evaluated but are otherwise ignored.

Above is obviously for printf(3).  For printf(1) it indeed says:
  9. The format operand shall be reused as often as necessary to
     satisfy the argument operands. Any extra c or s conversion
     specifiers shall be evaluated as if a null string argument were
     supplied; other extra conversion specifications shall be evaluated
     as if a zero argument were supplied. If the format operand
     contains no conversion specifications and argument operands are
     present, the results are unspecified.
        • ... Uri Guttman
          • ... Rich Morin
            • ... Jim Cromie
              • ... Luke Palmer
          • ... Dmitry Kohmanyuk Дмитрий Кохманюк
  • ... Yitzchak Scott-Thoennes
    • ... Rich Morin
      • ... Yitzchak Scott-Thoennes
        • ... Rich Morin
        • ... Dmitry Kohmanyuk Дмитрий Кохманюк
          • ... Yitzchak Scott-Thoennes
  • ... Matthew Wickline
  • ... Rich Morin

Reply via email to