Coding Guidelines/Parsing Functions

From wiki.zmanda.com
Revision as of 23:07, 30 June 2008 by Dustin (talk | contribs) (man links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.