summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/agl.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-09-14 03:34:50 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-09-14 03:34:50 +0000
commit00653d612add044de9f941c7b2c562bebe60d1e8 (patch)
tree46f2e9aa6440270f015d3e9d3d17f4d4ed709691 /Build/source/texk/dvipdfm-x/agl.c
parentfb833e57545c4b4d76e01406904fdfd83f057447 (diff)
Cleanup. Remove duplicated code. Reorganize global variables. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@48663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/agl.c')
-rw-r--r--Build/source/texk/dvipdfm-x/agl.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/Build/source/texk/dvipdfm-x/agl.c b/Build/source/texk/dvipdfm-x/agl.c
index dc9f674fc48..ceaa2432322 100644
--- a/Build/source/texk/dvipdfm-x/agl.c
+++ b/Build/source/texk/dvipdfm-x/agl.c
@@ -1,6 +1,6 @@
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
- Copyright (C) 2007-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+ Copyright (C) 2007-2018 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
@@ -40,10 +40,9 @@
#include "mfileio.h"
#include "pdfparse.h"
-
+#include "dpxconf.h"
/* Hash */
#include "dpxutil.h"
-
#include "dpxfile.h"
#include "unicode.h"
@@ -52,14 +51,6 @@
static int agl_load_listfile (const char *filename, int format);
-static int verbose = 0;
-
-void
-agl_set_verbose (void)
-{
- verbose++;
-}
-
static agl_name *
agl_new_name (void)
{
@@ -408,7 +399,7 @@ agl_load_listfile (const char *filename, int is_predef)
return -1;
}
- if (verbose)
+ if (dpx_conf.verbose_level > 0)
MESG("<AGL:%s", filename);
while ((p = mfgets(wbuf, WBUF_SIZE, fp)) != NULL) {
@@ -478,7 +469,7 @@ agl_load_listfile (const char *filename, int is_predef)
duplicate->alternate = agln;
}
- if (verbose > 3) {
+ if (dpx_conf.verbose_level > 5) {
if (agln->suffix)
MESG("agl: %s [%s.%s] -->", name, agln->name, agln->suffix);
else
@@ -498,7 +489,7 @@ agl_load_listfile (const char *filename, int is_predef)
}
DPXFCLOSE(fp);
- if (verbose)
+ if (dpx_conf.verbose_level > 0)
MESG(">");
return count;
@@ -705,7 +696,7 @@ agl_sput_UTF16BE (const char *glyphstr,
IS_PUA(agln1->unicodes[0]))) {
agln0 = agl_normalized_name(name);
if (agln0) {
- if (verbose > 1 && agln0->suffix) {
+ if (dpx_conf.verbose_level > 1 && agln0->suffix) {
WARN("agl: fix %s --> %s.%s",
name, agln0->name, agln0->suffix);
}
@@ -718,7 +709,7 @@ agl_sput_UTF16BE (const char *glyphstr,
len += UC_UTF16BE_encode_char(agln1->unicodes[i], dstpp, limptr);
}
} else {
- if (verbose) {
+ if (dpx_conf.verbose_level > 0) {
WARN("No Unicode mapping for glyph name \"%s\" found.", name);
}
count++;
@@ -795,7 +786,7 @@ agl_get_unicodes (const char *glyphstr,
IS_PUA(agln1->unicodes[0]))) {
agln0 = agl_normalized_name(name);
if (agln0) {
- if (verbose > 1 && agln0->suffix) {
+ if (dpx_conf.verbose_level > 1 && agln0->suffix) {
WARN("agl: fix %s --> %s.%s",
name, agln0->name, agln0->suffix);
}
@@ -812,7 +803,7 @@ agl_get_unicodes (const char *glyphstr,
unicodes[count++] = agln1->unicodes[i];
}
} else {
- if (verbose > 1)
+ if (dpx_conf.verbose_level > 1)
WARN("No Unicode mapping for glyph name \"%s\" found.", name);
RELEASE(name);
return -1;