Current-Users archive

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

Re: Build break - commaizenumber



Write a C pringram to use printf(3) ...  :)

        {117} cat test.c
        #include <stdio.h>

        int main(int argc, void *argv) {
                printf("%'d\n", 12345);
        }
        {118} cc -o test test.c
        {119} ./test
        12,345
        {120}


:)


On Tue, 15 Mar 2011, Eric Haszlakiewicz wrote:

On Tue, Mar 15, 2011 at 09:54:58AM -0500, Eric Haszlakiewicz wrote:
On Tue, Mar 15, 2011 at 06:23:38AM -0700, Paul Goyette wrote:
On Tue, 15 Mar 2011, Christos Zoulas wrote:

What's wrong with %'<format>?

Nothing!  :)

IMHo, the commaize_number changes including those in ls(1) should be
backed out.

hmm... the printf man page I was looking at didn't have a mention of that.

and it doesn't seem to work with a recently built system (as of yesterday):

# printf "%'d\n" 12345
printf: %': invalid directive

What am I missing?

eric

!DSPAM:4d7f7f522279245215628!




-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index