[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question regarding sscanf() vs. off_t and similar
From: |
Andreas Schwab |
Subject: |
Re: Question regarding sscanf() vs. off_t and similar |
Date: |
Thu, 14 Sep 2006 17:41:35 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Philipp Marek <address@hidden> writes:
> On Thursday 14 September 2006 15:01 Andreas Schwab wrote:
>> Note that "L" is not a valid length modifier for integer formats.
> For gnu libc it is:
> http://www.gnu.org/software/libc/manual/html_node/Integer-Conversions.html#Integer-Conversions
It's better not to depend on non-standard extensions when it is easy to
avoid.
>> Assuming you meant %llu instead of %Lu you can always add a cast to
>> unsigned long long to match the format.
> Yes. But that's a bit unclean, and doing that unnecessarily in a loop for
> ~300000 iterations is something I'd like to avoid.
String formatting isn't exactly fast anyway, so the conversion would most
likely be lost in the noise.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Re: Question regarding sscanf() vs. off_t and similar, Andreas Schwab, 2006/09/14