New key maps can be added by creating a class initialization function
and a lookup function.
These are then added to the routine
The initialization function is called as
map is an internal data structure.
mapname is the name of the map (used for error messages).
args is a pointer to the rest of the configuration file line;
flags and filenames can be extracted from this line.
The initialization function must return
if it successfully opened the map,
- xxx_map_init(MAP *map, char *mapname, char *args)
The lookup function is called as
map defines the map internally.
bufsize have the input key.
This may be (and often is) used destructively.
av is a list of arguments passed in from the rewrite line.
The lookup function should return a pointer to the new value.
IF the map lookup fails,
*statp should be set to an exit status code;
in particular, it should be set to
if recovery is to be attempted by the higher level code.
- xxx_map_lookup(MAP *map, char buf, int bufsize, char **av, int *statp)
[Contents] [Previous] [Next]
Questions or problems regarding this web site should be directed to Steve Gielda.
Copyright © 1999 www.cotse.com. All rights reserved.
Last modified: Friday April 02, 1999.