summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorJoachim Schrod <jschrod@acm.org>2007-07-03 17:11:59 +0000
committerJoachim Schrod <jschrod@acm.org>2007-07-03 17:11:59 +0000
commit289e9ab75592f0d42a0a40aa94edcd78cf236751 (patch)
treeb40b82f43fce0c85676a1ae91e42ddea4baff872 /Build
parent30135a9b0eff10933c81dab6a3d7d09765595bb3 (diff)
Add special comment, to include meta-information in a DVI file.
git-svn-id: svn://tug.org/texlive/trunk@4539 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dviljk/ChangeLog3
-rw-r--r--Build/source/texk/dviljk/dvi2xx.c81
2 files changed, 51 insertions, 33 deletions
diff --git a/Build/source/texk/dviljk/ChangeLog b/Build/source/texk/dviljk/ChangeLog
index 82d82f794f4..da2f4b18468 100644
--- a/Build/source/texk/dviljk/ChangeLog
+++ b/Build/source/texk/dviljk/ChangeLog
@@ -9,6 +9,9 @@
DVILJINPUTS and TEXINPUTS.
Add special hpfile-verbatim, to include PCL files verbatim,
without changing positioning commands.
+ Add special comment, to include meta-information in a DVI file.
+ For compatibility with other drivers, allow "comment" without
+ equal sign and value.
(CopyFile, CopyHPFile): Implement TEX_HUSH option `readable.'
diff --git a/Build/source/texk/dviljk/dvi2xx.c b/Build/source/texk/dviljk/dvi2xx.c
index 285563bc811..c790c25b7ae 100644
--- a/Build/source/texk/dviljk/dvi2xx.c
+++ b/Build/source/texk/dviljk/dvi2xx.c
@@ -3731,6 +3731,7 @@ typedef enum {
FILL,
GRAY,
PATTERN,
+ COMMENT,
HPFILE,
HPFILE_VERBATIM,
PSFILE,
@@ -3750,6 +3751,7 @@ KeyDesc KeyTab[] = {
{ FILL, "fill", String},
{ GRAY, "gray", Integer},
{ PATTERN, "pattern", Integer},
+ { COMMENT, "comment", String},
{ HPFILE, "hpfile", String},
{ HPFILE_VERBATIM, "hpfile-verbatim", String},
{ PSFILE, "psfile", String },
@@ -3941,42 +3943,23 @@ int n;
while ( (str = GetKeyStr(str, &k)) != NULL ) {
/* get all keyword-value pairs */
- /* for compatibility, single words are taken as file names */
- if ( k.vt == None && access(k.Key, 0) == 0) {
- if ( include_file && !kpse_tex_hush ("special") ) {
- Warning("More than one \\special file name given. %s ignored", include_file);
- free (include_file);
+ if ( k.vt == None ) { /* no value */
+ /* Single word might also be "comment", then ignore the rest */
+ if ( EQ(k.Key, "comment") )
+ return;
+ /* For compatibility, single words are taken as file names. But then
+ the include file must be accessible without being searched with
+ kpathsea. */
+ if ( access(k.Key, 0) == 0 ) {
+ 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.Key);
+ file_type = VerbFile;
}
- include_file = xstrdup(k.Key);
- file_type = VerbFile;
} else if ( GetKeyVal( &k, KeyTab, NKEYS, &i ) && i != -1 ) {
switch (i) {
- case PSFILE:
- if ( include_file ) {
- Warning("More than one \\special file name given. %s ignored", include_file);
- free(include_file);
- }
- include_file = xstrdup(k.Val);
- file_type = PSFile;
- break;
-
- case HPFILE:
- 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 = 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
@@ -4090,6 +4073,38 @@ int n;
}
break;
+ case COMMENT:
+ return;
+ /*NOTREACHED*/
+ break;
+
+ case HPFILE:
+ 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 = 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 PSFILE:
+ if ( include_file ) {
+ Warning("More than one \\special file name given. %s ignored", include_file);
+ free(include_file);
+ }
+ include_file = xstrdup(k.Val);
+ file_type = PSFile;
+ break;
+
case LLX: llx = k.v.i; break;
case LLY: lly = k.v.i; break;
case URX: urx = k.v.i; break;