vcpkg/ports/libmupdf/use-if-instead-of-ifdef-in-writer.patch

40 lines
1.6 KiB
Diff
Raw Normal View History

--- a/source/fitz/writer.c
+++ b/source/fitz/writer.c
@@ -169,7 +169,7 @@ fz_new_document_writer(fz_context *ctx, const char *path, const char *explicit_f
format = strrchr(path, '.');
while (format)
{
-#ifdef FZ_ENABLE_OCR_OUTPUT
+#if FZ_ENABLE_OCR_OUTPUT
if (is_extension(format, "ocr"))
return fz_new_pdfocr_writer(ctx, path, options);
#endif
@@ -219,11 +219,11 @@ fz_new_document_writer(fz_context *ctx, const char *path, const char *explicit_f
if (is_extension(format, "stext.json"))
return fz_new_text_writer(ctx, "stext.json", path, options);
-#ifdef FZ_ENABLE_ODT_OUTPUT
+#if FZ_ENABLE_ODT_OUTPUT
if (is_extension(format, "odt"))
return fz_new_odt_writer(ctx, path, options);
#endif
-#ifdef FZ_ENABLE_DOCX_OUTPUT
+#if FZ_ENABLE_DOCX_OUTPUT
if (is_extension(format, "docx"))
return fz_new_docx_writer(ctx, path, options);
#endif
@@ -267,11 +267,11 @@ fz_new_document_writer_with_output(fz_context *ctx, fz_output *out, const char *
if (is_extension(format, "stext.json"))
return fz_new_text_writer_with_output(ctx, "stext.json", out, options);
-#ifdef FZ_ENABLE_ODT_OUTPUT
+#if FZ_ENABLE_ODT_OUTPUT
if (is_extension(format, "odt"))
return fz_new_odt_writer_with_output(ctx, out, options);
#endif
-#ifdef FZ_ENABLE_DOCX_OUTPUT
+#if FZ_ENABLE_DOCX_OUTPUT
if (is_extension(format, "docx"))
return fz_new_docx_writer_with_output(ctx, out, options);
#endif