use b_plain use cz/vars cz_protos() for_vec(i, structs_unions_classes_templates, vec*) cstr l = *(cstr*)vec0(*i) char *colon = strchr(l, ':') if colon while colon > l && colon[-1] == ' ' --colon l = tofree(Strndup(l, colon-l)) vec_push(struct_union_class_template_protos, l) for_vec(i, functions, vec*) cstr l = *(cstr*)vec0(*i) char *coloncolon = strstr(l, "::") if coloncolon && coloncolon < strchr(l, '(') && coloncolon[2] != ' ' continue vec_push(function_protos, l) for_vec(i, var_assignments, vec*) cstr l = *(cstr*)vec0(*i) char *eq = strchr(l, '=') if eq while eq > l && eq[-1] == ' ' --eq if !cstr_begins_with_word(l, "static", "local") l = fformat("extern %.*s", eq-l, l) else char *array = strstr(l, "[]") if array && array < eq continue l = fformat("%.*s", eq-l, l) vec_push(var_protos, l)