summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfdev.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-03-04 23:00:45 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-03-04 23:00:45 +0000
commit72332034f65e9f0fe9bb95c064463c6b3af7fb4f (patch)
treeb63b172c64e1b77ad539b8098bb1019cf782219a /Build/source/texk/dvipdfm-x/pdfdev.c
parentfccd789bbf541302533ca5c4ae75ce56b7d371db (diff)
avoid unnecessary warnings
git-svn-id: svn://tug.org/texlive/trunk@58133 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfdev.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfdev.c21
1 files changed, 10 insertions, 11 deletions
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);