logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

VistaIONewString - allocate a copy of a string

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.

VistaIO Version 1.2.14                            24 April 1993                              VistaIONewString(3)

Arguments

string    Specifies a null-terminated string.

Author

       Art Pope <pope@cs.ubc.ca>

       Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>

Description

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))

Diagnostics

       If  there  is  insufficient memory to allocate the new block, VistaIONewString terminates by calling Vis‐taIOError(3) with the message ``Out of memory''.

Name

       VistaIONewString - allocate a copy of a string

Return Values

VistaIONewString returns a pointer to the new copy of the string.

See Also

VistaIOMalloc(3), VistaIONew(3), VistaIOError(3),

Synopsis

#include<vistaio.h>VistaIOStringVistaIONewString(string)VistaIOStringstring;

See Also