Aric Stewart aric@codeweavers.com writes:
@@ -0,0 +1,236 @@
+#include "config.h" +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h>
Please add a license header on new files.
+#define IS_VALID_INDEX (next < cChar)
Don't reference local variables directly, pass them to the macro.
+#define OPTIONAL_CHAR(a) if (IS_VALID_INDEX && lex(input[next])==a) {next++;} +#define OPTIONAL_CHAR_JOINER() if (IS_VALID_INDEX && IS_JOINER(next)) {next++;} +#define ZERO_OR_MORE(a) while(IS_VALID_INDEX && lex(input[next])==a){next++;} +#define ZERO_OR_MORE_MANTRA() while (IS_VALID_INDEX && IS_MANTRA(next)){next++;}
Same here, and these should be wrapped in do/while(0).