diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2006-11-21 14:43:45 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2006-11-21 14:43:45 +0000 |
commit | 76406b5cf5dc9cf9e023dc2b20af2dcd70cb94ae (patch) | |
tree | a000a77287c1a3c4e6f4048abc6dabd78e9f849d /Build/source | |
parent | cc2e24d1cbd09ab46ae5c91c48dddbf739f86351 (diff) |
makes dmp.c understand the DVD-supplied charlib names
git-svn-id: svn://tug.org/texlive/trunk@2496 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/web2c/mpware/dmp.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/mpware/dmp.c b/Build/source/texk/web2c/mpware/dmp.c index 46c50591acf..9debc6510d7 100644 --- a/Build/source/texk/web2c/mpware/dmp.c +++ b/Build/source/texk/web2c/mpware/dmp.c @@ -23,11 +23,12 @@ * gets modified. */ -char *banner="% Written by DMP, Version 0.99"; /* first line of output */ -char *term_banner="This is DMP, Version 0.99"; +char *banner="% Written by DMP, Version 0.991"; /* first line of output */ +char *term_banner="This is DMP, Version 0.991"; #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <math.h> #include <ctype.h> @@ -802,13 +803,34 @@ void stop_picture(void) char specintro[] = "vardef "; /* MetaPost name follows this */ #define speci 7 /* length of the above string */ +/* TH: A bit of trickery is added here for case-insensitive + file systems. This aliasing allows the CHARLIB directory + to exist on DVDs, for example. + It is a hack, I know. I've stuck to names on TeXLive. +*/ + +#define test_redo_search if ((c=getc(deff))==EOF) \ + deff = fsearch(cname, "", CHARLIB_TYPE); \ + else ungetc(c,deff) + + int copy_spec_char(char *cname) { int k = 0; /* how much of specintro so far */ FILE *deff; int c, s; - - deff = fsearch(cname, "", CHARLIB_TYPE); + if (strcmp(cname,"ao") == 0) { + deff = fsearch("ao.x", "", CHARLIB_TYPE); + test_redo_search; + } else if (strcmp(cname,"lh") == 0) { + deff = fsearch("lh.x", "", CHARLIB_TYPE); + test_redo_search; + } else if (strcmp(cname,"~=") == 0) { + deff = fsearch("twiddle", "", CHARLIB_TYPE); + test_redo_search; + } else { + deff = fsearch(cname, "", CHARLIB_TYPE); + } while (k<speci) { if ((c=getc(deff))==EOF) quit("No vardef in charlib/",cname,""); |