aboutsummaryrefslogtreecommitdiff
path: root/tests/gcfenum.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gcfenum.c')
-rw-r--r--tests/gcfenum.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/gcfenum.c b/tests/gcfenum.c
index e36dbac..e0eac48 100644
--- a/tests/gcfenum.c
+++ b/tests/gcfenum.c
@@ -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
@@ -20,7 +20,7 @@
#include <string.h>
#include <errno.h>
#include <stdlib.h>
-#include "grecs.h"
+#include "argot.h"
static void
usage(const char *arg, FILE *fp, int code)
@@ -36,15 +36,15 @@ main(int argc, char **argv)
{
char *progname = argv[0];
char *file = NULL;
- struct grecs_node *tree, *node;
- int flags = GRECS_NODE_FLAG_QUOTE|
- GRECS_NODE_FLAG_PATH;
+ struct argot_node *tree, *node;
+ int flags = ARGOT_NODE_FLAG_QUOTE|
+ ARGOT_NODE_FLAG_PATH;
int reduce = 0;
while (--argc) {
char *arg = *++argv;
if (strcmp(arg, "-locus") == 0)
- flags |= GRECS_NODE_FLAG_LOCUS;
+ flags |= ARGOT_NODE_FLAG_LOCUS;
else if (strncmp(arg, "-delim=", 7) == 0)
flags |= arg[7];
else if (strcmp(arg, "-reduce") == 0)
@@ -60,18 +60,18 @@ main(int argc, char **argv)
if (!file || argc)
usage(progname, stderr, 1);
- tree = grecs_parse(file);
+ tree = argot_parse(file);
if (!tree)
exit(1);
if (reduce)
- grecs_tree_reduce(tree, NULL, 0);
+ argot_tree_reduce(tree, NULL, 0);
- for (node = grecs_tree_first_node(tree); node;
- node = grecs_next_node(node)) {
- grecs_print_node(node, flags, stdout);
+ for (node = argot_tree_first_node(tree); node;
+ node = argot_next_node(node)) {
+ argot_print_node(node, flags, stdout);
fputc('\n', stdout);
}
- grecs_tree_free(tree);
+ argot_tree_free(tree);
exit(0);
}

Return to:

Send suggestions and report system problems to the System administrator.