This file is indexed.

/usr/share/gtk-doc/html/libgwyddion/libgwyddion-gwymacros.html is in libgwyddion20-doc 2.26-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gwymacros</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="prev" href="GwyContainer.html" title="GwyContainer">
<link rel="next" href="libgwyddion-gwyddion.html" title="gwyddion">
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GwyContainer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td> </td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Gwyddion Library Reference Manual</th>
<td><a accesskey="n" href="libgwyddion-gwyddion.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgwyddion-gwymacros.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libgwyddion-gwymacros.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libgwyddion-gwymacros"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwyddion-gwymacros.top_of_page"></a>gwymacros</span></h2>
<p>gwymacros — Utility macros</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgwyddion-gwymacros.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libgwyddion/gwyddion.h&gt;

#define             <a class="link" href="libgwyddion-gwymacros.html#GWY-CLAMP:CAPS" title="GWY_CLAMP()">GWY_CLAMP</a>                           (x,
                                                         low,
                                                         hi)
#define             <a class="link" href="libgwyddion-gwymacros.html#GWY-FIND-PSPEC:CAPS" title="GWY_FIND_PSPEC()">GWY_FIND_PSPEC</a>                      (type,
                                                         id,
                                                         spectype)
#define             <a class="link" href="libgwyddion-gwymacros.html#GWY-SWAP:CAPS" title="GWY_SWAP()">GWY_SWAP</a>                            (t,
                                                         x,
                                                         y)
#define             <a class="link" href="libgwyddion-gwymacros.html#N-:CAPS" title="N_()">N_</a>                                  (x)
#define             <a class="link" href="libgwyddion-gwymacros.html#gettext-macro" title="_()">_</a>                                   (x)
#define             <a class="link" href="libgwyddion-gwymacros.html#gettext" title="gettext()">gettext</a>                             (x)
#define             <a class="link" href="libgwyddion-gwymacros.html#gwy-clear" title="gwy_clear()">gwy_clear</a>                           (array,
                                                         n)
#define             <a class="link" href="libgwyddion-gwymacros.html#gwy-debug" title="gwy_debug()">gwy_debug</a>                           (...)
<span class="returnvalue">void</span>                <a class="link" href="libgwyddion-gwymacros.html#gwy-debug-gnu" title="gwy_debug_gnu ()">gwy_debug_gnu</a>                       (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fileline</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *funcname</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
#define             <a class="link" href="libgwyddion-gwymacros.html#gwy-object-unref" title="gwy_object_unref()">gwy_object_unref</a>                    (obj)
#define             <a class="link" href="libgwyddion-gwymacros.html#gwy-signal-handler-disconnect" title="gwy_signal_handler_disconnect()">gwy_signal_handler_disconnect</a>       (obj,
                                                         hid)
#define             <a class="link" href="libgwyddion-gwymacros.html#gwy-strequal" title="gwy_strequal()">gwy_strequal</a>                        (a,
                                                         b)
#define             <a class="link" href="libgwyddion-gwymacros.html#ngettext" title="ngettext()">ngettext</a>                            (sing,
                                                         plur,
                                                         n)
