diff options
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/js/pdf-js-none.c | 31 | ||||
-rw-r--r-- | source/pdf/pdf-js-util.js (renamed from source/pdf/js/pdf-util.js) | 0 | ||||
-rw-r--r-- | source/pdf/pdf-js.c (renamed from source/pdf/js/pdf-js.c) | 16 |
3 files changed, 16 insertions, 31 deletions
diff --git a/source/pdf/js/pdf-js-none.c b/source/pdf/js/pdf-js-none.c deleted file mode 100644 index 7cce12be..00000000 --- a/source/pdf/js/pdf-js-none.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "mupdf/pdf.h" - -void pdf_enable_js(fz_context *ctx, pdf_document *doc) -{ -} - -void pdf_disable_js(fz_context *ctx, pdf_document *doc) -{ -} - -int pdf_js_supported(fz_context *ctx, pdf_document *doc) -{ - return 0; -} - -void pdf_js_setup_event(pdf_js *js, pdf_js_event *e) -{ -} - -pdf_js_event *pdf_js_get_event(pdf_js *js) -{ - return NULL; -} - -void pdf_js_execute(pdf_js *js, char *code) -{ -} - -void pdf_js_execute_count(pdf_js *js, char *code, int count) -{ -} diff --git a/source/pdf/js/pdf-util.js b/source/pdf/pdf-js-util.js index 299f80ac..299f80ac 100644 --- a/source/pdf/js/pdf-util.js +++ b/source/pdf/pdf-js-util.js diff --git a/source/pdf/js/pdf-js.c b/source/pdf/pdf-js.c index 57a0191b..259a9b7a 100644 --- a/source/pdf/js/pdf-js.c +++ b/source/pdf/pdf-js.c @@ -1,4 +1,7 @@ #include "mupdf/pdf.h" + +#if FZ_ENABLE_JS + #include "mujs.h" struct pdf_js_s @@ -716,3 +719,16 @@ int pdf_js_supported(fz_context *ctx, pdf_document *doc) { return doc->js != NULL; } + +#else /* FZ_ENABLE_JS */ + +void pdf_drop_js(fz_context *ctx, pdf_js *js) { } +void pdf_enable_js(fz_context *ctx, pdf_document *doc) { } +void pdf_disable_js(fz_context *ctx, pdf_document *doc) { } +int pdf_js_supported(fz_context *ctx, pdf_document *doc) { return 0; } +void pdf_js_setup_event(pdf_js *js, pdf_js_event *e) { } +pdf_js_event *pdf_js_get_event(pdf_js *js) { return NULL; } +void pdf_js_execute(pdf_js *js, char *code) { } +void pdf_js_execute_count(pdf_js *js, char *code, int count) { } + +#endif /* FZ_ENABLE_JS */ |