Update C-Libc.xml - typos, title case

This commit is contained in:
Mirek Jahoda 2017-10-23 14:46:34 +00:00
parent 6f40b81eb0
commit ab317f970c

View file

@ -2,10 +2,10 @@
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
<section id="sect-Defensive_Coding-C-Libc">
<title>The C standard library</title>
<title>The C Standard Library</title>
<para>
Parts of the C standard library (and the UNIX and GNU extensions)
are difficult to use, so you shoud avoid them.
are difficult to use, so you should avoid them.
</para>
<para>
Please check the applicable documentation before using the
@ -14,7 +14,7 @@
deallocate explicitly using <function>free</function>.
</para>
<section id="sect-Defensive_Coding-C-Absolutely-Banned">
<title>Absolutely banned interfaces</title>
<title>Absolutely Banned Interfaces</title>
<para>
The functions listed below must not be used because they are
almost always unsafe. Use the indicated replacements instead.
@ -92,7 +92,7 @@
</itemizedlist>
</section>
<section id="sect-Defensive_Coding-C-Avoid">
<title>Functions to avoid</title>
<title>Functions to Avoid</title>
<para>
The following string manipulation functions can be used securely
in principle, but their use should be avoided because they are
@ -167,7 +167,7 @@
</itemizedlist>
</section>
<section id="sect-Defensive_Coding-C-String-Functions-Length">
<title>String Functions With Explicit Length Arguments</title>
<title>String Functions with Explicit Length Arguments</title>
<para>
The C run-time library provides string manipulation functions
which not just look for NUL characters for string termination,
@ -204,7 +204,7 @@
that adding the result of <function>snprintf</function> to the
buffer pointer to skip over the characters just written is
incorrect and risky. However, as long as the length argument
is not zero, the buffer will remain NUL-terminated. <xref
is not zero, the buffer will remain null-terminated. <xref
linkend="ex-Defensive_Coding-C-String-Functions-snprintf-incremental"/>
works because <literal>end -current &gt; 0</literal> is a loop
invariant. After the loop, the result string is in the
@ -231,7 +231,7 @@
</para>
</section>
<section id="sect-Defensive_Coding-C-Libc-vsnprintf">
<title><literal>vsnprintf</literal> and format strings</title>
<title><literal>vsnprintf</literal> and Format Strings</title>
<para>
If you use <function>vsnprintf</function> (or
<function>vasprintf</function> or even
@ -252,7 +252,7 @@
<title><function>strncpy</function></title>
<para>
The <function>strncpy</function> function does not ensure that
the target buffer is NUL-terminated. A common idiom for
the target buffer is null-terminated. A common idiom for
ensuring NUL termination is:
</para>
<informalexample>