atversion(3)

🌸 atversion(3) β€” the AtFS Toolkit Library version-handling page πŸ’–

okay bestie, this is atversion(3), a page straight out of the AtFS Toolkit Library, and it's literally all about version handling. five little functions. tiny page. huge slay. let's get into it ✨


✨ NAME ✨

atSetVersAlias, atDelVersAlias, atVno, atGen, atRev β€” version handling πŸŽ€


🌈 SYNOPSIS 🌈

#include <atfs.h>
#include <atfstk.h>

int     atSetVersAlias (Af_key *aso; char *aliasName);

int     atDelVersAlias (Af_key *aso; char *aliasName);

int     atVno (Af_key *aso);

void    atGen (int versionNumber)

void    atRev (int versionNumber)

like, look at those signatures. iconic. no notes. πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

atSetVersAlias sets a version number alias for aso β€” and bestie, what is a version number alias? it's a unique symbolic name for a version. so cute, so symbolic, so unique. πŸ¦‹

the function checks whether aliasName is unique within the ASO's history and complains if it's not (not me being the alias police 😭). it returns TRUE on success and FALSE otherwise. and here's the fun part: the case where the version already had the alias name? that's considered a success. no drama, no error, we move. πŸ’–

atDelVersAlias deletes the given aliasName from the list of version aliases attached to aso. it returns TRUE on success and FALSE otherwise. and it also returns TRUE when the alias name did not exist. lowkey the chillest function on this page β€” nothing phases her, not even deleting something that was never there. πŸ™ˆ

atVno returns a compact representation of aso's generation and revision number, packed into a single integer. one integer. two numbers. packed. it's giving efficiency. ✨

then atGen extracts the generation number, and atRev extracts the revision number, both from a versionNumber in compact representation. they're a lil duo, a package deal, the main characters of unpacking 🫢


πŸ’€ DIAGNOSTICS πŸ’€

on error, the atError variable is set to an appropriate error code, and atErrMsg holds a diagnostic message. so if something goes sideways, that's where you go looking. atError and atErrMsg, your two besties for figuring out what just happened πŸ”₯

no cap: when things break, check atError first and read atErrMsg second. the message is right there waiting for you, bestie. πŸ’œ

and that's the whole page, fr fr. short, sweet, packed with version-handling goodness. this was the AtFStk-1.12 era of the page, dated Fri Jun 25 17:21:56 1993 β€” yes, 1993, we stan an elder that still serves πŸ’–

go forth and alias responsibly. mwah. πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from