</pre>
</div>
<div class="refsect1">
<a name="libgwyddion-gwymacros.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libgwyddion-gwymacros.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GWY-CLAMP:CAPS"></a><h3>GWY_CLAMP()</h3>
<pre class="programlisting">#define             GWY_CLAMP(x, low, hi)</pre>
<p>
Ensures that <em class="parameter"><code>x</code></em> is between the limits set by <em class="parameter"><code>low</code></em> and <em class="parameter"><code>hi</code></em>.
</p>
<p>
This macro differs from GLib's <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#CLAMP:CAPS"><code class="function">CLAMP()</code></a> by <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Miscellaneous-Macros.html#G-UNLIKELY:CAPS"><code class="function">G_UNLIKELY()</code></a> assertions on the
tests that <em class="parameter"><code>x</code></em> is smaller than <em class="parameter"><code>low</code></em> and larger than <em class="parameter"><code>hi</code></em>.  This makes <em class="parameter"><code>x</code></em>
already being in the right range the fast code path.
</p>
<p>
It is supposed to be used on results of floating-point operations that
should fall to a known range but may occasionaly fail to due to rounding
errors and in similar situations.  Under normal circumstances, use <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#CLAMP:CAPS"><code class="function">CLAMP()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>The value to clamp.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>low</code></em> :</span></p></td>
<td>The minimum value allowed.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hi</code></em> :</span></p></td>
<td>The maximum value allowed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GWY-FIND-PSPEC:CAPS"></a><h3>GWY_FIND_PSPEC()</h3>
<pre class="programlisting">#define             GWY_FIND_PSPEC(type, id, spectype)</pre>
<p>
A convenience <a href="http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#g-object-class-find-property"><code class="function">g_object_class_find_property()</code></a> wrapper.
</p>
<p>
It expands to property spec cast to correct type (<em class="parameter"><code>spec</code></em>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>Object type (e.g. <code class="literal">GWY_TYPE_CONTAINER</code>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>Property id.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>spectype</code></em> :</span></p></td>
<td>Param spec type (e.g. <code class="literal">DOUBLE</code>).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GWY-SWAP:CAPS"></a><h3>GWY_SWAP()</h3>
<pre class="programlisting">#define             GWY_SWAP(t, x, y)</pre>
<p>
Swaps two variables (more precisely lhs and rhs expressions) of type <em class="parameter"><code>t</code></em>
in a single statement.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>t</code></em> :</span></p></td>
<td>A C type.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>A variable of type <em class="parameter"><code>t</code></em> to swap with <em class="parameter"><code>x</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>A variable of type <em class="parameter"><code>t</code></em> to swap with <em class="parameter"><code>y</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="N-:CAPS"></a><h3>N_()</h3>
<pre class="programlisting">#define N_(x) gettext_noop(x)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gettext-macro"></a><h3>_()</h3>
<pre class="programlisting">#define _(x) gettext(x)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gettext"></a><h3>gettext()</h3>
<pre class="programlisting">#define gettext(x) (x)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-clear"></a><h3>gwy_clear()</h3>
<pre class="programlisting">#define             gwy_clear(array, n)</pre>
<p>
Fills memory block representing an array with zeroes.
</p>
<p>
This is a shorthand for memset, with the number of bytes to fill calculated
from the type of the pointer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>array</code></em> :</span></p></td>
<td>Pointer to an array of values to clear.
This argument may be evaluated several times.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>Number of items to clear.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-debug"></a><h3>gwy_debug()</h3>
<pre class="programlisting">#define             gwy_debug(format...)</pre>
<p>
Prints a debugging message.
</p>
<p>
Does nothing if compiled without DEBUG defined.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>A format string followed by stuff to print.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-debug-gnu"></a><h3>gwy_debug_gnu ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_debug_gnu                       (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fileline</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *funcname</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Print a debugging message.
</p>
<p>
To be used via <a class="link" href="libgwyddion-gwymacros.html#gwy-debug" title="gwy_debug()"><code class="function">gwy_debug()</code></a>, should not be used directly.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>Log domain.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fileline</code></em> :</span></p></td>
<td>File and line info.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>funcname</code></em> :</span></p></td>
<td>Function name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>Message format.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>Message parameters.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-object-unref"></a><h3>gwy_object_unref()</h3>
<pre class="programlisting">#define             gwy_object_unref(obj)</pre>
<p>
Unreferences an object if it exists.
</p>
<p>
If <em class="parameter"><code>obj</code></em> is not <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a href="http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> is called on it.
In all cases <em class="parameter"><code>obj</code></em> is set to <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
A useful property of this macro is its idempotence.
</p>
<p>
If the object reference count is greater than one, assure it should be
referenced elsewhere, otherwise it leaks memory.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>A pointer to <a href="http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> (must be an l-value).</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-signal-handler-disconnect"></a><h3>gwy_signal_handler_disconnect()</h3>
<pre class="programlisting">#define             gwy_signal_handler_disconnect(obj, hid)</pre>
<p>
Disconnect a signal handler if it exists.
</p>
<p>
If <em class="parameter"><code>hid</code></em> is nonzero and <em class="parameter"><code>obj</code></em> is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the signal handler identified by
<em class="parameter"><code>hid</code></em> is disconnected.  In all cases <em class="parameter"><code>hid</code></em> is set to 0.
</p>
<p>
A useful property of this macro is its idempotence.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>A pointer to <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hid</code></em> :</span></p></td>
<td>An <em class="parameter"><code>obj</code></em> signal handler id or 0 (must be an l-value).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-strequal"></a><h3>gwy_strequal()</h3>
<pre class="programlisting">#define             gwy_strequal(a, b)</pre>
<p>
Expands to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if strings are equal, to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>A string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>Another string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ngettext"></a><h3>ngettext()</h3>
<pre class="programlisting">#define ngettext(sing, plur, n) ((n) == 1 ? (sing) : (plur))
</pre>
<p>
</p>
</div>
</div>
<div class="refsect1">
<a name="libgwyddion-gwymacros.see-also"></a><h2>See Also</h2>
<a class="link" href="libgwyddion-gwyutils.html" title="gwyutils">gwyutils</a> -- utility
           functions
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.8</div>
</body>
</html>