VistaIOWriteObjects(3)

πŸ’– VistaIOWriteObjects β€” the library-functions-manual era, bestie edition ✨

okay so. <vistaio.h> has a function called VistaIOWriteObjects(3) and its whole entire job is: write a series of objects to a stream. that's it. that's the gig. 🌸


🌈 SYNOPSIS 🌈

#include <stdio>
#include <vistaio.h>

VistaIOBoolean VistaIOWriteObjects (file, repn, attributes, nobjects, objects)
       FILE *file;
       VistaIORepnKind repn;
       VistaIOAttrList attributes;
       int nobjects;
       VistaIOPointer objects[nobjects];

like look at that signature. she's giving structured, she's giving typed, she's giving main character energy πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • file β€” the open stream you wanna write the objects into. your canvas, your venue, your stage πŸ¦‹
  • repn β€” the kind of objects getting written. it's giving VistaIORepnKind, it's giving "bestie pls be the right type".
  • attributes β€” a list of attributes to write to the stream. optional queen, she can be NULL.
  • nobjects β€” how many objects we're writing. the headcount. the guest list ✨
  • objects β€” the actual objects. the stars of the show. the ones we're putting on the stream πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so VistaIOWriteObjects writes a series of objects to an open stream, formatted as a Vista data file. iconic behaviour, honestly.

the objects must be of the type specified by repn. no cap, no mixing, no chaos.

then: objects objects[0] through objects[nimages - 1] are written, followed by any attributes in the list attributes.

okay so yes, it literally says nimages - 1 in the docs while the argument is called nobjects. we are simply relaying what the page says, bestie, do not come for me πŸ’€

and the attributes argument may be NULL if only the objects are to be written. low maintenance, we love her 🫢


πŸ”₯ RETURN VALUES πŸ”₯

  • returns TRUE if it worked, slayed, ate πŸ’–
  • returns FALSE otherwise 😭
and in the case of an error, the data written to the stream may be incomplete. so like… check your returns, bestie. seriously. the vibe check is mandatory here.

🌟 SEE ALSO 🌟

go read the whole friend group, they're all connected, iykyk 🌈


πŸ‘‘ AUTHOR πŸ‘‘

  • Art Pope <pope@cs.ubc.ca>
  • Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>

absolute legends, both of them πŸŽ€


and that's the page, bestie!! 🧚 this was VistaIO Version 1.2.14, dated 24 April 1993 β€” yes she is vintage, yes she is still serving, periodt πŸ’…β­