cdds_scanv - retrieve definition from dictionary
SYNOPSIS
#include "cdds.h"
int cdds_scanv(alias, str);
-
const char *alias
const char **str
[ Description
| Examples
]
DESCRIPTION
cdds_scanf retrieves a definition from dictionaries. The
scan dictionaries must have been previously selected by
cdds_dict, or related function. The name of
the definition is specified by alias (multiple names, delimited
by white space, may be specified). If a null alias is specified
(i.e. NULL, zero length string, or a string that only contains
white space) the value is processed, starting from the current position
of the current scan definition.
Dictionaries are scanned from bottom-to-top and right-to-left.
The newest definition that matches any alias is selected.
cdds_scanv assigns a string pointer to
*str.
The string contains the literal value of the current definition.
It starts at the current position in the value,
and terminates with the character prior to the next definition name.
The current position is advanced to EOD (end of definition).
The function returns the number of characters in the string.
The string contents may be accessed, read only,
until another scan definition is selected.
EOF is returned and *str is not changed,
if no characters remain in the value.
Dictionaries may contain alias definitions. They define
alternate names for older definitions. Alias
definitions are denoted by a special prefix,
"alias:defn_name" or "$defn_name".
The value of an alias definition is a list of alternate names.
For example:
out_data= /very/long/path/name/file
name= value...
alias:data= out_data
foo= hidden definition...
name= value...
$foo=
Alias definitions are processed, when scan functions search for
a name. If a definition name matches an alias, the search list
is modified and processing continues. The defined values (definition
names delimited by white space) replace the one name matched in the
original alias list.
EXAMPLES
const char *omega, *foo;
int j;
foo = "default value for foo defn";
j = cdds_scanv("foo", &foo);
omega = "";
j = cdds_scanv("omega OMEGA Omega", &omega);
SEE ALSO
cdds_dict Select DDS dictionary and mode
cdds_scanf Retrieve a definition
cdds_scank Retrieve a definition
cdds_scant Retrieve a definition
cdds_scantn Retrieve a definition
AUTHOR
R. L. Selzler, EPTG (Oct 1995)