2 space indentation

This commit is contained in:
petermlm
2016-04-17 18:51:04 +01:00
parent af6489125f
commit aa17e0723e
2 changed files with 67 additions and 67 deletions

28
mpc.c
View File

@@ -2777,35 +2777,35 @@ void mpc_ast_print_to(mpc_ast_t *a, FILE *fp) {
}
int mpc_ast_get_index(mpc_ast_t *ast, const char *tag) {
return mpc_ast_get_index_lb(ast, tag, 0);
return mpc_ast_get_index_lb(ast, tag, 0);
}
int mpc_ast_get_index_lb(mpc_ast_t *ast, const char *tag, int lb) {
int i;
int i;
for(i=lb; i<ast->children_num; i++) {
if(strcmp(ast->children[i]->tag, tag) == 0) {
return i;
}
for(i=lb; i<ast->children_num; i++) {
if(strcmp(ast->children[i]->tag, tag) == 0) {
return i;
}
}
return -1;
return -1;
}
mpc_ast_t *mpc_ast_get_child(mpc_ast_t *ast, const char *tag) {
return mpc_ast_get_child_lb(ast, tag, 0);
return mpc_ast_get_child_lb(ast, tag, 0);
}
mpc_ast_t *mpc_ast_get_child_lb(mpc_ast_t *ast, const char *tag, int lb) {
int i;
int i;
for(i=lb; i<ast->children_num; i++) {
if(strcmp(ast->children[i]->tag, tag) == 0) {
return ast->children[i];
}
for(i=lb; i<ast->children_num; i++) {
if(strcmp(ast->children[i]->tag, tag) == 0) {
return ast->children[i];
}
}
return NULL;
return NULL;
}
mpc_val_t *mpcf_fold_ast(int n, mpc_val_t **xs) {