aboutsummaryrefslogtreecommitdiff
path: root/src/ecgen.c
diff options
context:
space:
mode:
authorJ08nY2017-05-29 15:11:38 +0200
committerJ08nY2017-05-29 15:11:38 +0200
commitba8c1f2bc424205cbb167b3c65ce184912c6173a (patch)
treedb21c80b3e7ed411ddbdc4151f82b875b83f279e /src/ecgen.c
parent03eedf3f3e69093af6fd2717bbad04ffdfc7c25a (diff)
downloadecgen-ba8c1f2bc424205cbb167b3c65ce184912c6173a.tar.gz
ecgen-ba8c1f2bc424205cbb167b3c65ce184912c6173a.tar.zst
ecgen-ba8c1f2bc424205cbb167b3c65ce184912c6173a.zip
Diffstat (limited to 'src/ecgen.c')
-rw-r--r--src/ecgen.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ecgen.c b/src/ecgen.c
index ea8f8ff..3d3b1af 100644
--- a/src/ecgen.c
+++ b/src/ecgen.c
@@ -27,7 +27,6 @@
#include "cm/cm.h"
#include "exhaustive/exhaustive.h"
#include "invalid/invalid.h"
-#include "io/cli.h"
#include "io/input.h"
#include "io/output.h"
@@ -58,15 +57,19 @@ bool init(void) {
// init the modular polynomial db from seadata
pari_sp ltop = avma;
- pari_CATCH(e_FILE) {}
+ pari_CATCH(e_FILE) {
+ fprintf(
+ stderr,
+ "seadata not found, this will probably take quite some time.\n");
+ }
pari_TRY { ellmodulareqn(2, -1, -1); }
pari_ENDCATCH avma = ltop;
// open outfile
- output_init(&cfg);
+ if (!output_init(&cfg)) return false;
// open infile
- input_init(&cfg);
+ if (!input_init(&cfg)) return false;
return true;
}
@@ -134,7 +137,7 @@ int main(int argc, char *argv[]) {
argp_parse(&argp, argc, argv, 0, 0, &cfg);
if (!init()) {
- return quit(1);
+ return quit(EXIT_FAILURE);
}
int status;