This file is indexed.

/usr/share/doc/libcpl-doc/html/group__cpl__memory.html is in libcpl-doc 5.3.1-1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Common Pipeline Library Reference Manual: Memory Management Utilities</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Common Pipeline Library Reference Manual
   &#160;<span id="projectnumber">5.3.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Memory Management Utilities</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b">cpl_calloc</a> (size_t natoms, size_t nbytes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate memory for <em>natoms</em> elements of size <em>size</em>.  <a href="#gab672473d6f7d0d933e06c2e8c456bd3b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free</a> (void *memblk)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory block deallocation.  <a href="#ga9cd2b64cbbe05ec9f34fda048184b4d1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc</a> (size_t nbytes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate <em>nbytes</em> bytes.  <a href="#gac884edcb0a592489c65239d0e5d08785"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#gaa49a2411c4d105496339ec16c4ec8454">cpl_memory_dump</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Display the memory status.  <a href="#gaa49a2411c4d105496339ec16c4ec8454"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#gaa2af849ae6fd8bcda2c0e40f303e061c">cpl_memory_is_empty</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell if there is some memory allocated.  <a href="#gaa2af849ae6fd8bcda2c0e40f303e061c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#ga561426268e5649bd6a44bf14a98ca9e6">cpl_realloc</a> (void *memblk, size_t nbytes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the size of a memory block.  <a href="#ga561426268e5649bd6a44bf14a98ca9e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#ga3182acba4528fb26736337aadfb839de">cpl_sprintf</a> (const char *format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a string and fill it in an sprintf()-like manner.  <a href="#ga3182acba4528fb26736337aadfb839de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#ga1301bd6ea92c85b1a7d9430e51f001e8">cpl_strdup</a> (const char *string)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Duplicate a string.  <a href="#ga1301bd6ea92c85b1a7d9430e51f001e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpl__memory.html#ga4c29acd31d316ab5df487c129fe1bf90">cpl_vsprintf</a> (const char *format, va_list arglist)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a string and fill it in an vsprintf()-like manner.  <a href="#ga4c29acd31d316ab5df487c129fe1bf90"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>This module provides the CPL memory management utilities. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gab672473d6f7d0d933e06c2e8c456bd3b"></a><!-- doxytag: member="cpl_memory.c::cpl_calloc" ref="gab672473d6f7d0d933e06c2e8c456bd3b" args="(size_t natoms, size_t nbytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* <a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b">cpl_calloc</a> </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>natoms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nbytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocate memory for <em>natoms</em> elements of size <em>size</em>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">natoms</td><td>Number of atomic elements. </td></tr>
    <tr><td class="paramname">nbytes</td><td>Element size in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the allocated memory block.</dd></dl>
<p>The function allocates memory suitable for storage of <em>natoms</em> elements of size <em>nbytes</em> bytes. The allocated memory is cleared, i.e. the value 0 is written to each single byte.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>If the memory subsytem has not been initialised before calling this function, the program execution is stopped printing a message to the error channel showing the current code position. </dd></dl>

