This file is indexed.

/usr/share/gtk-doc/html/libxfce4util/libxfce4util-Miscellaneous-Utilities.html is in libxfce4util-dev 4.10.1-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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Miscellaneous Utilities</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libxfce4util Reference Manual">
<link rel="up" href="libxfce4util-utilities.html" title="Xfce Utilities">
<link rel="prev" href="libxfce4util-File-Utilities.html" title="File Utilities">
<link rel="next" href="libxfce4util-Unicode-Support-Functions.html" title="Unicode Manipulation">
<meta name="generator" content="GTK-Doc V1.18 (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="libxfce4util-File-Utilities.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libxfce4util-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></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">libxfce4util Reference Manual</th>
<td><a accesskey="n" href="libxfce4util-Unicode-Support-Functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libxfce4util-Miscellaneous-Utilities.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libxfce4util-Miscellaneous-Utilities.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libxfce4util-Miscellaneous-Utilities"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libxfce4util-Miscellaneous-Utilities.top_of_page"></a>Miscellaneous Utilities</span></h2>
<p>Miscellaneous Utilities — Miscellaneous utility functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libxfce4util-Miscellaneous-Utilities.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libxfce4util/libxfce4util.h&gt;

const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-get-homedir" title="xfce_get_homedir ()">xfce_get_homedir</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
#define             <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-get-homefile" title="xfce_get_homefile()">xfce_get_homefile</a>                   (...)
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-get-homefile-r" title="xfce_get_homefile_r ()">xfce_get_homefile_r</a>                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> length</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-get-userdir" title="xfce_get_userdir ()">xfce_get_userdir</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
#define             <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-get-userfile" title="xfce_get_userfile()">xfce_get_userfile</a>                   (...)
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-get-userfile-r" title="xfce_get_userfile_r ()">xfce_get_userfile_r</a>                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> length</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-strjoin" title="xfce_strjoin ()">xfce_strjoin</a>                        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *separator</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **strings</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> count</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-gethostname" title="xfce_gethostname ()">xfce_gethostname</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-putenv" title="xfce_putenv ()">xfce_putenv</a>                         (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-setenv" title="xfce_setenv ()">xfce_setenv</a>                         (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> overwrite</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-unsetenv" title="xfce_unsetenv ()">xfce_unsetenv</a>                       (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-expand-variables" title="xfce_expand_variables ()">xfce_expand_variables</a>               (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *command</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **envp</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libxfce4util-Miscellaneous-Utilities.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="libxfce4util-Miscellaneous-Utilities.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="xfce-get-homedir"></a><h3>xfce_get_homedir ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       xfce_get_homedir                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Similar to <code class="function">g_get_homedir()</code> in functionality but will never return NULL.
While <code class="function">g_get_homedir()</code> may return NULL under certain circumstances, this
function is garantied to never ever return NULL, but always return a
valid character pointer with the absolute path to the user's home directory.
</p>
<p>
The returned string is owned by libxfce4util and must not be freed by
the caller.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the path to the current user's home directory.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-get-homefile"></a><h3>xfce_get_homefile()</h3>
<pre class="programlisting">#define             xfce_get_homefile(...)</pre>
<p>
Returns the path to a file in the user's home directory by taking a
NULL terminated list of strings and appending them to the absolute
path of the current user's home directory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the absolute path to the specified file in the current user's
home directory. The caller is responsible for freeing the
returned string using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-get-homefile-r"></a><h3>xfce_get_homefile_r ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             xfce_get_homefile_r                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> length</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Similar in functionality to <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-get-homefile" title="xfce_get_homefile()"><span class="type">xfce_get_homefile</span></a>, but uses a user
defined <em class="parameter"><code>buffer</code></em> instead of allocating a new buffer.
</p>
<p>
xfce_get_homefile_r uses safe string operations, that says, it garanties
that the resulting string is always zero terminated, as long as the
<em class="parameter"><code>length</code></em> is greater than zero.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>pointer to a user provided destination buffer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em> in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>printf style format string.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to <em class="parameter"><code>buffer</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-get-userdir"></a><h3>xfce_get_userdir ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       xfce_get_userdir                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Safe way to retrieve the path to the user's ".xfce4" directory. The path
to the current user's ".xfce4" directory is either taken from the
environment variable XFCE4HOME if defined, or if unset, is gained by
concatenating the path to the user's home directory and the ".xfce4".
That says, it will, by default, return the path "$HOME/.xfce4", where
$HOME is replaced with the absolute path to the user's home directory.
</p>
<p>
The returned string is managed by libxfce4util and must not be freed by
the caller.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the path to the current user's ".xfce4" directory.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-get-userfile"></a><h3>xfce_get_userfile()</h3>
<pre class="programlisting">#define             xfce_get_userfile(...)</pre>
<p>
Returns the absolute path to a file within the user's ".xfce4" directory,
formed by a NULL terminated list of path components.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the absolute path to the specified file in the user's ".xfce4"
directory. The caller is responsible for freeing the returned
string using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-get-userfile-r"></a><h3>xfce_get_userfile_r ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             xfce_get_userfile_r                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">size_t</span> length</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>user provided destination buffer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em> in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>printf style format string.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>pointer to <em class="parameter"><code>buffer</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-strjoin"></a><h3>xfce_strjoin ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             xfce_strjoin                        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *separator</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **strings</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> count</code></em>);</pre>
<p>
Joins the <em class="parameter"><code>count</code></em> character strings pointed to by <em class="parameter"><code>strings</code></em> using <em class="parameter"><code>separator</code></em>
to a single string.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the joined string. The string has to be freed by the caller
using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer needed.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-gethostname"></a><h3>xfce_gethostname ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             xfce_gethostname                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Portable way to query the hostname of the node running the process. This
function does not ever return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, but always returns a string containing
the current node's hostname.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the current node's hostname. The string has to be freed
by the caller using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-putenv"></a><h3>xfce_putenv ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                xfce_putenv                         (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<p>
Portable replacement for the Unix <code class="function">putenv()</code> library function. <em class="parameter"><code>string</code></em> has
to have the form "name=value". Calling <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-putenv" title="xfce_putenv ()"><code class="function">xfce_putenv()</code></a> this way is equal to
calling xfce_setenv("name", "value", <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>Character string in the form "name=value".</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 if the operation was successful; otherwise the global
variable errno is set to indicate the error and a value
of -1 is returned.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="xfce-setenv"></a><h3>xfce_setenv ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                xfce_setenv                         (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> overwrite</code></em>);</pre>
<p>
If the variable <em class="parameter"><code>name</code></em> does not exists in the list of environment variables,
it is inserted with its value being set to <em class="parameter"><code>value</code></em>. If the variable does
exist, then its value is only changed to <em class="parameter"><code>value</code></em> if <em class="parameter"><code>overwrite</code></em> is TRUE.
</p>
<p>
On plattforms that provide a working native <code class="function">setenv()</code> library call, this
functions is used, on all other plattforms <code class="function">setenv()</code> is emulated using
<a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-putenv" title="xfce_putenv ()"><code class="function">xfce_putenv()</code></a>. That says, <a class="link" href="libxfce4util-Miscellaneous-Utilities.html#xfce-setenv" title="xfce_setenv ()"><code class="function">xfce_setenv()</code></a> is not subject to the limitations
that apply to some <code class="function">setenv()</code> implementations and seem also to apply to
<a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-setenv"><code class="function">g_setenv()</code></a> in Glib 2.4.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the environment variable to set, must not contain '='.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the value to set the variable to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>overwrite</code></em> :</span></p></td>
<td>whether to change the variable if it already exists.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 if the operation was successful; otherwise the global
variable errno is set to indicate the error and a value
of -1 is returned.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="xfce-unsetenv"></a><h3>xfce_unsetenv ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_unsetenv                       (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Deletes all instances of the variables <em class="parameter"><code>name</code></em> from the list of environment
variables in the current process.
</p>
<p>
Note that on some systems, the memory used for the variable and its value
can't be reclaimed. Furthermore, this function can't be guaranteed to
operate in a threadsafe way.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the environment variable to unset, must not contain '='.</td>
</tr></tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
<hr>
<div class="refsect2">
<a name="xfce-expand-variables"></a><h3>xfce_expand_variables ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             xfce_expand_variables               (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *command</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **envp</code></em>);</pre>
<p>
Expands shell like environment variables and tilde (~/ and ~user/ are both supported)
in <em class="parameter"><code>command</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>command</code></em> :</span></p></td>
<td>Input string or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>envp</code></em> :</span></p></td>
<td>Addition environment variables to take into account. These
variables have higher priority than the ones in the process's
environment.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error, else the string, which should be freed using
<a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when no longer needed.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 4.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>