NetBSD-Bugs archive

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

misc/42283: scanf(3) doesn't document %lld



>Number:         42283
>Category:       misc
>Synopsis:       scanf(3) doesn't document %lld
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 08 12:35:00 +0000 2009
>Originator:     Aleksej Saushev
>Release:        NetBSD 5.99.21
>Organization:
>Environment:
System: NetBSD asau.local 5.99.21 NetBSD 5.99.21 (KERN) #0: Sat Nov 7 10:12:15 
MSK 2009 asau%asau.local@localhost:/usr/obj/sys/arch/i386/compile/KERN i386
Architecture: i386
Machine: i386
>Description:
        Dragofly and FreeBSD (by other reports) scanf(3) list:

     ll (ell ell)
              Indicates that the conversion will be one of dioux or n and the
              next pointer is a pointer to a long long int (rather than int).

        At least Dragonfly lists

     q        (deprecated.)  Indicates that the conversion will be one of
              dioux or n and the next pointer is a pointer to a long long int
              (rather than int).

        Simple test program run on NetBSD reveals that %lld works, but
        man page doesn't list it.
>How-To-Repeat:
        Try to read "long long int" value from string in a reasonably portable 
way,
        find that "%q" is deprecated in Dragonfly and seemingly in FreeBSD.
        Find out that undocumented %lld works.
>Fix:
        Add paragraph from Dragonfly man page to ours.

        Alternatively, refactor all manual pages with string formatting
        in a way to provide single reference source.



Home | Main Index | Thread Index | Old Index