VistaIONew(3)

✨ VistaIONew β€” allocate storage for an instance of a data type ✨

okay bestie, gather round, because this one is short and sweet and honestly a little iconic πŸ’…


🌸 SYNOPSIS

#include <vistaio.h>

type *VistaIONew (type)
       type;

πŸŽ€ ARGUMENTS

  • type β€” a data type you already declared earlier. that's it. that's the whole input. she's low maintenance like that 🫢

πŸ’– DESCRIPTION

VistaIONew grabs you some storage for one instance of a data type. it's not out here doing heavy lifting β€” it's a convenience macro, a lil helper, and what it does is call VistaIOMalloc(3) with these arguments:

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

so like. it's giving "I'll do the casting for you so you don't have to" ✨ the way that it just handles sizeof and the cast and everything?? obsessed. no cap.


⭐ RETURN VALUES

VistaIONew returns a pointer to the allocated storage. boom. that's your pointer. you're welcome πŸ’œ


πŸ”₯ DIAGNOSTICS

if there is insufficient memory to allocate the new block, VistaIONew does not return β€” it terminates by calling VistaIOError(3) with the message `` Out of memory ''. so yeah. that's a whole dramatic exit 😭 not a quiet one.

🌈 SEE ALSO

iykyk, go read those next bestie πŸ¦‹


πŸ‘‘ 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. shoutout to the OGs fr fr πŸ’–


aaaand that's the whole page bestie, we ate πŸ“ this is VistaIO Version 1.2.14, dated 24 April 1993 β€” yes she's older than us and still slaying, main character energy forever βœ¨πŸ’…πŸ‘‘