aboutsummaryrefslogtreecommitdiff
path: root/tests/gcffmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gcffmt.c')
-rw-r--r--tests/gcffmt.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/gcffmt.c b/tests/gcffmt.c
index b4a4ece..51e3037 100644
--- a/tests/gcffmt.c
+++ b/tests/gcffmt.c
@@ -28,3 +28,3 @@ usage(const char *arg, FILE *fp, int code)
"usage: %s [-h] [-locus] [-delim=char] [-reduce] [-sort] "
- "file [file...]\n",
+ "[-type=grecs|bind|meta1|git] file [file...]\n",
arg);
@@ -61,3 +61,14 @@ main(int argc, char **argv)
usage(progname, stdout, 0);
- else if (arg[0] == '-')
+ else if (strncmp(arg, "-type=", 6) == 0) {
+ if (strcasecmp(arg+6, "GRECS") == 0)
+ grecs_parser_fun = grecs_grecs_parser;
+ else if (strcasecmp(arg+6, "META1") == 0)
+ grecs_parser_fun = grecs_meta1_parser;
+ else if (strcasecmp(arg+6, "BIND") == 0)
+ grecs_parser_fun = grecs_bind_parser;
+ else if (strcasecmp(arg+6, "GIT") == 0)
+ grecs_parser_fun = grecs_git_parser;
+ else
+ usage(progname, stderr, 1);
+ } else if (arg[0] == '-')
usage(progname, stderr, 1);

Return to:

Send suggestions and report system problems to the System administrator.