Type: recommended
         Title: SAL_PRI... macros for portable printf-style conversion 
specifications
     Posted by: [EMAIL PROTECTED]
      Affected: sal
Effective from: cws_src680_sb81


*Summary*
--------
sal/types.h:1.31.34.1
+ SAL_PRIdINT32
+ SAL_PRIuUINT32
+ SAL_PRIxUINT32
+ SAL_PRIXUINT32
+ SAL_PRIdINT64
+ SAL_PRIuUINT64
+ SAL_PRIxUINT64
+ SAL_PRIXUINT64
+ SAL_PRIdINTPTR
+ SAL_PRIuUINTPTR
+ SAL_PRIxUINTPTR
+ SAL_PRIXUINTPTR
+ SAL_PRI_SIZET
+ SAL_PRI_PTRDIFFT

*Description*
-------------
... of which SAL_PRIdINT32--SAL_PRIXUINTPTR are counterparts of
(subsets of) the C99 inttypes.h PRI... macros (see there) for
sal_[u]Int(32|64|Ptr), and SAL_PRI_SIZET and SAL_PRI_PTRDIFFT are just
length modifiers (/not/ length modifier plus conversion specifier) for
use in size_t resp. ptrdiff_t conversion specifiers.

Example usage:

sal_uInt32 x1 = 0xabc;
std::ptrdiff_t x2 = -123;
printf("x1=%" SAL_PRIxUINT32 ", x2=%" SAL_PRI_PTRDIFFT "d\n", x1, x2);
// prints: x1=abc, x2=-123


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to