aboutsummaryrefslogtreecommitdiff
path: root/src/io/cli.c
diff options
context:
space:
mode:
authorJ08nY2018-02-27 16:47:27 +0100
committerJ08nY2018-02-27 16:47:27 +0100
commitb86ede073f78121f58cbad9a56f55041191a150b (patch)
tree67b548d8540f57968d342499d9c68e42327b96a2 /src/io/cli.c
parent76b8866222b9abd5f25a795ff719914e852e14ab (diff)
downloadecgen-b86ede073f78121f58cbad9a56f55041191a150b.tar.gz
ecgen-b86ede073f78121f58cbad9a56f55041191a150b.tar.zst
ecgen-b86ede073f78121f58cbad9a56f55041191a150b.zip
Drop CSV support.
Diffstat (limited to 'src/io/cli.c')
-rw-r--r--src/io/cli.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/io/cli.c b/src/io/cli.c
index 2ea14f8..c192021 100644
--- a/src/io/cli.c
+++ b/src/io/cli.c
@@ -72,7 +72,6 @@ struct argp_option cli_options[] = {
{"count", OPT_COUNT, "COUNT", 0, "Generate multiple curves.", 3},
{0, 0, 0, 0, "Input/Output options:", 4},
- {"format", OPT_FORMAT, "FORMAT", 0, "Format to output in. One of {csv, json}, default is json.", 4},
{"input", OPT_INPUT, "FILE", 0, "Input from file.", 4},
{"output", OPT_OUTPUT, "FILE", 0, "Output into file. Overwrites any existing file!", 4},
{"append", OPT_APPEND, 0, 0, "Append to output file (don't overwrite).", 4},
@@ -198,6 +197,7 @@ static void cli_end(struct argp_state *state) {
if (!cfg->points.type) {
cfg->points.type = POINTS_PRIME;
}
+ cfg->format = FORMAT_JSON;
}
error_t cli_parse(int key, char *arg, struct argp_state *state) {
@@ -335,17 +335,6 @@ error_t cli_parse(int key, char *arg, struct argp_state *state) {
break;
}
/* IO options */
- case OPT_FORMAT:
- if (!strcmp(arg, "csv")) {
- cfg->format = FORMAT_CSV;
- } else if (!strcmp(arg, "json")) {
- cfg->format = FORMAT_JSON;
- } else {
- argp_failure(state, 1, 0,
- "Invalid format specified. One of [csv, json] "
- "is valid.");
- }
- break;
case OPT_INPUT:
cfg->input = arg;
break;