</div>
</div>
<a class="anchor" id="ga9cd2b64cbbe05ec9f34fda048184b4d1"></a><!-- doxytag: member="cpl_memory.c::cpl_free" ref="ga9cd2b64cbbe05ec9f34fda048184b4d1" args="(void *memblk)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1">cpl_free</a> </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>memblk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Memory block deallocation. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing.</dd></dl>
<p>Deallocates a memory block previously allocated by any of the CPL allocator functions.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785" title="Allocate nbytes bytes.">cpl_malloc()</a>, <a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b" title="Allocate memory for natoms elements of size size.">cpl_calloc()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gac884edcb0a592489c65239d0e5d08785"></a><!-- doxytag: member="cpl_memory.c::cpl_malloc" ref="gac884edcb0a592489c65239d0e5d08785" args="(size_t nbytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* <a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785">cpl_malloc</a> </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nbytes</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocate <em>nbytes</em> bytes. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">nbytes</td><td>Number of bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the allocated memory block.</dd></dl>
<p>The function allocates <em>nbytes</em> bytes of memory. The allocated memory is not cleared.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>If the memory subsytem has not been initialised before calling this function, the program execution is stopped printing a message to the error channel showing the current code position. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa49a2411c4d105496339ec16c4ec8454"></a><!-- doxytag: member="cpl_memory.c::cpl_memory_dump" ref="gaa49a2411c4d105496339ec16c4ec8454" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cpl__memory.html#gaa49a2411c4d105496339ec16c4ec8454">cpl_memory_dump</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Display the memory status. </p>

</div>
</div>
<a class="anchor" id="gaa2af849ae6fd8bcda2c0e40f303e061c"></a><!-- doxytag: member="cpl_memory.c::cpl_memory_is_empty" ref="gaa2af849ae6fd8bcda2c0e40f303e061c" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__cpl__memory.html#gaa2af849ae6fd8bcda2c0e40f303e061c">cpl_memory_is_empty</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tell if there is some memory allocated. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if the model is off, 1 if it is empty, 0 otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="ga561426268e5649bd6a44bf14a98ca9e6"></a><!-- doxytag: member="cpl_memory.c::cpl_realloc" ref="ga561426268e5649bd6a44bf14a98ca9e6" args="(void *memblk, size_t nbytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* <a class="el" href="group__cpl__memory.html#ga561426268e5649bd6a44bf14a98ca9e6">cpl_realloc</a> </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>memblk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nbytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Change the size of a memory block. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">memblk</td><td>Pointer to the memory to re-allocate. </td></tr>
    <tr><td class="paramname">nbytes</td><td>New memory block size in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the allocated memory block.</dd></dl>
<p>The function changes the size of an already allocated memory block <em>memblk</em> to the new size <em>nbytes</em> bytes. The contents is unchanged to the minimum of old and new size; newly allocated memory is not initialized. If <em>memblk</em> is <code>NULL</code> the call to <b><a class="el" href="group__cpl__memory.html#ga561426268e5649bd6a44bf14a98ca9e6" title="Change the size of a memory block.">cpl_realloc()</a></b> is equivalent to <b><a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785" title="Allocate nbytes bytes.">cpl_malloc()</a></b>, and if <em>nbytes</em> is 0 the call is equivalent to <b><a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1" title="Memory block deallocation.">cpl_free()</a></b>. Unless <em>memblk</em> is <code>NULL</code>, it must have been returned by a previous call to <b><a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785" title="Allocate nbytes bytes.">cpl_malloc()</a></b>, <b><a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b" title="Allocate memory for natoms elements of size size.">cpl_calloc()</a></b>, or <b><a class="el" href="group__cpl__memory.html#ga561426268e5649bd6a44bf14a98ca9e6" title="Change the size of a memory block.">cpl_realloc()</a></b>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd><ul>
<li>The returned memory block returned on successfull allocation may not be the same as the one pointed to by <em>memblk</em>. Existing references pointing to locations within the original memory block might be invalidated!</li>
<li>If the memory subsytem has not been initialised before calling this function, the program execution is stopped printing a message to the error channel showing the current code position.</li>
</ul>
</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__cpl__memory.html#gac884edcb0a592489c65239d0e5d08785" title="Allocate nbytes bytes.">cpl_malloc()</a>, <a class="el" href="group__cpl__memory.html#gab672473d6f7d0d933e06c2e8c456bd3b" title="Allocate memory for natoms elements of size size.">cpl_calloc()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga3182acba4528fb26736337aadfb839de"></a><!-- doxytag: member="cpl_memory.c::cpl_sprintf" ref="ga3182acba4528fb26736337aadfb839de" args="(const char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="group__cpl__memory.html#ga3182acba4528fb26736337aadfb839de">cpl_sprintf</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a string and fill it in an sprintf()-like manner. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">format</td><td>The format string </td></tr>
    <tr><td class="paramname">...</td><td>Variable argument list for format </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The created string or NULL on error </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The created string must be deallocated with <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1" title="Memory block deallocation.">cpl_free()</a> </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__cpl__memory.html#ga4c29acd31d316ab5df487c129fe1bf90" title="Create a string and fill it in an vsprintf()-like manner.">cpl_vsprintf()</a></dd></dl>
<p>The allocated memory is exactly what is needed to hold the string.</p>
<dl width="100%">
<dt><b>Errors:</b></dt>
<dd></dd>
<dt></dt>
<dd><table  class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The format string is <code>NULL</code>.   </td></tr>
<tr>
<td class="ecl">CPL_ERROR_ILLEGAL_INPUT </td><td class="ecr">The format string has an invalid format.   </td></tr>
</table>
</dd>
</dl>
<p>Example of usage: </p>
<div class="fragment"><pre class="fragment">      <span class="keywordtype">int</span> error;

      <span class="keywordtype">char</span> * cp_cmd = <a class="code" href="group__cpl__memory.html#ga3182acba4528fb26736337aadfb839de" title="Create a string and fill it in an sprintf()-like manner.">cpl_sprintf</a>(<span class="stringliteral">&quot;cp %s %s/%s&quot;</span>, long_file, new_dir,
                                                    new_file);
      assert( cp_cmd != NULL);

      error = system(cp_cmd);

      assert(!error);

      <a class="code" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1" title="Memory block deallocation.">cpl_free</a>(cp_cmd);
</pre></div> 
</div>
</div>
<a class="anchor" id="ga1301bd6ea92c85b1a7d9430e51f001e8"></a><!-- doxytag: member="cpl_memory.c::cpl_strdup" ref="ga1301bd6ea92c85b1a7d9430e51f001e8" args="(const char *string)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="group__cpl__memory.html#ga1301bd6ea92c85b1a7d9430e51f001e8">cpl_strdup</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>string</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Duplicate a string. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>String to be duplicated.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Newly allocated copy of the original string.</dd></dl>
<p>Duplicates the input string <em>string</em>. The newly allocated copy returned to the caller can be deallocated using <b><a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1" title="Memory block deallocation.">cpl_free()</a></b>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1" title="Memory block deallocation.">cpl_free()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga4c29acd31d316ab5df487c129fe1bf90"></a><!-- doxytag: member="cpl_memory.c::cpl_vsprintf" ref="ga4c29acd31d316ab5df487c129fe1bf90" args="(const char *format, va_list arglist)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="group__cpl__memory.html#ga4c29acd31d316ab5df487c129fe1bf90">cpl_vsprintf</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arglist</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a string and fill it in an vsprintf()-like manner. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">format</td><td>The format string </td></tr>
    <tr><td class="paramname">arglist</td><td>The argument list for the format </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The created string or NULL on error </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The created string must be deallocated with <a class="el" href="group__cpl__memory.html#ga9cd2b64cbbe05ec9f34fda048184b4d1" title="Memory block deallocation.">cpl_free()</a> </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>vsprintf()</dd></dl>
<p>The allocated memory is exactly what is needed to hold the string.</p>
<dl width="100%">
<dt><b>Errors:</b></dt>
<dd></dd>
<dt></dt>
<dd><table  class="ec" align="center">
<tr>
<td class="ecl">CPL_ERROR_NULL_INPUT </td><td class="ecr">The format string is <code>NULL</code>.   </td></tr>
<tr>
<td class="ecl">CPL_ERROR_ILLEGAL_INPUT </td><td class="ecr">The format string has an invalid format.   </td></tr>
</table>
</dd>
</dl>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 29 2011 09:56:18 for Common Pipeline Library Reference Manual by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>