mirror of
https://github.com/troydhanson/tpl.git
synced 2024-12-26 23:57:25 +08:00
Fix typos
This commit is contained in:
parent
a6d734c900
commit
fd3a3e7430
@ -1934,7 +1934,7 @@ characters that are not inside an <tt>A(...)</tt>, such as the <tt>i</tt> in the
|
|||||||
<div class="paragraph"><p>For variable-length arrays, each call to <tt>tpl_unpack()</tt> unpacks another element.
|
<div class="paragraph"><p>For variable-length arrays, each call to <tt>tpl_unpack()</tt> unpacks another element.
|
||||||
The return value can be used to tell when you’re done: if it’s positive, an
|
The return value can be used to tell when you’re done: if it’s positive, an
|
||||||
element was unpacked; if it’s 0, nothing was unpacked because there are no more
|
element was unpacked; if it’s 0, nothing was unpacked because there are no more
|
||||||
elements. A negative retun value indicates an error (e.g. invalid index number).
|
elements. A negative return value indicates an error (e.g. invalid index number).
|
||||||
In this document, we usually unpack variable-length arrays using a <tt>while</tt> loop:</p></div>
|
In this document, we usually unpack variable-length arrays using a <tt>while</tt> loop:</p></div>
|
||||||
<div class="literalblock">
|
<div class="literalblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@ -1990,7 +1990,7 @@ run, this program prints:</p></div>
|
|||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="tpl_free">tpl_free</h3>
|
<h3 id="tpl_free">tpl_free</h3>
|
||||||
<div class="paragraph"><p>The final step for any tpl is to release it using <tt>tpl_free()</tt>. Its only
|
<div class="paragraph"><p>The final step for any tpl is to release it using <tt>tpl_free()</tt>. Its only
|
||||||
argument is the the <tt>tpl_node*</tt> to free.</p></div>
|
argument is the <tt>tpl_node*</tt> to free.</p></div>
|
||||||
<div class="literalblock">
|
<div class="literalblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre><tt>tpl_free( tn );</tt></pre>
|
<pre><tt>tpl_free( tn );</tt></pre>
|
||||||
@ -2011,7 +2011,7 @@ current number of elements; it will decrease as elements are unpacked).</p></div
|
|||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="tpl_peek">tpl_peek</h3>
|
<h3 id="tpl_peek">tpl_peek</h3>
|
||||||
<div class="paragraph"><p>This function peeks into a file or a memory buffer containing a tpl image and
|
<div class="paragraph"><p>This function peeks into a file or a memory buffer containing a tpl image
|
||||||
and returns a copy of its format string. It can also peek at the lengths of
|
and returns a copy of its format string. It can also peek at the lengths of
|
||||||
any fixed-length arrays in the format string, or it can also peek into the data
|
any fixed-length arrays in the format string, or it can also peek into the data
|
||||||
stored in the tpl.</p></div>
|
stored in the tpl.</p></div>
|
||||||
|
@ -900,7 +900,7 @@ Unpacking elements from an array
|
|||||||
For variable-length arrays, each call to `tpl_unpack()` unpacks another element.
|
For variable-length arrays, each call to `tpl_unpack()` unpacks another element.
|
||||||
The return value can be used to tell when you're done: if it's positive, an
|
The return value can be used to tell when you're done: if it's positive, an
|
||||||
element was unpacked; if it's 0, nothing was unpacked because there are no more
|
element was unpacked; if it's 0, nothing was unpacked because there are no more
|
||||||
elements. A negative retun value indicates an error (e.g. invalid index number).
|
elements. A negative return value indicates an error (e.g. invalid index number).
|
||||||
In this document, we usually unpack variable-length arrays using a `while` loop:
|
In this document, we usually unpack variable-length arrays using a `while` loop:
|
||||||
|
|
||||||
while( tpl_unpack( tn, 1 ) > 0 ) {
|
while( tpl_unpack( tn, 1 ) > 0 ) {
|
||||||
@ -954,7 +954,7 @@ run, this program prints:
|
|||||||
tpl_free
|
tpl_free
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
The final step for any tpl is to release it using `tpl_free()`. Its only
|
The final step for any tpl is to release it using `tpl_free()`. Its only
|
||||||
argument is the the `tpl_node*` to free.
|
argument is the `tpl_node*` to free.
|
||||||
|
|
||||||
tpl_free( tn );
|
tpl_free( tn );
|
||||||
|
|
||||||
@ -975,7 +975,7 @@ current number of elements; it will decrease as elements are unpacked).
|
|||||||
[[tpl_peek]]
|
[[tpl_peek]]
|
||||||
tpl_peek
|
tpl_peek
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
This function peeks into a file or a memory buffer containing a tpl image and
|
This function peeks into a file or a memory buffer containing a tpl image
|
||||||
and returns a copy of its format string. It can also peek at the lengths of
|
and returns a copy of its format string. It can also peek at the lengths of
|
||||||
any fixed-length arrays in the format string, or it can also peek into the data
|
any fixed-length arrays in the format string, or it can also peek into the data
|
||||||
stored in the tpl.
|
stored in the tpl.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user