X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fparse.h;fp=src%2Fclient%2Fparse.h;h=0000000000000000000000000000000000000000;hb=a50806df8116a81729220bd79870639b18da9d8c;hp=31c2fb5341259b7482613f2bc3bb56eed4d73049;hpb=3a308dfb8b0ede5ab0a23d867cdf33394825538e;p=plomrogue diff --git a/src/client/parse.h b/src/client/parse.h deleted file mode 100644 index 31c2fb5..0000000 --- a/src/client/parse.h +++ /dev/null @@ -1,59 +0,0 @@ -/* src/client/parse.h - * - * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3 - * or any later version. For details on its copyright, license, and warranties, - * see the file NOTICE in the root directory of the PlomRogue source package. - * - * Routines for file parsing. - */ - -#ifndef PARSE_H -#define PARSE_H - -#include /* size_t */ -#include /* uint8_t */ - - - -enum parse_flags -{ - EDIT_STARTED = 0x01 -}; - - - -/* Parse file at "path" by passing each line's first two tokens to - * "token_to_entry". Ignore empty lines. Non-empty lines must feature at least - * two tokens as delimited either be whitespace or single quotes (to allow for - * tokens featuring whitespaces). When EOF is reached, token_to_entry() is - * called a last time with a first token of NULL. - */ -extern void parse_file(char * path, void ( *token_to_entry) (char *, char *)); - -/* Calls err_line() with fitting message if EDIT_STARTED not set in "flags". */ -extern void parsetest_defcontext(uint8_t flags); - -/* Ensure token_from_line() does not find any more tokens on the line. */ -extern void parsetest_too_many_values(); - -/* Trigger err_line() with "Unknown argument" message. */ -extern void parse_unknown_arg(); - -/* If "test"!=0 call err_line() with "Declaration of ID already used" message.*/ -extern void parse_id_uniq(int test); - -/* Set "flags"=EDIT_STARTED and return pointer to new zeroed array of "size". */ -extern char * parse_init_entry(uint8_t * flags, size_t size); - -/* Wrapper to parse_val() that sets "flags" to "flags"|"set_flag" on success. */ -extern uint8_t parse_flagval(char * token0, char * token1, char * comparand, - uint8_t * flags, uint8_t set_flag, char type, - char * element); - -/* Check "ready_flag" is set in "flags", re-set "flags" to "ready_flag" only. */ -extern void parse_and_reduce_to_readyflag(uint8_t * flags, uint8_t ready_flag); - - - -#endif -