aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2017-10-14 02:16:47 +0200
committerJ08nY2017-10-14 02:18:23 +0200
commita16cf934a303166282f10f5788912780130aa8ae (patch)
tree0c6438f395f3ca51be01d24d174f3c7a010f2bde
parentd06df483bc75871a3046885c41ae96751a32cec8 (diff)
downloadecgen-a16cf934a303166282f10f5788912780130aa8ae.tar.gz
ecgen-a16cf934a303166282f10f5788912780130aa8ae.tar.zst
ecgen-a16cf934a303166282f10f5788912780130aa8ae.zip
-rw-r--r--src/exhaustive/exhaustive.c12
-rw-r--r--src/io/output.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/exhaustive/exhaustive.c b/src/exhaustive/exhaustive.c
index 7f7e1c0..dd10255 100644
--- a/src/exhaustive/exhaustive.c
+++ b/src/exhaustive/exhaustive.c
@@ -218,9 +218,11 @@ int exhaustive_gen_retry(curve_t *curve, const config_t *cfg,
arg_t *arg = argss ? argss[state] : NULL;
int diff;
+ bool timeout = false;
timeout_start(cfg->timeout) {
// This is not the best, but currently the best idea I have.
diff = start_offset - state;
+ timeout = true;
}
else {
diff = generators[state](curve, cfg, arg, (offset_e)state);
@@ -266,10 +268,14 @@ int exhaustive_gen_retry(curve_t *curve, const config_t *cfg,
}
}
- if (diff < 0) {
- verbose_log("-");
+ if (timeout) {
+ verbose_log("#");
} else {
- verbose_log(".");
+ if (diff < 0) {
+ verbose_log("-");
+ } else {
+ verbose_log(".");
+ }
}
// unroll stack
avma = stack_tops[new_state];
diff --git a/src/io/output.h b/src/io/output.h
index 8bf95e4..0c3f22f 100644
--- a/src/io/output.h
+++ b/src/io/output.h
@@ -23,7 +23,7 @@
clock_gettime(CLOCK_MONOTONIC, &ts); \
fprintf(verbose, "%" PRIdMAX ".%.9ld ", ts.tv_sec, ts.tv_nsec);
-#define debug(...) fprintf(verbose, __VA_ARGS__)
+#define debug(...) pari_fprintf(verbose, __VA_ARGS__)
#define debug_log(...) \
do { \
_debug_print(" - "); \