1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 specialised macros which are not used often.
7 <!-- ##### SECTION Long_Description ##### -->
9 These macros provide more specialized features which are not needed so often
10 by application programmers.
13 <!-- ##### SECTION See_Also ##### -->
18 <!-- ##### MACRO G_INLINE_FUNC ##### -->
20 Used to declare inline functions. If inline functions are not supported on
21 the particular platform, the macro evaluates to the empty string.
26 <!-- ##### MACRO G_STMT_START ##### -->
28 Used within multi-statement macros so that they can be used in places where
29 only one statement is expected by the compiler.
34 <!-- ##### MACRO G_STMT_END ##### -->
36 Used within multi-statement macros so that they can be used in places where
37 only one statement is expected by the compiler.
42 <!-- ##### MACRO G_BEGIN_DECLS ##### -->
49 <!-- ##### MACRO G_END_DECLS ##### -->
56 <!-- ##### MACRO G_N_ELEMENTS ##### -->
64 <!-- ##### MACRO G_VA_COPY ##### -->
66 Portable way to copy <type>va_list</type> variables.
69 @ap1: the <type>va_list</type> variable to place a copy of @ap2 in.
70 @ap2: a <type>va_list</type>.
73 <!-- ##### MACRO G_STRINGIFY ##### -->
81 <!-- ##### MACRO G_GNUC_EXTENSION ##### -->
83 Expands to "__extension__" when GNU C is used as the compiler.
84 This simply tells GNU C not to warn about the following non-standard code
85 when compiling with the -pedantic option.
90 <!-- ##### MACRO G_GNUC_CONST ##### -->
92 Expands to the GNU C const function attribute if the compiler is GNU C.
93 This enables optimization of the function.
94 See the GNU C documentation for details.
99 <!-- ##### MACRO G_GNUC_NORETURN ##### -->
101 Expands to the GNU C noreturn function attribute if the compiler is GNU C.
102 It is used for declaring functions which never return.
103 It enables optimization of the function, and avoids possible compiler
104 warnings. See the GNU C documentation for details.
109 <!-- ##### MACRO G_GNUC_UNUSED ##### -->
111 Expands to the GNU C unused function attribute if the compiler is GNU C.
112 It is used for declaring functions which may never be used.
113 It avoids possible compiler warnings. See the GNU C documentation for details.
118 <!-- ##### MACRO G_GNUC_PURE ##### -->
125 <!-- ##### MACRO G_GNUC_PRINTF ##### -->
127 Expands to the GNU C format function attribute if the compiler is GNU C.
128 This is used for declaring functions which take a variable number of
129 arguments, with the same syntax as <function>printf()</function>.
130 It allows the compiler to type-check the arguments passed to the function.
131 See the GNU C documentation for details.
134 @format_idx: the index of the argument corresponding to the format string.
135 (The arguments are numbered from 1).
136 @arg_idx: the index of the first of the format arguments.
139 <!-- ##### MACRO G_GNUC_SCANF ##### -->
141 Expands to the GNU C format function attribute if the compiler is GNU C.
142 This is used for declaring functions which take a variable number of
143 arguments, with the same syntax as <function>scanf()</function>.
144 It allows the compiler to type-check the arguments passed to the function.
145 See the GNU C documentation for details.
148 @format_idx: the index of the argument corresponding to the format string.
149 (The arguments are numbered from 1).
150 @arg_idx: the index of the first of the format arguments.
153 <!-- ##### MACRO G_GNUC_FORMAT ##### -->
155 Expands to the GNU C format_arg function attribute if the compiler is GNU C.
156 This is used for declaring functions which take a variable number of
157 parameters, like <function>printf()</function> and
158 <function>scanf()</function>. See the GNU C documentation for details.
160 FIXME: I can't find this in my GNU C documentation. Take out?
163 @arg_idx: the index of the argument.
166 <!-- ##### MACRO G_GNUC_FUNCTION ##### -->
168 Expands to the GNU C __FUNCTION__ variable if the compiler is GNU C,
170 The GNU C __FUNCTION__ variable contains the name of the current function.
171 See the GNU C documentation for details.
176 <!-- ##### MACRO G_GNUC_PRETTY_FUNCTION ##### -->
178 Expands to the GNU C __PRETTY_FUNCTION__ variable if the compiler is GNU C,
180 The GNU C __PRETTY_FUNCTION__ variable contains the name of the current
181 function. For a C program this is the same as the __FUNCTION__ variable
182 but for C++ it also includes extra information such as the class
183 and function prototype. See the GNU C documentation for details.
188 <!-- ##### MACRO G_STRLOC ##### -->
195 <!-- ##### MACRO G_GINT16_FORMAT ##### -->
197 This is the platform dependent conversion specifier for scanning and
198 printing values of type #gint16. It is a string literal, but doesn't
199 include the percent-sign, such that you can add precision and length
200 modifiers between percent-sign and conversion specifier.
208 sscanf ("42", "%" G_GINT16_FORMAT, &in)
210 g_print ("%" G_GINT32_FORMAT, out);
217 <!-- ##### MACRO G_GUINT16_FORMAT ##### -->
219 This is the platform dependent conversion specifier for scanning and
220 printing values of type #guint16. See also #G_GINT16_FORMAT.
225 <!-- ##### MACRO G_GINT32_FORMAT ##### -->
227 This is the platform dependent conversion specifier for scanning and
228 printing values of type #gint32. See also #G_GINT16_FORMAT.
233 <!-- ##### MACRO G_GUINT32_FORMAT ##### -->
235 This is the platform dependent conversion specifier for scanning and
236 printing values of type #guint32. See also #G_GINT16_FORMAT.
241 <!-- ##### MACRO G_GINT64_FORMAT ##### -->
243 This is the platform dependent conversion specifier for scanning and
244 printing values of type #gint64. See also #G_GINT16_FORMAT.
249 Some platforms do not support scanning and printing 64 bit integers,
250 even though the types are supported. On such platforms G_GINT64_FORMAT
257 <!-- ##### MACRO G_GUINT64_FORMAT ##### -->
259 This is the platform dependent conversion specifier for scanning and
260 printing values of type #guint64. See also #G_GINT16_FORMAT.
265 Some platforms do not support scanning and printing 64 bit integers,
266 even though the types are supported. On such platforms G_GUINT64_FORMAT