From 51b8205a513e86c62121a927a067632c1a933839 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 29 Mar 2018 22:25:09 +0200 Subject: Remove need for namedump by using macros and preprocessor. Add a PDF_NAME(Foo) macro that evaluates to a pdf_obj for /Foo. Use the C preprocessor to create the enum values and string table from one include file instead of using a separate code generator tool. --- source/pdf/pdf-cmap-load.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/pdf/pdf-cmap-load.c') diff --git a/source/pdf/pdf-cmap-load.c b/source/pdf/pdf-cmap-load.c index 03c2eb35..96cef618 100644 --- a/source/pdf/pdf-cmap-load.c +++ b/source/pdf/pdf-cmap-load.c @@ -38,11 +38,11 @@ pdf_load_embedded_cmap(fz_context *ctx, pdf_document *doc, pdf_obj *stmobj) file = pdf_open_stream(ctx, stmobj); cmap = pdf_load_cmap(ctx, file); - obj = pdf_dict_get(ctx, stmobj, PDF_NAME_WMode); + obj = pdf_dict_get(ctx, stmobj, PDF_NAME(WMode)); if (pdf_is_int(ctx, obj)) pdf_set_cmap_wmode(ctx, cmap, pdf_to_int(ctx, obj)); - obj = pdf_dict_get(ctx, stmobj, PDF_NAME_UseCMap); + obj = pdf_dict_get(ctx, stmobj, PDF_NAME(UseCMap)); if (pdf_is_name(ctx, obj)) { usecmap = pdf_load_system_cmap(ctx, pdf_to_name(ctx, obj)); -- cgit v1.2.3