Coding Guidelines/Parsing Functions

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, 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.

Personal tools