[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: svn commit: trunk/busybox: procps util-linux
From: Rob Landley <rob () landley ! net>
Date: 2006-10-28 18:37:27
Message-ID: 200610281437.27904.rob () landley ! net
[Download RAW message or body]
On Friday 27 October 2006 8:04 pm, Denis Vlasenko wrote:
> > Did you mean PRIu64 ?
>
> I don't know what that is - off_t format string?
> (Compile problem is due to typo, should be OFF_FMT)
It's a #define with a string snippet guaranteed to be the right escape
sequence to print out a uint64_t in printf. Using it generally involves
taking advantage of automatic string constant concatenation, ala the
following snippet from our current hdparm.c:
printf("(%"PRIu64" GB)\n", bbbig/1000);
Yeah, you have to supply your own "%" so you can do things like specify how
many digits you want, zero padding, etc.
Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic