Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtNew(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtMalloc(1)

XtNewString(1)

 

Name

XtNew — allocate storage for one instance of a data type. 

Synopsis

type ∗XtNew(type)

    type;

Arguments

typeSpecifies a previously declared data type. 

Description

XtNew is used to allocate storage for one instance of a data type.  It returns a pointer to the allocated storage.  For example, XtNew (XtCallbackList) allocates storage for one callback list structure. 

If there is insufficient memory to allocate the new block, XtErrorMsg terminates execution. 

XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

( (type ∗) XtMalloc( (unsigned) sizeof(type) ) )

To copy an instance of a string, use XtNewString. 

See Also

XtMalloc(1), XtNewString(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026