VistaIOInsertAttr(3)
β¨ VistaIOInsertAttr β¨
okay bestie, so this is from the Library Functions Manual, and it's literally the trio of functions that add attributes to a list: VistaIOInsertAttr, VistaIOAppendAttr, and VistaIOPrependAttr. sit down, grab a boba, we're learning π
πΈ NAME πΈ
VistaIOInsertAttr, VistaIOAppendAttr, VistaIOPrependAttr β add an attribute to a list π
like. that's the whole job. adding attributes. iconic behavior.
π SYNOPSIS π
void VistaIOInsertAttr (posn, after, name, dict, repn, value)
VistaIOAttrListPosn *posn;
VistaIOBoolean after;
VistaIOStringConst name;
VistaIODictEntry *dict;
VistaIORepnKind repn;
type value;
void VistaIOAppendAttr (list, name, dict, repn, value)
VistaIOAttrList list;
VistaIOStringConst name;
VistaIODictEntry *dict;
VistaIORepnKind repn;
type value;
void VistaIOPrependAttr (list, name, dict, repn, value)
VistaIOAttrList list;
VistaIOStringConst name;
VistaIODictEntry *dict;
VistaIORepnKind repn;
type value;
and where it says type, bestie, that's a placeholder for literally any of these:
VistaIOBit, VistaIOUByte, VistaIOSByte, VistaIOShort, VistaIOLong, VistaIOFloat, VistaIODouble, VistaIOAttrList, VistaIOBoolean, VistaIOBundle, VistaIOList, VistaIOPointer, VistaIOString, VistaIOEdges, VistaIOImage, etc.
(and yes the "etc." is doing a LOT of heavy lifting there but that's what the page says so we're keeping it π«Ά)
π¦ ARGUMENTS π¦
posnβ the attribute list position where the new attribute is getting inserted. this is your spot. your little landing pad.afterβ tells us whether the new attribute goes beforeposn(FALSE) or afterposn(TRUE). yes,FALSEmeans before, don't ask, just vibe with it πlistβ the attribute list we're appending to or prepending to. the guest list, basically.nameβ the name for the new attribute. every attribute needs a name, it's giving main character energy.dictβ may specify a dictionary used in translating thevalueyou supply into a keyword that should be stored as the attribute's value β or it can beNULL. your call, bestie.repnβ the representation of the new attribute value.valueβ the new attribute value itself. the content. the moment.
π DESCRIPTION π
so these routines give you three ways to add a new attribute to an attribute list:
VistaIOInsertAttrinserts the new attribute immediately before or after the existing attribute specified byposn.VistaIOAppendAttrplaces the new attribute at the end oflist.VistaIOPrependAttrplaces the new attribute at the beginning oflist.
three flavors. one goal. we love a supportive trio π
π§ the dict situation (iykyk)
with the dict argument you can hand over a dictionary for mapping value to a keyword that will be stored as the attribute's value (peep VistaIOdictionary(3) for the lore).
for example: if you pass an attribute value of 1 and a dictionary that associates the value 1 with the keyword ubyte (like the dictionary VistaIORepnDict does), then the string ubyte will be stored as the attribute's value. slay.
dictionaries may be used to map both numeric values and strings to keywords.
and if you supply a dictionary but value is not mentioned in that dictionary? then value itself will be stored with the attribute. no drama, it just keeps the original.
π the copy situation (lowkey important)
if value is a number or a character string, the routine makes its own copy of the value as a character string for storing in the attribute. cute, safe, self-sufficient.
if, on the other hand, value is an attribute list, pointer, image, edge set, etc., then the routine stores a pointer in the attribute β but it does not make a copy of the object pointed to.
β οΈ okay so that second one is the plot twist: you get a pointer, not a duplicate. the object itself is not copied. just so we're clear, bestie. π
π RETURN VALUES π
as a side effect, these routines modify the attribute list referred to by list or posn.
that's it. that's the side effect. it's giving "changes things behind the scenes" π
π SEE ALSO π
VistaIOSetAttr(3), VistaIOSetAttrValue(3), VistaIOattribute(3), VistaIOdictionary(3),
go read those too, they're the extended universe π¦
π AUTHOR π
Art Pope <pope@cs.ubc.ca>
Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>
and that's the whole page, bestie β brought to you by VistaIO Version 1.2.14, dated 24 April 1993, in all its VistaIOInsertAttr(3) glory. vintage but make it iconic. periodt. πβ¨
π¦ 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