Scroll to navigation

VistaIONew(3) Library Functions Manual VistaIONew(3)

NAME

VistaIONew - allocate storage for an instance of a data type

SYNOPSIS

#include <vistaio.h>

type *VistaIONew (type)
type;

ARGUMENTS

Specifies a previously declared data type.

DESCRIPTION

VistaIONew allocates storage for one instance of a data type. It is a convenience macro that calls VistaIOMalloc(3) with the following arguments specified:

((type *) VistaIOMalloc (sizeof (type))

RETURN VALUES

VistaIONew returns a pointer to the allocated storage.

SEE ALSO

VistaIOMalloc(3), VistaIONewString(3), VistaIOError(3),

DIAGNOSTICS

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

AUTHOR

Art Pope <pope@cs.ubc.ca>

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

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.

24 April 1993 VistaIO Version 1.2.14