From 72332034f65e9f0fe9bb95c064463c6b3af7fb4f Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Thu, 4 Mar 2021 23:00:45 +0000 Subject: avoid unnecessary warnings git-svn-id: svn://tug.org/texlive/trunk@58133 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/pdfdev.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'Build/source/texk/dvipdfm-x/pdfdev.c') diff --git a/Build/source/texk/dvipdfm-x/pdfdev.c b/Build/source/texk/dvipdfm-x/pdfdev.c index 403c523b3a5..39631c724ce 100644 --- a/Build/source/texk/dvipdfm-x/pdfdev.c +++ b/Build/source/texk/dvipdfm-x/pdfdev.c @@ -1243,22 +1243,11 @@ pdf_dev_eop (void) static void print_fontmap (const char *font_name, fontmap_rec *mrec) { - char *p; if (!mrec) return; MESG("\n"); -/* - The extension ".pfb" is not needed for type1 fonts. - And the extension ".pfb" prohibits to call mktexpk with right - arguments when pdftex.map is used and when type1 is not found. - Thus we discard the extension ".pfb". -*/ - p = strrchr(mrec->font_name, '.'); - if (p && strcasecmp(p, ".pfb") == 0) - *p = '\0'; - MESG("fontmap: %s -> %s", font_name, mrec->font_name); if (mrec->enc_name) MESG("(%s)", mrec->enc_name); @@ -1301,6 +1290,7 @@ print_fontmap (const char *font_name, fontmap_rec *mrec) int pdf_dev_locate_font (const char *font_name, spt_t ptsize) { + char *pp; pdf_dev *p = current_device(); int i; fontmap_rec *mrec; @@ -1334,6 +1324,15 @@ pdf_dev_locate_font (const char *font_name, spt_t ptsize) /* New font */ mrec = pdf_lookup_fontmap_record(font_name); +/* + The extension ".pfb" is not needed for type1 fonts. + And the extension ".pfb" prohibits to call mktexpk with right + arguments when pdftex.map is used and when type1 is not found. + Thus we discard the extension ".pfb". +*/ + pp = strrchr(mrec->font_name, '.'); + if (pp && strcasecmp(pp, ".pfb") == 0) + *pp = '\0'; if (dpx_conf.verbose_level > 1) print_fontmap(font_name, mrec); -- cgit v1.2.3