static struct option * option_merge(const pgut_option opts1[], const pgut_option opts2[]) { struct option *result; size_t len1 = option_length(opts1); size_t len2 = option_length(opts2); size_t n = len1 + len2; result = pgut_newarray(struct option, n + 1); option_copy(result, opts1, len1); option_copy(result + len1, opts2, len2); memset(&result[n], 0, sizeof(pgut_option)); return result; }
static int rule_iter(pRule r, int param) { printf("%s", r->symbol); if(r->params) { printf(" ( "); dump_params(r->params); printf(")"); }; printf(" : (%d options)\n", option_length(r->options)); dump_options(r->options); };