# HG changeset patch # User Josef 'Jeff' Sipek # Date 1595083839 14400 # Node ID a39617d07de44f4ef596f9a9ad0c623036b6ee6b # Parent 1224c5a5be966d67d945d35187ba3a2d3fc4d2c1 parse: avoid redefinition of typedef warnings Instead of trying to fight with the code generated by lex, we just use the void * type directly. It is slightly less obvious what the arguments are without looking at the name, but that is significantly better than dealing with a file full of ugly #ifdefs. Signed-off-by: Josef 'Jeff' Sipek diff -r 1224c5a5be96 -r a39617d07de4 parse.h --- a/parse.h Mon Jun 22 09:28:03 2020 -0400 +++ b/parse.h Sat Jul 18 10:50:39 2020 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 Josef 'Jeff' Sipek + * Copyright (c) 2012-2020 Josef 'Jeff' Sipek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -59,16 +59,14 @@ struct str *sc_twitter_img; }; -typedef void* yyscan_t; - -extern int fmt3_lex_destroy(yyscan_t yyscanner); -extern int tmpl_lex_destroy(yyscan_t yyscanner); +extern int fmt3_lex_destroy(void *yyscanner); +extern int tmpl_lex_destroy(void *yyscanner); extern int fmt3_parse(struct parser_output *data); extern int tmpl_parse(struct parser_output *data); -extern void fmt3_set_extra(void * user_defined, yyscan_t yyscanner); -extern void tmpl_set_extra(void * user_defined, yyscan_t yyscanner); -extern int fmt3_lex_init(yyscan_t* scanner); -extern int tmpl_lex_init(yyscan_t* scanner); +extern void fmt3_set_extra(void *user_defined, void *yyscanner); +extern void tmpl_set_extra(void *user_defined, void *yyscanner); +extern int fmt3_lex_init(void **scanner); +extern int tmpl_lex_init(void **scanner); static inline bool cond_value(struct parser_output *data) {