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, checkatErrorfirst and readatErrMsgsecond. 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
- debian bookworm: atfs-dev 1.4pl6-15+b1
- ubuntu jammy: atfs-dev 1.4pl6-15
- ubuntu noble: atfs-dev 1.4pl6-16.1build1
- ubuntu resolute: atfs-dev 1.4pl6-17
- ubuntu stonking: atfs-dev 1.4pl6-17
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms