.ig
 Copyright (C) 1993,1994 by the author(s).
 
 This software is published in the hope that it will be useful, but
 WITHOUT ANY WARRANTY for any part of this software to work correctly
 or as described in the manuals. See the ShapeTools Public License
 for details.

 Permission is granted to use, copy, modify, or distribute any part of
 this software but only under the conditions described in the ShapeTools 
 Public License. A copy of this license is supposed to have been given
 to you along with ShapeTools in a file named LICENSE. Among other
 things, this copyright notice and the Public License must be
 preserved on all copies.


Author: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de)

$Header: atbindrule.3[7.0] Tue Jun 29 16:16:26 1993 andy@cs.tu-berlin.de frozen $
..
.TH atbindrule 3 "Tue Jun 29 16:16:26 1993" "AtFStk-1.12" "AtFS Toolkit Library"
.SH NAME
atBindAddRule, atBindDelRule, atBindRuleFile, atBindDisplayErrors,
atBindTestRule, atBindShowRules, atBindListRules \- version bind rule
handling
.SH SYNOPSIS
#include <atfs.h>
.br
#include <atfstk.h>
.sp
.ta 1.2c
int	atBindAddRule (char *ruleName, char *ruleBody, char *srcFile, int srcLine);
.sp
int	atBindDelRule (char *ruleName);
.sp
int	atBindRuleFile (char *fileName);
.sp
int	atBindDisplayErrors;
.sp
int	atBindTestRule (char *ruleName);
.sp
int	atBindShowRules (void);
.sp
char**	atBindListRules (void);
.sp
.SH DESCRIPTION
The atBind module maintains an internal database storing all known
version bind rules.
.LP
The \fIatBindAddRule\fP 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 (\fIsrcFile\fP) of the
file, where the rule is read from, and the line within that file
(\fIsrcLine\fP), may be given. This is used for producing proper
error messages. atBindAddRule returns -1 on error, 0 otherwise.
.LP
\fIatBindDelRule\fP 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.
.LP
The \fIatBindRuleFile\fP 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.
.LP
The switch \fIatBindDisplayErrors\fP 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.
.LP
\fIAtBindTestRule\fP reports whether \fIruleName\fP is defined as
version binding rule or not. It returns a non zero (TRUE) value when
the name is defined, otherwise FALSE.
.LP
\fIatBindShowRules\fP dumps the internal database to the standard
output. Return value is always TRUE.
.LP
\fIatBindListRules\fP 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.
.SH DIAGNOSTICS
Upon error, each routine returns a null value, the variable
\fIatBindError\fP is set true (non-zero), and an explaining
message is copied to the \fIatBindErrorMsg\fP string buffer. The
atBindError variable is cleared upon successful calls, the message
buffer remains unchanged.
.SH ENVIRONMENT
\fISHAPETOOLS\fP \- list of path names as search space for files
containing version bind rules. The bind rule files must be named
\fIBindRules\fP. Default path is \fI/usr/local/lib/shape\fP.
.SH FILES
$SHAPETOOLS/BindRules
.SH SEE ALSO
atbind(3)