SYNOPSIS
#include <atfs.h>#include <atfstk.h>
intatBindAddRule (char *ruleName, char *ruleBody, char *srcFile, int srcLine);
intatBindDelRule (char *ruleName);
intatBindRuleFile (char *fileName);
intatBindDisplayErrors;
intatBindTestRule (char *ruleName);
intatBindShowRules (void);
char**atBindListRules (void);
DESCRIPTION
The atBind module maintains an internal database storing all known version bind rules.The atBindAddRule function stores a new rule in the internal database. It expects the rule name, optionally including parameter definitions, and the rule body as string arguments. Additionally, the filename (srcFile) of the file, where the rule is read from, and the line within that file (srcLine), may be given. This is used for producing proper error messages. atBindAddRule returns -1 on error, 0 otherwise.
atBindDelRule removes a previously defined rule from the internal database. It returns a negative return value (-1), when no rule with the given name was not found in the internal database.
The atBindRuleFile function scans a file containing version bind rules and adds all contained rules to the internal database. It returns the number of version bind rules successfully added to the internal database. A zero return value may also indicate an error.
The switch atBindDisplayErrors may be set TRUE to enable error reporting during parsing of version binding rules. Error messages will be written directly to standard error. Initially, atBindDisplayErrors is set FALSE.
AtBindTestRule reports whether ruleName is defined as version binding rule or not. It returns a non zero (TRUE) value when the name is defined, otherwise FALSE.
atBindShowRules dumps the internal database to the standard output. Return value is always TRUE.
atBindListRules returns all known bind rule names in a list. The list memory is allocated by use of malloc(3). On error, atBindListRules returns a null pointer.