summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/dviljk/ChangeLog2
-rw-r--r--Build/source/texk/dviljk/dvi2xx.c75
-rw-r--r--Build/source/texk/dviljk/dvi2xx.h6
3 files changed, 47 insertions, 36 deletions
diff --git a/Build/source/texk/dviljk/ChangeLog b/Build/source/texk/dviljk/ChangeLog
index eb769644cfb..82d82f794f4 100644
--- a/Build/source/texk/dviljk/ChangeLog
+++ b/Build/source/texk/dviljk/ChangeLog
@@ -7,6 +7,8 @@
want different search paths for the dviljk variations.
(DoSpecial): Search for include files with kpathsea, both via
DVILJINPUTS and TEXINPUTS.
+ Add special hpfile-verbatim, to include PCL files verbatim,
+ without changing positioning commands.
(CopyFile, CopyHPFile): Implement TEX_HUSH option `readable.'
diff --git a/Build/source/texk/dviljk/dvi2xx.c b/Build/source/texk/dviljk/dvi2xx.c
index 071dbfc5788..285563bc811 100644
--- a/Build/source/texk/dviljk/dvi2xx.c
+++ b/Build/source/texk/dviljk/dvi2xx.c
@@ -3724,37 +3724,41 @@ bool PFlag;
/***************************** DoSpecial ***************************/
/*********************************************************************/
-#define PSFILE 0
-#define ORIENTATION 1
-#define RESETPOINTS 2
-#define DEFPOINT 3
-#define FILL 4
-#define GRAY 5
-#define PATTERN 6
-#define HPFILE 7
-#define LLX 8
-#define LLY 9
-#define URX 10
-#define URY 11
-#define RWI 12
-#define RHI 13
-
+typedef enum {
+ ORIENTATION,
+ RESETPOINTS,
+ DEFPOINT,
+ FILL,
+ GRAY,
+ PATTERN,
+ HPFILE,
+ HPFILE_VERBATIM,
+ PSFILE,
+ LLX,
+ LLY,
+ URX,
+ URY,
+ RWI,
+ RHI,
+ NKEYS
+} SpecialKeywords;
KeyDesc KeyTab[] = {
- { "psfile", String },
- { "orientation", Integer},
- { "resetpoints", String},
- { "defpoint", String},
- { "fill", String},
- { "gray", Integer},
- { "pattern", Integer},
- { "hpfile", String},
- { "llx", Integer},
- { "lly", Integer},
- { "urx", Integer},
- { "ury", Integer},
- { "rwi", Integer},
- { "rhi", Integer}
+ { ORIENTATION, "orientation", Integer},
+ { RESETPOINTS, "resetpoints", String},
+ { DEFPOINT, "defpoint", String},
+ { FILL, "fill", String},
+ { GRAY, "gray", Integer},
+ { PATTERN, "pattern", Integer},
+ { HPFILE, "hpfile", String},
+ { HPFILE_VERBATIM, "hpfile-verbatim", String},
+ { PSFILE, "psfile", String },
+ { LLX, "llx", Integer},
+ { LLY, "lly", Integer},
+ { URX, "urx", Integer},
+ { URY, "ury", Integer},
+ { RWI, "rwi", Integer},
+ { RHI, "rhi", Integer}
/*,
{"hsize", Dimension},
{"vsize", Dimension},
@@ -3764,8 +3768,6 @@ KeyDesc KeyTab[] = {
{"vscale", Number}*/
};
-#define NKEYS (sizeof(KeyTab)/sizeof(KeyTab[0]))
-
#ifdef __riscos
# ifdef LJ
@@ -3967,6 +3969,15 @@ int n;
file_type = HPFile;
break;
+ case HPFILE_VERBATIM:
+ if ( include_file && !kpse_tex_hush ("special") ) {
+ Warning("More than one \\special file name given. %s ignored", include_file);
+ free(include_file);
+ }
+ include_file = xstrdup(k.Val);
+ file_type = VerbFile;
+ break;
+
case ORIENTATION:
#ifdef IBM3812
if ((k.v.i >= 0) && (k.v.i < 4)) {
@@ -4346,7 +4357,7 @@ int *tno;
*tno = -1;
for (i = 0; i < nt; i++)
if ( IsSame(kw->Key, tab[i].Entry) ) {
- *tno = i;
+ *tno = tab[i].KeyId;
switch ( tab[i].Typ ) {
case None:
if ( kw->vt != None )
diff --git a/Build/source/texk/dviljk/dvi2xx.h b/Build/source/texk/dviljk/dvi2xx.h
index aa6564e19f3..dcfe4d95902 100644
--- a/Build/source/texk/dviljk/dvi2xx.h
+++ b/Build/source/texk/dviljk/dvi2xx.h
@@ -356,10 +356,7 @@ extern int seekchar();
/********************** Special Data Structures ***********************/
/**********************************************************************/
-typedef enum { None, String, Integer /*, Number, Dimension*/ }
-
-
-ValTyp;
+typedef enum { None, String, Integer /*, Number, Dimension*/ } ValTyp;
typedef struct {
char *Key; /* the keyword string */
char *Val; /* the value string */
@@ -370,6 +367,7 @@ typedef struct {
} v;
} KeyWord;
typedef struct {
+ int KeyId; /* the keyword ID */
char *Entry;
ValTyp Typ;
} KeyDesc;