Document the recently deprecated functions as such.
[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_BEGIN_DECLS ##### -->
43 <para>
44
45 </para>
46
47
48
49 <!-- ##### MACRO G_END_DECLS ##### -->
50 <para>
51
52 </para>
53
54
55
56 <!-- ##### MACRO G_N_ELEMENTS ##### -->
57 <para>
58
59 </para>
60
61 @arr: 
62
63
64 <!-- ##### MACRO G_VA_COPY ##### -->
65 <para>
66 Portable way to copy <type>va_list</type> variables.
67 </para>
68
69 @ap1: the <type>va_list</type> variable to place a copy of @ap2 in.
70 @ap2: a <type>va_list</type>.
71
72
73 <!-- ##### MACRO G_STRINGIFY ##### -->
74 <para>
75
76 </para>
77
78 @macro_or_string: 
79
80
81 <!-- ##### MACRO G_GNUC_EXTENSION ##### -->
82 <para>
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.
86 </para>
87
88
89
90 <!-- ##### MACRO G_GNUC_CONST ##### -->
91 <para>
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. 
95 </para>
96
97
98
99 <!-- ##### MACRO G_GNUC_NORETURN ##### -->
100 <para>
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. 
105 </para>
106
107
108
109 <!-- ##### MACRO G_GNUC_UNUSED ##### -->
110 <para>
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. 
114 </para>
115
116
117
118 <!-- ##### MACRO G_GNUC_PURE ##### -->
119 <para>
120
121 </para>
122
123
124
125 <!-- ##### MACRO G_GNUC_PRINTF ##### -->
126 <para>
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. 
132 </para>
133
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.
137
138
139 <!-- ##### MACRO G_GNUC_SCANF ##### -->
140 <para>
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. 
146 </para>
147
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.
151
152
153 <!-- ##### MACRO G_GNUC_FORMAT ##### -->
154 <para>
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. 
159
160 FIXME: I can't find this in my GNU C documentation. Take out?
161 </para>
162
163 @arg_idx: the index of the argument.
164
165
166 <!-- ##### MACRO G_GNUC_FUNCTION ##### -->
167 <para>
168 Expands to the GNU C __FUNCTION__ variable if the compiler is GNU C,
169 or "" if it isn't.
170 The GNU C __FUNCTION__ variable contains the name of the current function.
171 See the GNU C documentation for details. 
172 </para>
173
174
175
176 <!-- ##### MACRO G_GNUC_PRETTY_FUNCTION ##### -->
177 <para>
178 Expands to the GNU C __PRETTY_FUNCTION__ variable if the compiler is GNU C,
179 or "" if it isn't.
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. 
184 </para>
185
186
187
188 <!-- ##### MACRO G_STRLOC ##### -->
189 <para>
190
191 </para>
192
193
194
195 <!-- ##### MACRO G_GINT16_FORMAT ##### -->
196 <para>
197
198 </para>
199
200
201
202 <!-- ##### MACRO G_GUINT16_FORMAT ##### -->
203 <para>
204
205 </para>
206
207
208
209 <!-- ##### MACRO G_GINT32_FORMAT ##### -->
210 <para>
211
212 </para>
213
214
215
216 <!-- ##### MACRO G_GUINT32_FORMAT ##### -->
217 <para>
218
219 </para>
220
221
222
223 <!-- ##### MACRO G_GINT64_FORMAT ##### -->
224 <para>
225
226 </para>
227
228
229
230 <!-- ##### MACRO G_GUINT64_FORMAT ##### -->
231 <para>
232
233 </para>
234
235
236