Re: [sqlite] size_t printf standard (was: SQLite4 (don't scream))

2012-06-29 Thread Stephan Beal
On Fri, Jun 29, 2012 at 8:56 PM, Kyle McKay  wrote:

> On June 28, 2012 09:46:06 PDT, Stephan Beal wrote:
>
>> - There are no standard printf()/scanf() specifiers for it, which means
>> those funcs cannot be used with size_t or ifdefs or casts are needed to
>> handle them portably.
>>
>
> Perhaps you should actually check the standard before making such a claim:
>
>  
> http://pubs.opengroup.org/**onlinepubs/009695399/**functions/printf.html


My apologies, my statement was extremely misleading. i was refering to the
PRIxxx and SCNxxx family of macros. Those don't exist for size_t.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] size_t printf standard (was: SQLite4 (don't scream))

2012-06-29 Thread Kyle McKay

On June 28, 2012 09:46:06 PDT, Stephan Beal wrote:
- There are no standard printf()/scanf() specifiers for it, which  
means
those funcs cannot be used with size_t or ifdefs or casts are needed  
to

handle them portably.


Perhaps you should actually check the standard before making such a  
claim:


  http://pubs.opengroup.org/onlinepubs/009695399/functions/printf.html

The functionality described on this reference page is aligned with  
the ISO C standard. Any conflict between the requirements described  
here and the ISO C standard is unintentional. This volume of IEEE  
Std 1003.1-2001 defers to the ISO C standard.

[...]

The length modifiers and their meanings are:


[...]

z
	Specifies that a following d, i, o, u, x, or X conversion specifier  
applies to a size_t or the corresponding signed integer type  
argument; or that a following n conversion specifier applies to a  
pointer to a signed integer type corresponding to a size_t argument.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users