chiark / gitweb /
Minor edits.
authormdw <mdw>
Thu, 28 Oct 1999 22:05:42 +0000 (22:05 +0000)
committermdw <mdw>
Thu, 28 Oct 1999 22:05:42 +0000 (22:05 +0000)
man/dstr.3

index d8a5b54ee76fe396edea36fe45c147c80e38bbd3..998e3f3260a3a69a8ffd04996fe91cbb66365c87 100644 (file)
@@ -81,7 +81,7 @@ dstr \- a simple dynamic string type
 .BI "void DPUTM(dstr *" d ", const void *" p ", size_t " sz );
 .BI "size_t DWRITE(const dstr *" d ", FILE *" fp );
 .fi
 .BI "void DPUTM(dstr *" d ", const void *" p ", size_t " sz );
 .BI "size_t DWRITE(const dstr *" d ", FILE *" fp );
 .fi
-.SH SUMMARY
+.SH DESCRIPTION
 The header
 .B dstr.h
 declares a type for representing dynamically extending strings, and a
 The header
 .B dstr.h
 declares a type for representing dynamically extending strings, and a
@@ -94,7 +94,7 @@ is raised.
 Many of the functions which act on dynamic strings have macro
 equivalents.  These equivalent macros may evaluate their arguments
 multiple times.
 Many of the functions which act on dynamic strings have macro
 equivalents.  These equivalent macros may evaluate their arguments
 multiple times.
-.SH "UNDERLYING TYPE"
+.SS "Underlying type"
 A
 .B dstr
 object is a small structure with the following members:
 A
 .B dstr
 object is a small structure with the following members:
@@ -159,7 +159,7 @@ element is zero) and the nonexistent string (a null pointer).  Any
 whose
 .B len
 is zero is an empty string.
 whose
 .B len
 is zero is an empty string.
-.SH "CREATION AND DESTRUCTION"
+.SS "Creation and destruction"
 The caller is responsible for allocating the
 .B dstr
 structure.  It can be initialized in any of the following ways:
 The caller is responsible for allocating the
 .B dstr
 structure.  It can be initialized in any of the following ways:
@@ -213,7 +213,7 @@ There's also a macro
 which does the same job as the
 .B dstr_reset
 function.
 which does the same job as the
 .B dstr_reset
 function.
-.SH "EXTENDING A STRING"
+.SS "Extending a string"
 All memory allocation for strings is done by the function
 .BR dstr_ensure .
 Given a pointer 
 All memory allocation for strings is done by the function
 .BR dstr_ensure .
 Given a pointer 
@@ -260,7 +260,7 @@ Firstly, the underlying allocator might just be brain-damaged enough to
 fail on reducing a block's size.  Secondly, tidying an empty string with no
 buffer allocated for it causes allocation of a buffer large enough for
 the terminating null byte.)
 fail on reducing a block's size.  Secondly, tidying an empty string with no
 buffer allocated for it causes allocation of a buffer large enough for
 the terminating null byte.)
-.SH "CONTRIBUTING DATA TO A STRING"
+.SS "Contributing data to a string"
 There are a collection of functions which add data to a string.  All of
 these functions add their new data to the
 .I end
 There are a collection of functions which add data to a string.  All of
 these functions add their new data to the
 .I end
@@ -365,14 +365,15 @@ and appends it to a string.  If an error occurs, or end-of-file is
 encountered, before any characters have been read, then
 .B dstr_putline
 returns the value
 encountered, before any characters have been read, then
 .B dstr_putline
 returns the value
-.BR EOF.
-Otherwise, it reads until it encounters a newline character, an error,
-or end-of-file, and returns the number of characters read.  If reading
-was terminated by a newline character, the newline character is
+.B EOF
+and does not extend the string.  Otherwise, it reads until it encounters
+a newline character, an error, or end-of-file, and returns the number of
+characters read.  If reading was terminated by a newline character, the
+newline character is
 .I not
 inserted in the buffer.  A terminating null is appended, as by
 .BR dstr_putz .
 .I not
 inserted in the buffer.  A terminating null is appended, as by
 .BR dstr_putz .
-.SH "OTHER FUNCTIONS"
+.SS "Other functions"
 The
 .B dstr_write
 function writes a string to an output stream
 The
 .B dstr_write
 function writes a string to an output stream