diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-01-19 20:59:54 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-01-19 20:59:54 +0100 |
commit | 187c76c01f7810d7058251c0e76f7a48b179f196 (patch) | |
tree | e922ffc3458c5006b792ab9293eb451f9982e90e | |
parent | c76ed196f2bfe4077e15d69dd06857d60b409e0d (diff) | |
download | anastasis-gtk-187c76c01f7810d7058251c0e76f7a48b179f196.tar.gz anastasis-gtk-187c76c01f7810d7058251c0e76f7a48b179f196.zip |
-cleanup
-rw-r--r-- | src/anastasis/print.c | 13 | ||||
-rwxr-xr-x | 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 @@ | |||
30 | #include <gnunet/gnunet_util_lib.h> | 30 | #include <gnunet/gnunet_util_lib.h> |
31 | #include "print.h" | 31 | #include "print.h" |
32 | 32 | ||
33 | static jmp_buf env; | ||
34 | |||
35 | 33 | ||
36 | static void | 34 | static void |
37 | error_handler (HPDF_STATUS error_no, | 35 | error_handler (HPDF_STATUS error_no, |
38 | HPDF_STATUS detail_no, | 36 | HPDF_STATUS detail_no, |
39 | void *user_data) | 37 | void *user_data) |
40 | { | 38 | { |
39 | jmp_buf *env = user_data; | ||
40 | |||
41 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 41 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
42 | "error_no=%04X, detail_no=%u\n", | 42 | "error_no=%04X, detail_no=%u\n", |
43 | (HPDF_UINT) error_no, | 43 | (HPDF_UINT) error_no, |
44 | (HPDF_UINT) detail_no); | 44 | (HPDF_UINT) detail_no); |
45 | longjmp (env, | 45 | longjmp (*env, |
46 | 1); | 46 | 1); |
47 | } | 47 | } |
48 | 48 | ||
@@ -59,8 +59,11 @@ AG_print (json_t *user, | |||
59 | HPDF_Page page; | 59 | HPDF_Page page; |
60 | float tw; | 60 | float tw; |
61 | float fsize; | 61 | float fsize; |
62 | jmp_buf env; | ||
63 | |||
62 | 64 | ||
63 | pdf = HPDF_New (error_handler, NULL); | 65 | pdf = HPDF_New (&error_handler, |
66 | &env); | ||
64 | if (! pdf) | 67 | if (! pdf) |
65 | { | 68 | { |
66 | printf ("error: cannot create PdfDoc object\n"); | 69 | printf ("error: cannot create PdfDoc object\n"); |
@@ -133,7 +136,7 @@ AG_print (json_t *user, | |||
133 | HPDF_Page_GetWidth (page) - 130, | 136 | HPDF_Page_GetWidth (page) - 130, |
134 | HPDF_FALSE, | 137 | HPDF_FALSE, |
135 | NULL); | 138 | NULL); |
136 | if ( (len < strlen (val)) && | 139 | if ( (len < (ssize_t) strlen (val)) && |
137 | (fsize > 10) ) | 140 | (fsize > 10) ) |
138 | fsize--; | 141 | fsize--; |
139 | else | 142 | 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 | |||
164 | fi | 164 | fi |
165 | 165 | ||
166 | echo -n "Testing for libeufin-cli" | 166 | echo -n "Testing for libeufin-cli" |
167 | if libeufin-cli --version > /dev/null | 167 | if libeufin-cli --version > /dev/null 2>/dev/null |
168 | then | 168 | then |
169 | echo " FOUND" | 169 | echo " FOUND" |
170 | IBAN_CREDIT=`anastasis-config -c $CONF_4 -s authorization-iban -o CREDIT_IBAN` | 170 | IBAN_CREDIT=`anastasis-config -c $CONF_4 -s authorization-iban -o CREDIT_IBAN` |