VistaIOBundle(3)
π VistaIOBundle(3) π
okay bestie, so this is a page from the Library Functions Manual, and it's all about VistaIOBundle β the lil' glow-up container that Vista uses to hold objects it doesn't recognise. Let's get into it. π¦
β¨ NAME β¨
VistaIOBundle β representation for Vista object with binary data
πΈ DESCRIPTION πΈ
π Introduction π
so here's the tea: Vista literally lets you invent your own types of objects and stash them in data files. Which is iconic of her. π But that means she's gotta give standard programs some way to handle objects they've never met before without being weird about it.
Like, at the absolute minimum, a program has to be able to copy your custom objects β intact, binary data and all β from input to output. No cap. And for objects that are unfamiliar to it, the Vista library represents them internally using the VistaIOBundle data structure. That's what we're describing here. periodt.
π§ The VistaIOBundle Representation π§
typedef struct {
VistaIOAttrList list; /* object's attribute list value */
size_t length; /* length of binary data */
VistaIOPointer data; /* pointer to binary data */
char type_name[1]; /* beginning of object's type's name */
} VistaIOBundleRec, *VistaIOBundle;
So basically an arbitrary object β it's got a type name, an attribute list, and maybe some binary data β can be completely represented in memory by a VistaIOBundle, which is a pointer to a variable-length structure. Variable-length, bestie. She grows. π±
The structure has four fields, and here's the vibe check on each:
- In
type_namelives the name of the object's type, as a null-terminated string. - In
listis a handle to its attribute list. - If the object includes binary data, then
lengthis the data's length in bytes, anddatapoints to storage obtained fromVistaIOMalloc(3)containing the data. - If, on the other hand, the object includes no binary data, then
lengthis zero. that's it, that's the whole field. π
Any attribute list member can have a VistaIOBundle as its value, and the attribute's value representation is denoted by the VistaIORepnKind constant VistaIOBundleRepn. Such attributes can be created, copied, deleted, and accessed much like any other. no special treatment, she's just like the other girls. π
VistaIOReadFile(3) reads a data file and returns its contents as an attribute list, while recording objects with unfamiliar types as VistaIOBundle attributes. VistaIOWriteFile(3) writes a data file from the contents of an attribute list, while interpreting VistaIOBundle attributes. And when you use the two together? An object with any type and any binary data will be passed unchanged from input to output, while being stored in memory as a VistaIOBundle. that's the whole magic trick, and it ate. π₯
π Routines π
The following routines create and destroy a VistaIOBundle:
VistaIOBundle VistaIOCreateBundle (VistaIOStringConst type_name, VistaIOAttrList list, size_t length, VistaIOPointer data)
VistaIOCreateBundle allocates a VistaIOBundleRec structure of the appropriate size and fills in its fields. And here's the important part, bestie β the list and data arguments are simply stored in the new VistaIOBundleRec. i.e., the structures they point to are not copied. fr fr, no copy, just vibes. π«Ά
void VistaIODestroyBundle (VistaIOBundle bundle)
VistaIODestroyBundle releases all storage occupied by a VistaIOBundle, including its attribute list and any binary data block. clean slate, we love to see it. β¨
π SEE ALSO π
VistaIOattribute(3), VistaIOtype(3),
π AUTHOR π
Art Pope <pope@cs.ubc.ca>
Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>
aaaand that's the page, bestie!! π this was VistaIO Version 1.2.14, dated 21 January 1994 β yeah, she's an elder icon and she still slays. go copy some unfamiliar objects from input to output, you've got this. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libvistaio-dev 1.2.19-3 Β· libvista-orig
- debian trixie: libvistaio-dev 1.2.19-3+b2 Β· libvista-orig
- ubuntu jammy: libvistaio-dev 1.2.19-3 Β· libvista-orig
- ubuntu noble: libvistaio-dev 1.2.19-3 Β· libvista-orig
- ubuntu questing: libvistaio-dev 1.2.19-4
- ubuntu resolute: libvistaio-dev 1.2.19-4build1 Β· libvista-orig
- ubuntu stonking: libvistaio-dev 1.2.19-4build1 Β· libvista-orig
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms