X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.h;h=16a410a98aecb3b3fa864d865515854f0e7ec572;hp=804f80249d9204b362032e592c29a52d5e7b66b6;hb=a3d9f540245cbb6d4e2dc16d51d838d753c636a2;hpb=08f8cff8f22fee31b74f8301cc5d6494e5ff7160 diff --git a/tools/ccanlint/ccanlint.h b/tools/ccanlint/ccanlint.h index 804f8024..16a410a9 100644 --- a/tools/ccanlint/ccanlint.h +++ b/tools/ccanlint/ccanlint.h @@ -108,11 +108,16 @@ enum line_compiled { MAYBE_COMPILED, }; -/* Simple evaluator: if this pre-processor symbol is defined to this - * value, is this line compiled? (Other symbols assumed undefined) */ +/* Simple evaluator. If symbols are set this way, is this condition true? + * NULL values mean undefined, NULL symbol terminates. */ enum line_compiled get_ccan_line_pp(struct pp_conditions *cond, const char *symbol, - unsigned int value); + const unsigned int *value, ...); + +/* Get token if it's equal to token. */ +bool get_token(const char **line, const char *token); +/* Talloc copy of symbol token, or NULL. Increment line. */ +char *get_symbol_token(void *ctx, const char **line); /* Similarly for ->doc_sections */ struct list_head *get_ccan_file_docs(struct ccan_file *f);