From 187c76c01f7810d7058251c0e76f7a48b179f196 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 19 Jan 2022 20:59:54 +0100 Subject: -cleanup --- src/anastasis/print.c | 13 ++++++++----- src/testing/test_prepare.sh | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/anastasis/print.c b/src/anastasis/print.c index 6b4a4c5..c640c71 100644 --- a/src/anastasis/print.c +++ b/src/anastasis/print.c @@ -30,19 +30,19 @@ #include #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 index dbfc951..303a8d2 100755 --- 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` -- cgit v1.2.3