diff options
Diffstat (limited to 'doc/DString.3')
-rw-r--r-- | doc/DString.3 | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/doc/DString.3 b/doc/DString.3 index 2698696..db0c4dd 100644 --- a/doc/DString.3 +++ b/doc/DString.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: DString.3,v 1.9 2002/02/08 02:52:54 dgp Exp $ +'\" RCS: @(#) $Id: DString.3,v 1.17 2007/12/13 15:22:31 dgp Exp $ '\" .so man.macros .TH Tcl_DString 3 7.4 Tcl "Tcl Library Procedures" @@ -19,10 +19,10 @@ Tcl_DStringInit, Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_DStringStartSu \fBTcl_DStringInit\fR(\fIdsPtr\fR) .sp char * -\fBTcl_DStringAppend\fR(\fIdsPtr, string, length\fR) +\fBTcl_DStringAppend\fR(\fIdsPtr, bytes, length\fR) .sp char * -\fBTcl_DStringAppendElement\fR(\fIdsPtr, string\fR) +\fBTcl_DStringAppendElement\fR(\fIdsPtr, element\fR) .sp \fBTcl_DStringStartSublist\fR(\fIdsPtr\fR) .sp @@ -44,13 +44,15 @@ char * .sp \fBTcl_DStringGetResult\fR(\fIinterp, dsPtr\fR) .SH ARGUMENTS -.AS Tcl_DString newLength +.AS Tcl_DString newLength in/out .AP Tcl_DString *dsPtr in/out Pointer to structure that is used to manage a dynamic string. -.AP "CONST char" *string in -Pointer to characters to add to dynamic string. +.AP "const char" *bytes in +Pointer to characters to append to dynamic string. +.AP "const char" *element in +Pointer to characters to append as list element to dynamic string. .AP int length in -Number of characters from string to add to dynamic string. If -1, +Number of bytes from \fIbytes\fR to add to dynamic string. If -1, add all characters up to null terminating character. .AP int newLength in New length for dynamic string, not including null terminating @@ -77,7 +79,7 @@ string. .PP \fBTcl_DStringAppend\fR adds new information to a dynamic string, allocating more memory for the string if needed. -If \fIlength\fR is less than zero then everything in \fIstring\fR +If \fIlength\fR is less than zero then everything in \fIbytes\fR is appended to the dynamic string; otherwise \fIlength\fR specifies the number of bytes to append. \fBTcl_DStringAppend\fR returns a pointer to the characters of @@ -85,14 +87,16 @@ the new string. The string can also be retrieved from the \fIstring\fR field of the Tcl_DString structure. .PP \fBTcl_DStringAppendElement\fR is similar to \fBTcl_DStringAppend\fR -except that it doesn't take a \fIlength\fR argument (it appends -all of \fIstring\fR) and it converts the string to a proper list element +except that it does not take a \fIlength\fR argument (it appends +all of \fIelement\fR) and it converts the string to a proper list element before appending. \fBTcl_DStringAppendElement\fR adds a separator space before the new list element unless the new list element is the first in a list or sub-list (i.e. either the current string is empty, or it -contains the single character ``{'', or the last two characters of -the current string are `` {''). +contains the single character +.QW { , +or the last two characters of the current string are +.QW " {" ). \fBTcl_DStringAppendElement\fR returns a pointer to the characters of the new string. .PP @@ -130,7 +134,7 @@ will still need to be called. This procedure is now deprecated. \fBTcl_DStringSetLength\fR should be used instead. .PP -\fBTcl_DStringFree\fR should be called when you're finished using +\fBTcl_DStringFree\fR should be called when you are finished using the string. It frees up any memory that was allocated for the string and reinitializes the string's value to an empty string. .PP |