Coding Guidelines/Parsing Functions

From wiki.zmanda.com
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Although Amanda does use lex/yacc to handle the amrecover(8) command line, most other parsing is done "manually." A few functions (macros) have been defined to make this easier. They're all defined in -- where else -- common-src/amanda.h. The comments in that file should be taken as authoritative on their inner functioning. See server-src/infofile.c for an example of their use.

These functions should probably not be used in any newly developed code. Rather, use regular expressions or a more advanced data structure.