anastasis-gtk

Demonstrator GUI for Anastasis
Log | Files | Refs | README | LICENSE

commit 187c76c01f7810d7058251c0e76f7a48b179f196
parent c76ed196f2bfe4077e15d69dd06857d60b409e0d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 19 Jan 2022 20:59:54 +0100

-cleanup

Diffstat:
Msrc/anastasis/print.c | 13++++++++-----
Msrc/testing/test_prepare.sh | 2+-
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/anastasis/print.c b/src/anastasis/print.c @@ -30,19 +30,19 @@ #include <gnunet/gnunet_util_lib.h> #include "print.h" -static jmp_buf env; - static void error_handler (HPDF_STATUS error_no, HPDF_STATUS detail_no, void *user_data) { + jmp_buf *env = user_data; + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "error_no=%04X, detail_no=%u\n", (HPDF_UINT) error_no, (HPDF_UINT) detail_no); - longjmp (env, + longjmp (*env, 1); } @@ -59,8 +59,11 @@ AG_print (json_t *user, HPDF_Page page; float tw; float fsize; + jmp_buf env; + - pdf = HPDF_New (error_handler, NULL); + pdf = HPDF_New (&error_handler, + &env); if (! pdf) { printf ("error: cannot create PdfDoc object\n"); @@ -133,7 +136,7 @@ AG_print (json_t *user, HPDF_Page_GetWidth (page) - 130, HPDF_FALSE, NULL); - if ( (len < strlen (val)) && + if ( (len < (ssize_t) strlen (val)) && (fsize > 10) ) fsize--; else diff --git a/src/testing/test_prepare.sh b/src/testing/test_prepare.sh @@ -164,7 +164,7 @@ then fi echo -n "Testing for libeufin-cli" -if libeufin-cli --version > /dev/null +if libeufin-cli --version > /dev/null 2>/dev/null then echo " FOUND" IBAN_CREDIT=`anastasis-config -c $CONF_4 -s authorization-iban -o CREDIT_IBAN`