.ds Vv 1.2.14 .TH VistaIONewString 3 "24 April 1993" "VistaIO Version \*(Vv" .SH NAME VistaIONewString \- allocate a copy of a string .SH SYNOPSIS .PP .ft B .nf #include .ft .fi .PP .ft B .nf VistaIOString VistaIONewString (\fIstring\fP) .ft .RS .B VistaIOString \fIstring\fP; .RE .nf .SH ARGUMENTS .IP \fIstring\fP 10n Specifies a null-terminated string. .SH DESCRIPTION \fBVistaIONewString\fP copies a string into a newly-allocated block of memory, which it obtains using \fBVistaIOMalloc\fP(3). It is a convenience macro that calls \fBVistaIOMalloc\fP(3) with the following arguments specified: .PP .RS .nf .B (strcpy (VistaIOMalloc (strlen (\fIstring\fP) + 1), \fIstring\fP)) .fi .RE .SH "RETURN VALUES" \fBVistaIONewString\fP returns a pointer to the new copy of the string. .SH "SEE ALSO" .na .nh .BR VistaIOMalloc (3), .BR VistaIONew (3), .BR VistaIOError (3), .ad .hy .SH DIAGNOSTICS If there is insufficient memory to allocate the new block, \fBVistaIONewString\fP terminates by calling \fBVistaIOError\fP(3) with the message ``Out of memory''. .SH AUTHOR Art Pope Adaption to vistaio: Gert Wollny .SH ACKNOWLEDGMENT 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.