diff options
Diffstat (limited to 'src/join.c')
-rw-r--r-- | src/join.c | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -1,4 +1,4 @@ -/* grecs - Gray's Extensible Configuration System +/* argot - Gray's Extensible Configuration System Copyright (C) 2007-2016 Sergey Poznyakoff Grecs is free software; you can redistribute it and/or modify it @@ -19,55 +19,55 @@ #endif #include <stdlib.h> #include <errno.h> -#include "grecs.h" +#include "argot.h" static void -reset_point(struct grecs_locus_point *point, struct grecs_symtab *st) +reset_point(struct argot_locus_point *point, struct argot_symtab *st) { - struct grecs_syment *ent, key; + struct argot_syment *ent, key; int install = 1; if (!point->file) return; key.name = (char*) point->file; - ent = grecs_symtab_lookup_or_install(st, &key, &install); + ent = argot_symtab_lookup_or_install(st, &key, &install); if (!ent) - grecs_alloc_die(); + argot_alloc_die(); point->file = ent->name; } -static enum grecs_tree_recurse_res -reset_locus(enum grecs_tree_recurse_op op, struct grecs_node *node, void *data) +static enum argot_tree_recurse_res +reset_locus(enum argot_tree_recurse_op op, struct argot_node *node, void *data) { - struct grecs_symtab *st = data; + struct argot_symtab *st = data; switch (op) { - case grecs_tree_recurse_set: - case grecs_tree_recurse_pre: + case argot_tree_recurse_set: + case argot_tree_recurse_pre: reset_point(&node->locus.beg, st); reset_point(&node->locus.end, st); break; default: break; } - return grecs_tree_recurse_ok; + return argot_tree_recurse_ok; } int -grecs_tree_join(struct grecs_node *dst, struct grecs_node *src) +argot_tree_join(struct argot_node *dst, struct argot_node *src) { - struct grecs_node *p; + struct argot_node *p; - if (dst->type != grecs_node_root || src->type != grecs_node_root) + if (dst->type != argot_node_root || src->type != argot_node_root) return 1; - grecs_node_bind(dst, src->down, 1); + argot_node_bind(dst, src->down, 1); for (p = src->down; p; p = p->next) p->up = dst; if (!src->v.texttab) { dst->v.texttab = src->v.texttab; } else { - grecs_tree_recurse(src->down, reset_locus, dst->v.texttab); - grecs_symtab_free(src->v.texttab); + argot_tree_recurse(src->down, reset_locus, dst->v.texttab); + argot_symtab_free(src->v.texttab); } src->v.texttab = NULL; src->down = NULL; |