summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-01-19 20:59:54 +0100
committerChristian Grothoff <christian@grothoff.org>2022-01-19 20:59:54 +0100
commit187c76c01f7810d7058251c0e76f7a48b179f196 (patch)
treee922ffc3458c5006b792ab9293eb451f9982e90e
parentc76ed196f2bfe4077e15d69dd06857d60b409e0d (diff)
downloadanastasis-gtk-187c76c01f7810d7058251c0e76f7a48b179f196.tar.gz
anastasis-gtk-187c76c01f7810d7058251c0e76f7a48b179f196.tar.bz2
anastasis-gtk-187c76c01f7810d7058251c0e76f7a48b179f196.zip
-cleanup
-rw-r--r--src/anastasis/print.c13
-rwxr-xr-xsrc/testing/test_prepare.sh2
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 <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
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`