Integrate gnulib vasnprintf().
[platform/upstream/glib.git] / docs / reference / glib / tmpl / macros_misc.sgml
index 893c33a..d66ff4f 100644 (file)
@@ -118,9 +118,23 @@ for a const function to return void.
 
 
 
+<!-- ##### MACRO G_GNUC_DEPRECATED ##### -->
+<para>
+Expands to the GNU C <literal>deprecated</literal> attribute if the compiler 
+is <command>gcc</command>.
+It can be used to mark typedefs, variables and functions as deprecated. 
+When called with the <option>-Wdeprecated</option> option, the compiler will 
+generate warnings when deprecated interfaces are used.
+See the GNU C documentation for details. 
+</para>
+
+@Since: 2.2
+
+
 <!-- ##### MACRO G_GNUC_NORETURN ##### -->
 <para>
-Expands to the GNU C <literal>noreturn</literal> function attribute if the compiler is <command>gcc</command>.
+Expands to the GNU C <literal>noreturn</literal> function attribute if the 
+compiler is <command>gcc</command>.
 It is used for declaring functions which never return.
 It enables optimization of the function, and avoids possible compiler
 warnings. See the GNU C documentation for details. 
@@ -272,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
@@ -302,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
@@ -318,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
@@ -328,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>
 
@@ -344,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>