summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-03-22 17:03:31 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-03-23 15:58:47 +0100
commit005ab6e5a14f8b6df450a5374315f1e017e4f1ed (patch)
treea624b87285c4e04ead688f4cff6daea895e48a98
parentb2c3d9e7ca40e001d3ee18975427224b726dc4d1 (diff)
downloadmupdf-005ab6e5a14f8b6df450a5374315f1e017e4f1ed.tar.xz
Remove internal do/while braces in fz_try macros.
This has caught a couple of oddities...
-rw-r--r--include/mupdf/fitz/context.h8
-rw-r--r--source/pdf/pdf-form.c4
-rw-r--r--source/pdf/pdf-interpret.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h
index 5bf52c47..37bcd5ed 100644
--- a/include/mupdf/fitz/context.h
+++ b/include/mupdf/fitz/context.h
@@ -56,17 +56,17 @@ void fz_var_imp(void *);
#define fz_try(ctx) \
{ \
if (fz_push_try(ctx)) { \
- if (fz_setjmp((ctx)->error->top->buffer) == 0) do { \
+ if (fz_setjmp((ctx)->error->top->buffer) == 0) do \
#define fz_always(ctx) \
- } while (0); \
+ while (0); \
} \
if (ctx->error->top->code < 3) { \
ctx->error->top->code++; \
- do { \
+ do \
#define fz_catch(ctx) \
- } while (0); \
+ while (0); \
} \
} \
if ((ctx->error->top--)->code > 1)
diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c
index e62c954d..01efd818 100644
--- a/source/pdf/pdf-form.c
+++ b/source/pdf/pdf-form.c
@@ -949,7 +949,7 @@ void pdf_field_set_border_style(fz_context *ctx, pdf_document *doc, pdf_obj *fie
else
return;
- fz_try(ctx);
+ fz_try(ctx)
{
pdf_dict_putl(ctx, field, val, PDF_NAME_BS, PDF_NAME_S, NULL);
pdf_field_mark_dirty(ctx, doc, field);
@@ -968,7 +968,7 @@ void pdf_field_set_button_caption(fz_context *ctx, pdf_document *doc, pdf_obj *f
{
pdf_obj *val = pdf_new_string(ctx, doc, text, strlen(text));
- fz_try(ctx);
+ fz_try(ctx)
{
if (pdf_field_type(ctx, doc, field) == PDF_WIDGET_TYPE_PUSHBUTTON)
{
diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c
index 715a0f12..64a60e06 100644
--- a/source/pdf/pdf-interpret.c
+++ b/source/pdf/pdf-interpret.c
@@ -862,7 +862,7 @@ pdf_process_keyword(fz_context *ctx, pdf_processor *proc, pdf_csi *csi, fz_strea
fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find Font resource '%s'", csi->name);
font = load_font_or_hail_mary(ctx, csi->doc, csi->rdb, fontobj, 0, csi->cookie);
fz_try(ctx)
- proc->op_Tf(ctx, proc, csi->name, font, s[0]); break;
+ proc->op_Tf(ctx, proc, csi->name, font, s[0]);
fz_always(ctx)
pdf_drop_font(ctx, font);
fz_catch(ctx)