summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviljk
diff options
context:
space:
mode:
authorJoachim Schrod <jschrod@acm.org>2007-07-04 15:19:29 +0000
committerJoachim Schrod <jschrod@acm.org>2007-07-04 15:19:29 +0000
commit5c4030ccef1934ff0a0535aaa069b4058d46078f (patch)
treec093935dabe85c4230d8a3db7f17d64a62392b2c /Build/source/texk/dviljk
parent4ba824b346bc89b30e8c147717ff00db7108f2cb (diff)
Rename special psfile-syntax to dvilj-psfile-syntax; that shall be
a dvilj-specific special and the previous name was too generic. git-svn-id: svn://tug.org/texlive/trunk@4544 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dviljk')
-rw-r--r--Build/source/texk/dviljk/ChangeLog14
-rw-r--r--Build/source/texk/dviljk/dvi2xx.c23
2 files changed, 29 insertions, 8 deletions
diff --git a/Build/source/texk/dviljk/ChangeLog b/Build/source/texk/dviljk/ChangeLog
index ad362e9d98c..92fc64ef125 100644
--- a/Build/source/texk/dviljk/ChangeLog
+++ b/Build/source/texk/dviljk/ChangeLog
@@ -1,3 +1,13 @@
+2007-07-04 Joachim Schrod <jschrod@acm.org>
+
+ * dvi2xx.c (DoSpecial): Add special dvilj-psfile-syntax, to
+ specify what shall be done with psfile specials, since they are
+ incompatible to dvips. Supported values: "ignore" and "dvilj".
+ Later, support for "dvips" should be added.
+ If the first keyword in a special is unknown, ignore the whole
+ special. This makes it easier to ignore specials from other
+ drivers.
+
2007-07-03 Joachim Schrod <jschrod@acm.org>
* dvi2xx.c (CopyHPFile): Open include file only once, rewind
@@ -15,10 +25,6 @@
Add special comment, to include meta-information in a DVI file.
For compatibility with other drivers, allow "comment" without
equal sign and value.
- Add special dvips-syntax, to specify what shall be done with
- psfile specials, since they are incompatible to dvips. Supported
- values: "ignore" and "dvilj". Later, support for "dvips" should be
- added.
(CopyFile, CopyHPFile): Implement TEX_HUSH option `readable.'
diff --git a/Build/source/texk/dviljk/dvi2xx.c b/Build/source/texk/dviljk/dvi2xx.c
index 93524827406..cdd0f74c4af 100644
--- a/Build/source/texk/dviljk/dvi2xx.c
+++ b/Build/source/texk/dviljk/dvi2xx.c
@@ -3760,7 +3760,7 @@ KeyDesc KeyTab[] = {
{ COMMENT, "comment", String},
{ HPFILE, "hpfile", String},
{ HPFILE_VERBATIM, "hpfile-verbatim", String},
- { PSFILE_SYNTAX, "psfile-syntax", String },
+ { PSFILE_SYNTAX, "dvilj-psfile-syntax", String },
{ PSFILE, "psfile", String },
{ LLX, "llx", Integer},
{ LLY, "lly", Integer},
@@ -3924,6 +3924,7 @@ char *str;
int n;
#endif
{
+ bool first_keyword = _TRUE;
char xs[STRSIZE], ys[STRSIZE];
char *include_file = NULL;
enum { None, VerbFile, HPFile, PSFile } file_type;
@@ -3948,6 +3949,9 @@ int n;
#endif
#endif
+ /* When the first keyword is already unknown, we skip the whole special.
+ This is probably one for another driver and the user got notified
+ already about the problem. */
while ( (str = GetKeyStr(str, &k)) != NULL ) {
/* get all keyword-value pairs */
if ( k.vt == None ) { /* no value */
@@ -3964,6 +3968,11 @@ int n;
}
include_file = xstrdup(k.Key);
file_type = VerbFile;
+ } else {
+ if ( !kpse_tex_hush ("special") )
+ Warning("Invalid keyword or value in \\special - <%s> ignored", k.Key);
+ if ( first_keyword )
+ return;
}
} else if ( GetKeyVal( &k, KeyTab, NKEYS, &i ) && i != -1 ) {
switch (i) {
@@ -4109,7 +4118,7 @@ int n;
else if ( EQ(k.Val, "dvilj") )
PSFileSyntaxTyp = PSFile_dvilj;
else
- Warning("Ignored invalid value '%s' for psfile-syntax", k.Val);
+ Warning("Ignored invalid value '%s' for dvilj-psfile-syntax", k.Val);
break;
case PSFILE:
@@ -4138,15 +4147,21 @@ int n;
default:
if ( !kpse_tex_hush ("special") )
Warning("Can't handle %s=%s command; ignored.", k.Key, k.Val);
+ if ( first_keyword )
+ return;
break;
}
- } else if (!kpse_tex_hush ("special")) {
- Warning("Invalid keyword or value in \\special - <%s> ignored", k.Key);
+ } else {
+ if ( !kpse_tex_hush ("special") )
+ Warning("Invalid keyword or value in \\special - <%s> ignored", k.Key);
+ if ( first_keyword )
+ return;
}
free (k.Key);
if ( k.Val != NULL ) free(k.Val);
+ first_keyword = _FALSE;
}
if ( include_file ) {