Integrate gnulib vasnprintf().

This commit is contained in:
Matthias Clasen
2003-07-28 23:00:05 +00:00
parent 3389a051da
commit 3c51de64fe
14 changed files with 571 additions and 39 deletions

View File

@@ -311,10 +311,13 @@ G_UNLIKELY
G_STRLOC
<SUBSECTION>
G_GINT16_MODIFIER
G_GINT16_FORMAT
G_GUINT16_FORMAT
G_GINT32_MODIFIER
G_GINT32_FORMAT
G_GUINT32_FORMAT
G_GINT64_MODIFIER
G_GINT64_FORMAT
G_GUINT64_FORMAT

View File

@@ -286,6 +286,28 @@ Expands to a string identifying the current code position.
<!-- ##### MACRO G_GINT16_MODIFIER ##### -->
<para>
The platform dependent length modifier for constructing printf() conversion
specifiers for values of type #gint16. It is a string literal, but doesn't
include the percent-sign, such that you can add precision and length
modifiers between percent-sign and conversion specifier and append a
conversion specifier.
</para>
<para>
The following example prints "0x7b";
<informalexample>
<programlisting>
gint16 value = 123;
g_print ("%#" G_GINT16_MODIFIER "x", value);
</programlisting>
</informalexample>
</para>
@Since: 2.4
<!-- ##### MACRO G_GINT16_FORMAT ##### -->
<para>
This is the platform dependent conversion specifier for scanning and
@@ -316,6 +338,14 @@ printing values of type #guint16. See also #G_GINT16_FORMAT.
<!-- ##### MACRO G_GINT32_MODIFIER ##### -->
<para>
The platform dependent length modifier for constructing printf() conversion
specifiers for values of type #gint32. See also #G_GINT16_MODIFIER.
</para>
@Since: 2.4
<!-- ##### MACRO G_GINT32_FORMAT ##### -->
<para>
This is the platform dependent conversion specifier for scanning and
@@ -332,6 +362,22 @@ printing values of type #guint32. See also #G_GINT16_FORMAT.
<!-- ##### MACRO G_GINT64_MODIFIER ##### -->
<para>
The platform dependent length modifier for constructing printf() conversion
specifiers for values of type #gint32. See also #G_GINT16_MODIFIER.
</para>
<note>
<para>
Some platforms do not support printing 64 bit integers,
even though the types are supported. On such platforms #G_GINT64_MODIFIER
is not defined.
</para>
</note>
@Since: 2.4
<!-- ##### MACRO G_GINT64_FORMAT ##### -->
<para>
This is the platform dependent conversion specifier for scanning and
@@ -342,7 +388,9 @@ printing values of type #gint64. See also #G_GINT16_FORMAT.
<para>
Some platforms do not support scanning and printing 64 bit integers,
even though the types are supported. On such platforms #G_GINT64_FORMAT
is not defined.
is not defined. Note that scanf() may not support 64 bit integers, even
if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not
recommended for parsing anyway; consider using g_strtoull() instead.
</para>
</note>
@@ -358,7 +406,9 @@ printing values of type #guint64. See also #G_GINT16_FORMAT.
<para>
Some platforms do not support scanning and printing 64 bit integers,
even though the types are supported. On such platforms #G_GUINT64_FORMAT
is not defined.
is not defined. Note that scanf() may not support 64 bit integers, even
if #G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not
recommended for parsing anyway; consider using g_strtoull() instead.
</para>
</note>