summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2014-07-25 13:56:48 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2014-07-25 13:56:48 +0000
commit65dd3e96578b3c869dc8de2092ec0c6ae4f33e74 (patch)
tree8b5d0edf27d6a853b352bdb675afd413c07d0e63 /Build/source/texk
parent5308a9f38e3812a4a9688061729ffd0630713d93 (diff)
Use an enum for resource type instead of macros
git-svn-id: svn://tug.org/texlive/trunk@34720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog5
-rw-r--r--Build/source/texk/dvipdfm-x/dpxfile.c6
-rw-r--r--Build/source/texk/dvipdfm-x/dpxfile.h30
3 files changed, 24 insertions, 17 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index cc3e7faf48f..2d3ce243b67 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-25 Khaled Hosny <khaledhosny@eglug.org>
+
+ * dpxfile.c, dpxfile.h: Use an enum for resource type instead of
+ preprocessor macros (easier to view in a debugger).
+
2014-07-24 Khaled Hosny <khaledhosny@eglug.org>
* cff.c. cff.h, cid.c, cid.h, cid_p.h, cidtype0.c, cidtype2.c,
diff --git a/Build/source/texk/dvipdfm-x/dpxfile.c b/Build/source/texk/dvipdfm-x/dpxfile.c
index 575ba52e525..13bb42aaa61 100644
--- a/Build/source/texk/dvipdfm-x/dpxfile.c
+++ b/Build/source/texk/dvipdfm-x/dpxfile.c
@@ -70,7 +70,7 @@ dpx_file_set_verbose (void)
/* Kpathsea library does not check file type. */
-static int qcheck_filetype (const char *fqpn, int type);
+static int qcheck_filetype (const char *fqpn, dpx_res_type type);
/* For testing MIKTEX enabled compilation */
#if defined(TESTCOMPILE) && !defined(MIKTEX)
@@ -405,7 +405,7 @@ static char *dpx_find_enc_file (const char *filename);
static char *dpx_find_iccp_file (const char *filename);
FILE *
-dpx_open_file (const char *filename, int type)
+dpx_open_file (const char *filename, dpx_res_type type)
{
FILE *fp = NULL;
char *fqpn = NULL;
@@ -1157,7 +1157,7 @@ isdfont (FILE *fp)
/* This actually opens files. */
static int
-qcheck_filetype (const char *fqpn, int type)
+qcheck_filetype (const char *fqpn, dpx_res_type type)
{
int r = 1;
FILE *fp;
diff --git a/Build/source/texk/dvipdfm-x/dpxfile.h b/Build/source/texk/dvipdfm-x/dpxfile.h
index 8e1341c96a6..2ea9f9fd1be 100644
--- a/Build/source/texk/dvipdfm-x/dpxfile.h
+++ b/Build/source/texk/dvipdfm-x/dpxfile.h
@@ -25,26 +25,28 @@
#define DPX_CONFIG_FILE "dvipdfmx.cfg"
-#define DPX_RES_TYPE_FONTMAP 0x00
+typedef enum {
+ DPX_RES_TYPE_FONTMAP = 0,
-#define DPX_RES_TYPE_T1FONT 0x10
-#define DPX_RES_TYPE_TTFONT 0x11
-#define DPX_RES_TYPE_OTFONT 0x12
-#define DPX_RES_TYPE_PKFONT 0x13
-#define DPX_RES_TYPE_DFONT 0x14
+ DPX_RES_TYPE_T1FONT,
+ DPX_RES_TYPE_TTFONT,
+ DPX_RES_TYPE_OTFONT,
+ DPX_RES_TYPE_PKFONT,
+ DPX_RES_TYPE_DFONT,
-#define DPX_RES_TYPE_ENC 0x20
-#define DPX_RES_TYPE_CMAP 0x21
-#define DPX_RES_TYPE_SFD 0x22
-#define DPX_RES_TYPE_AGL 0x23
+ DPX_RES_TYPE_ENC,
+ DPX_RES_TYPE_CMAP,
+ DPX_RES_TYPE_SFD,
+ DPX_RES_TYPE_AGL,
-#define DPX_RES_TYPE_ICCPROFILE 0x30
+ DPX_RES_TYPE_ICCPROFILE,
-#define DPX_RES_TYPE_BINARY 0x40
-#define DPX_RES_TYPE_TEXT 0x41
+ DPX_RES_TYPE_BINARY,
+ DPX_RES_TYPE_TEXT
+} dpx_res_type;
#include "mfileio.h"
-extern FILE *dpx_open_file (const char *filename, int type);
+extern FILE *dpx_open_file (const char *filename, dpx_res_type type);
extern char * dpx_find_type1_file (const char *filename);
extern char * dpx_find_truetype_file (const char *filename);