File: structs.html

package info (click to toggle)
ustr 1.0.4-6.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,676 kB
  • sloc: ansic: 19,041; makefile: 935; perl: 779; sh: 686; xml: 97
file content (84 lines) | stat: -rw-r--r-- 4,360 bytes parent folder | download | duplicates (5)
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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Ustr - 1.0.4 reference documentation -- structs</title>
    <style type="text/css">
      A:visited { color: #ff4040; }
      A:hover { color: #20b2aa; }

      P { text-indent: 1em; }

      body     { background: #FFF; color: #000; }

      h2.ind   { background: #DDF; }

      td.title { background: #DFD; }
      td.sect  { background: #DDF; }
      td.obj   { background: #DDD; }

      ul li                       { list-style-type: lower-roman; }
      ul li:hover                 { list-style-type: square; }
      ul:hover li                 { list-style-type: decimal; }
      ul li:hover ul li.obj       { list-style-type: decimal; }
      ul li:hover ul li.obj:hover { list-style-type: square; }
    </style>

  </head>
  <body>
<table width="100%"><tr><td bgcolor="#DDFFDD"><h1>Ustr - 1.0.4 reference documentation -- structs (3)</h1>
</td></tr></table><table width="90%"><tr><td>
<h2 class="ind">Index of sections</h2>
<ul>
<li><a href="#indx-Members_of_Ustr_pool">Members of Ustr_pool (3)</a></ul>
<h2 class="ind">Index of sections, and their contents</h2>
<ul>
<li><a id="indx-Members_of_Ustr_pool" href="#Members_of_Ustr_pool">Members of Ustr_pool</a>
<ul>
<li class="obj"><a href="#pool_sys_malloc">pool_sys_malloc()</a>
<li class="obj"><a href="#pool_sys_realloc">pool_sys_realloc()</a>
<li class="obj"><a href="#pool_sys_free">pool_sys_free()</a>
</ul></ul>
</td></tr></table><table width="90%"><tr><td class="sect"><h2><a id="Members%20of%20Ustr_pool">Members of Ustr_pool</a></h2>
</td></tr></table><table width="80%"><tr><td class="obj">
<strong>Function: </strong> <a id="pool_sys_malloc">pool_sys_malloc()</a>
<br>Returns: Allocated data<br>Type: void *
</td></tr><tr><td>Parameter<strong>[1]</strong>: <a href="design.html#possibilities">Ustr pool</a> object<br>Type<strong>[1]</strong>: void *
</td></tr><tr><td>Parameter<strong>[2]</strong>: Length of new allocation<br>Type<strong>[2]</strong>: size_t
</td></tr><tr><td><strong>Explanation:</strong></td></tr><tr><td><p>
</p><p>  This is a callback to provide a similar usage to malloc().
</p><p>  This works like malloc() but allocates at least size (Parameter[2]) memory
 from the pool (Parameter[1]), or it returns NULL on failure.


</td></tr></table><table width="80%"><tr><td class="obj">
<strong>Function: </strong> <a id="pool_sys_realloc">pool_sys_realloc()</a>
<br>Returns: Re-allocated data<br>Type: void *
</td></tr><tr><td>Parameter<strong>[1]</strong>: <a href="design.html#possibilities">Ustr pool</a> object<br>Type<strong>[1]</strong>: void *
</td></tr><tr><td>Parameter<strong>[2]</strong>: Pointer to the old data<br>Type<strong>[2]</strong>: void *
</td></tr><tr><td>Parameter<strong>[3]</strong>: Length of old allocation<br>Type<strong>[3]</strong>: size_t
</td></tr><tr><td>Parameter<strong>[4]</strong>: Length of new allocation<br>Type<strong>[4]</strong>: size_t
</td></tr><tr><td><strong>Explanation:</strong></td></tr><tr><td><p>
</p><p>  This is a callback to provide a similar usage to realloc().
</p><p>  The Ustr <a href="functions.html#ustr_pool_make">ustr_pool_make()</a> varient works like realloc() but allocates at least
 size (Parameter[4]) memory from the pool (Parameter[1]) and copies the old
 data into it, or it returns NULL on failure.

</td></tr><tr><td><strong>Note:</strong></td></tr><tr><td><p>
</p><p>  If the old data was the last thing allocated from the pool, it might be
 resized on success.
</p><p>  If the old data was larger than the new data, the pointer to the old data is
 always returned.

</td></tr></table><table width="80%"><tr><td class="obj">
<strong>Function: </strong> <a id="pool_sys_free">pool_sys_free()</a>
<br>Returns: Nothing<br>Type: void
</td></tr><tr><td>Parameter<strong>[1]</strong>: <a href="design.html#possibilities">Ustr pool</a> object<br>Type<strong>[1]</strong>: void *
</td></tr><tr><td>Parameter<strong>[2]</strong>: Pointer to the data<br>Type<strong>[2]</strong>: void *
</td></tr><tr><td><strong>Explanation:</strong></td></tr><tr><td><p>
</p><p>  This is a callback to provide a similar usage to free().
</p><p>  The Ustr <a href="functions.html#ustr_pool_make">ustr_pool_make()</a> varient free's the data, if it was the last thing
 allocated from the pool. Otherwise it does nothing.


</td></tr></table>
</body></html>