summaryrefslogtreecommitdiff
path: root/man/XtMalloc.man
diff options
context:
space:
mode:
Diffstat (limited to 'man/XtMalloc.man')
-rw-r--r--man/XtMalloc.man18
1 files changed, 18 insertions, 0 deletions
diff --git a/man/XtMalloc.man b/man/XtMalloc.man
index 396218b..70183ec 100644
--- a/man/XtMalloc.man
+++ b/man/XtMalloc.man
@@ -139,6 +139,8 @@ void XtFree(char *\fIptr\fP);
\fItype\fP *XtNew(\fItype\fP);
.HP
String XtNewString(String \fIstring\fP);
+.HP
+Cardinal XtAsprintf(String *\fInew_string\fP, const char *\fIformat\fP, ...);
.SH ARGUMENTS
.IP \fInum\fP 1i
Specifies the number of bytes or array elements.
@@ -152,6 +154,10 @@ desired.
Specifies a previously declared string.
.IP \fItype\fP 1i
Specifies a previously declared data type.
+.IP \fInew_string\fP 1i
+Specifies a pointer to write a newly allocated string to.
+.IP \fIformat\fP 1i
+Specifies a formatting string as defined by sprintf(3c)
.SH DESCRIPTION
The
.ZN XtMalloc
@@ -226,6 +232,18 @@ with the following arguments specified:
.ta .5i
(strcpy(XtMalloc((unsigned) strlen(str) + 1), str))
.De
+.LP
+The
+.ZN XtAsprintf
+function allocates space for a string large enough to hold the string
+specified by the sprintf(3c) format pattern when used with the remaining
+arguments, and fills it with the formatted results.
+The address of the allocated string is placed into the pointer passed as ret.
+The length of the string (not including the terminating null byte) is returned.
+If there is insufficient memory to allocate the new block,
+.ZN XtAsprintf
+calls
+.ZN XtErrorMsg .
.SH "SEE ALSO"
.br
\fI\*(xT\fP