mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Integrate gnulib vasnprintf().
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user