atbindrule(3)
β¨ NAME β¨
atbindrule is the manual page (section 3, library vibes, we love that for her π
) for the version bind rule squad: atBindAddRule, atBindDelRule, atBindRuleFile, atBindDisplayErrors, atBindTestRule, atBindShowRules, and atBindListRules β aka, like, all the version bind rule handling bestie could ever need π
πΈ SYNOPSIS πΈ
#include <atfs.h>
#include <atfstk.h>
int atBindAddRule (char *ruleName, char *ruleBody, char *srcFile, int
srcLine);
int atBindDelRule (char *ruleName);
int atBindRuleFile (char *fileName);
int atBindDisplayErrors;
int atBindTestRule (char *ruleName);
int atBindShowRules (void);
char**atBindListRules (void);
π DESCRIPTION π
okay so the atBind module is basically keeping an internal database of every single version bind rule it knows about. it's the group chat of rules, and it never forgets π«Ά
π The functions, one by one π
atBindAddRule stores a brand new rule in that internal database. she wants the rule name (and yes, the rule name can optionally come with parameter definitions attached, slay) plus the rule body, both as string arguments. on top of that you may also hand her the filename (srcFile) of the file the rule got read from, and the line inside that file (srcLine) β that's literally just so the error messages can be proper and actually point at stuff instead of being vague and useless π. atBindAddRule returns -1 on error, and 0 otherwise.
atBindDelRule yeets a previously defined rule out of the internal database. she returns a negative return value (-1) when no rule with the given name was found in the internal database. bye bestie π
atBindRuleFile scans a file that's full of version bind rules and adds every single rule in it to the internal database. she returns the number of version bind rules that got successfully added to the internal database. heads up though β a zero return value may also indicate an error, so don't get too comfy with that zero, it's giving ambiguous π©
atBindDisplayErrors is a switch, not a function, and she may be set TRUE to enable error reporting while version binding rules are being parsed. those error messages get written directly to standard error. initially, atBindDisplayErrors is set FALSE. turn her on when you want the tea β
AtBindTestRule reports whether ruleName is defined as a version binding rule or not. she returns a non zero (TRUE) value when the name is defined, otherwise FALSE. vibe check on a rule name, essentially π
atBindShowRules dumps the internal database to the standard output. return value is always TRUE. she never fails, she never flops, main character energy only π
atBindListRules returns all known bind rule names in a list. that list's memory is allocated by use of malloc(3) β so yeah, it's yours to free, bestie, no cap. on error, atBindListRules returns a null pointer.
π¨ DIAGNOSTICS π¨
when things go wrong, each routine returns a null value, the variableatBindErrorgets set true (non-zero), and an explaining message gets copied into theatBindErrorMsgstring buffer.atBindErrorgets cleared on successful calls, but the message buffer justβ¦ remains unchanged. she's holding onto that memory, literally π
π ENVIRONMENT π
SHAPETOOLSβ a list of path names that acts as the search space for files containing version bind rules. those bind rule files must be namedBindRules. the default path is/usr/local/lib/shape.
π FILES π
$SHAPETOOLS/BindRules
π SEE ALSO π
and that's the whole page fr fr, go forth and bind those rules π
this was AtFStk-1.12, dated Tue Jun 29 16:16:26 1993 β iconic vintage energy, we stan a timeless manual π¦β¨
π¦ 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