Some further makefile improvement.
[platform/upstream/glib.git] / docs / reference / glib / tmpl / macros_misc.sgml
1 <!-- ##### SECTION Title ##### -->
2 Miscellaneous Macros
3
4 <!-- ##### SECTION Short_Description ##### -->
5 specialised macros which are not used often.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 These macros provide more specialized features which are not needed so often
10 by application programmers.
11 </para>
12
13 <!-- ##### SECTION See_Also ##### -->
14 <para>
15
16 </para>
17
18 <!-- ##### MACRO G_INLINE_FUNC ##### -->
19 <para>
20 Used to declare inline functions. If inline functions are not supported on
21 the particular platform, the macro evaluates to the empty string.
22 </para>
23
24
25
26 <!-- ##### MACRO G_STMT_START ##### -->
27 <para>
28 Used within multi-statement macros so that they can be used in places where
29 only one statement is expected by the compiler.
30 </para>
31
32
33
34 <!-- ##### MACRO G_STMT_END ##### -->
35 <para>
36 Used within multi-statement macros so that they can be used in places where
37 only one statement is expected by the compiler.
38 </para>
39
40
41
42 <!-- ##### MACRO G_N_ELEMENTS ##### -->
43 <para>
44
45 </para>
46
47 @arr: 
48
49
50 <!-- ##### MACRO G_VA_COPY ##### -->
51 <para>
52 Portable way to copy <type>va_list</type> variables.
53 </para>
54
55 @ap1: the <type>va_list</type> variable to place a copy of @ap2 in.
56 @ap2: a <type>va_list</type>.
57
58
59 <!-- ##### MACRO G_STRINGIFY ##### -->
60 <para>
61
62 </para>
63
64 @macro_or_string: 
65
66
67 <!-- ##### MACRO G_GNUC_EXTENSION ##### -->
68 <para>
69 Expands to "__extension__" when GNU C is used as the compiler.
70 This simply tells GNU C not to warn about the following non-standard code
71 when compiling with the -pedantic option.
72 </para>
73
74
75
76 <!-- ##### MACRO G_GNUC_CONST ##### -->
77 <para>
78 Expands to the GNU C const function attribute if the compiler is GNU C.
79 This enables optimization of the function.
80 See the GNU C documentation for details. 
81 </para>
82
83
84
85 <!-- ##### MACRO G_GNUC_NORETURN ##### -->
86 <para>
87 Expands to the GNU C noreturn function attribute if the compiler is GNU C.
88 It is used for declaring functions which never return.
89 It enables optimization of the function, and avoids possible compiler
90 warnings. See the GNU C documentation for details. 
91 </para>
92
93
94
95 <!-- ##### MACRO G_GNUC_UNUSED ##### -->
96 <para>
97 Expands to the GNU C unused function attribute if the compiler is GNU C.
98 It is used for declaring functions which may never be used.
99 It avoids possible compiler warnings. See the GNU C documentation for details. 
100 </para>
101
102
103
104 <!-- ##### MACRO G_GNUC_PRINTF ##### -->
105 <para>
106 Expands to the GNU C format function attribute if the compiler is GNU C.
107 This is used for declaring functions which take a variable number of
108 arguments, with the same syntax as <function>printf()</function>.
109 It allows the compiler to type-check the arguments passed to the function.
110 See the GNU C documentation for details. 
111 </para>
112
113 @format_idx: the index of the argument corresponding to the format string.
114 (The arguments are numbered from 1).
115 @arg_idx: the index of the first of the format arguments.
116
117
118 <!-- ##### MACRO G_GNUC_SCANF ##### -->
119 <para>
120 Expands to the GNU C format function attribute if the compiler is GNU C.
121 This is used for declaring functions which take a variable number of
122 arguments, with the same syntax as <function>scanf()</function>.
123 It allows the compiler to type-check the arguments passed to the function.
124 See the GNU C documentation for details. 
125 </para>
126
127 @format_idx: the index of the argument corresponding to the format string.
128 (The arguments are numbered from 1).
129 @arg_idx: the index of the first of the format arguments.
130
131
132 <!-- ##### MACRO G_GNUC_FORMAT ##### -->
133 <para>
134 Expands to the GNU C format_arg function attribute if the compiler is GNU C.
135 This is used for declaring functions which take a variable number of
136 parameters, like <function>printf()</function> and
137 <function>scanf()</function>. See the GNU C documentation for details. 
138
139 FIXME: I can't find this in my GNU C documentation. Take out?
140 </para>
141
142 @arg_idx: the index of the argument.
143
144
145 <!-- ##### MACRO G_GNUC_FUNCTION ##### -->
146 <para>
147 Expands to the GNU C __FUNCTION__ variable if the compiler is GNU C,
148 or "" if it isn't.
149 The GNU C __FUNCTION__ variable contains the name of the current function.
150 See the GNU C documentation for details. 
151 </para>
152
153
154
155 <!-- ##### MACRO G_GNUC_PRETTY_FUNCTION ##### -->
156 <para>
157 Expands to the GNU C __PRETTY_FUNCTION__ variable if the compiler is GNU C,
158 or "" if it isn't.
159 The GNU C __PRETTY_FUNCTION__ variable contains the name of the current
160 function. For a C program this is the same as the __FUNCTION__ variable
161 but for C++ it also includes extra information such as the class
162 and function prototype. See the GNU C documentation for details. 
163 </para>
164
165
166
167 <!-- ##### MACRO G_STRLOC ##### -->
168 <para>
169
170 </para>
171
172
173
174 <!-- ##### MACRO G_GINT16_FORMAT ##### -->
175 <para>
176
177 </para>
178
179
180
181 <!-- ##### MACRO G_GUINT16_FORMAT ##### -->
182 <para>
183
184 </para>
185
186
187
188 <!-- ##### MACRO G_GINT32_FORMAT ##### -->
189 <para>
190
191 </para>
192
193
194
195 <!-- ##### MACRO G_GUINT32_FORMAT ##### -->
196 <para>
197
198 </para>
199
200
201
202 <!-- ##### MACRO G_GINT64_FORMAT ##### -->
203 <para>
204
205 </para>
206
207
208
209 <!-- ##### MACRO G_GUINT64_FORMAT ##### -->
210 <para>
211
212 </para>
213
214
215