Allocate a copy of a string
#include <vistaio.h>
VistaIOString VistaIONewString (string) VistaIOString string;
Specifies a null-terminated string.
VistaIONewString copies a string into a newly-allocated block of memory, which it obtains using VistaIOMalloc(3). It is a convenience macro that calls VistaIOMalloc(3) with the following arguments specified:
(strcpy (VistaIOMalloc (strlen (string) + 1), string))
VistaIONewString returns a pointer to the new copy of the string.
If there is insufficient memory to allocate the new block, VistaIONewString terminates by calling VistaIOError(3) with the message ``Out of memory''.
Art Pope <[email protected]>
Adaption to vistaio: Gert Wollny <[email protected]>
This macro and this manual page are based on similar ones included in the X Toolkit Intrinsics, which is Copyright 1985, 1986, 1987, 1988 Massachusetts Institute of Technology, Cambridge, Massachusetts, and Digital Equipment Corporation, Maynard, Massachusetts.