From 190c027e3e594afb15c6d613d95ce5af9e22fcf7 Mon Sep 17 00:00:00 2001 From: Walter Harms Date: Mon, 10 Jun 2019 13:29:14 +0200 Subject: fix documentation to refect reality.. XtNewString is strdup() with NULL check. A Function not a macro. Signed-off-by: Walter Harms --- man/XtMalloc.man | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'man') diff --git a/man/XtMalloc.man b/man/XtMalloc.man index 37fada1..2fa1d57 100644 --- a/man/XtMalloc.man +++ b/man/XtMalloc.man @@ -128,21 +128,12 @@ with the following arguments specified: .RE .LP .B XtNewString -returns a pointer to the allocated storage. -If there is insufficient memory to allocate the new block, +returns a pointer to a new string which is a duplicate of +.IR string . +If there is insufficient memory to allocate the new block, or the argument is NULL .B XtNewString -calls -.BR XtErrorMsg . -.B XtNewString -is a convenience macro that calls -.B XtMalloc -with the following arguments specified: -.LP -.RS .5i -.ft CW -(strcpy(XtMalloc((unsigned) strlen(str) + 1), str)) -.ft R -.RE +returns NULL. The memory can be freed with +.BR XtFree . .LP The .B XtAsprintf -- cgit v1.2.1