1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <title>libogg - function - oggpack_writecheck</title>
|
---|
5 | <link rel=stylesheet href="style.css" type="text/css">
|
---|
6 | </head>
|
---|
7 |
|
---|
8 | <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
---|
9 | <table border=0 width=100%>
|
---|
10 | <tr>
|
---|
11 | <td><p class=tiny>libogg documentation</p></td>
|
---|
12 | <td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
---|
13 | </tr>
|
---|
14 | </table>
|
---|
15 |
|
---|
16 | <h1>oggpack_writecheck</h1>
|
---|
17 |
|
---|
18 | <p><i>declared in "ogg/ogg.h";</i></p>
|
---|
19 |
|
---|
20 | <p>This function checks the readiness status of
|
---|
21 | an <a href="oggpack_buffer.html">oggpack_buffer</a> previously
|
---|
22 | initialized for writing using the
|
---|
23 | Ogg <a href="bitpacking.html">bitpacking</a> functions. A write
|
---|
24 | buffer that encounters an error (such as a failed malloc) will clear
|
---|
25 | its internal state and release any in-use memory, flagging itself as
|
---|
26 | 'not ready'. Subsequent attempts to write using the buffer will
|
---|
27 | silently fail. This error state may be detected at any later time by
|
---|
28 | using oggpack_writecheck(). It is safe but not necessary to
|
---|
29 | call <a href="oggpack_writeclear.html">oggpack_writeclear()</a> on a buffer that
|
---|
30 | has flagged an error and released its resources.
|
---|
31 |
|
---|
32 | <p><em>Important note to developers: Although libogg checks the
|
---|
33 | results of memory allocations, these checks are only useful on a
|
---|
34 | narrow range of embedded platforms. Allocation checks perform no
|
---|
35 | useful service on a general purpose desktop OS where pages are
|
---|
36 | routinely overallocated and all allocations succeed whether memory is
|
---|
37 | available or not. The only way to detect an out of memory condition
|
---|
38 | on the vast majority of OSes is to watch for and capture segmentation
|
---|
39 | faults. This function is useful only to embedded developers.</em>
|
---|
40 |
|
---|
41 | <br><br>
|
---|
42 | <table border=0 color=black cellspacing=0 cellpadding=7>
|
---|
43 | <tr bgcolor=#cccccc>
|
---|
44 | <td>
|
---|
45 | <pre><b>
|
---|
46 | int oggpack_writecheck(<a href="oggpack_buffer.html">oggpack_buffer</a> *b);
|
---|
47 | </b></pre>
|
---|
48 | </td>
|
---|
49 | </tr>
|
---|
50 | </table>
|
---|
51 |
|
---|
52 | <h3>Parameters</h3>
|
---|
53 | <dl>
|
---|
54 | <dt><i>b</i></dt>
|
---|
55 | <dd>An <a href="oggpack_buffer.html">oggpack_buffer</a> previously initialized for writing.</dd>
|
---|
56 | </dl>
|
---|
57 |
|
---|
58 |
|
---|
59 | <h3>Return Values</h3>
|
---|
60 | <blockquote>
|
---|
61 | <li><i>zero</i>: buffer is ready for writing</li>
|
---|
62 | <li><i>nonzero</i>: buffer is not ready or encountered an error</li>
|
---|
63 | </blockquote>
|
---|
64 | <p>
|
---|
65 |
|
---|
66 | <br><br>
|
---|
67 | <hr noshade>
|
---|
68 | <table border=0 width=100%>
|
---|
69 | <tr valign=top>
|
---|
70 | <td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
---|
71 | <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
---|
72 | </tr><tr>
|
---|
73 | <td><p class=tiny>libogg documentation</p></td>
|
---|
74 | <td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
---|
75 | </tr>
|
---|
76 | </table>
|
---|
77 |
|
---|
78 |
|
---|
79 | </body>
|
---|
80 |
|
---|
81 | </html>
|
---|