diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-09-18 17:41:16 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-09-18 17:41:16 +0000 |
commit | 66b470f2df657e610b117c7ee78c58656d70a618 (patch) | |
tree | 719a72a16afa3fc2e4fe9da3388570875171979e /Build/source/texk | |
parent | 76a605a66cfd96f0d1c566e2ba67c3ca6c5edcad (diff) |
pTeX: Adapt to W32TeX (from Akira)
git-svn-id: svn://tug.org/texlive/trunk@27705 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ChangeLog | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/kanji.c | 14 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/kanji.h | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ppltotf.ch | 14 |
4 files changed, 23 insertions, 24 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index 7de802b4815..d4a69447ee7 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,11 @@ +2012-08-22 Peter Breitenlohner <peb@mppmu.mpg.de> + + * ppltotf.ch: Remove putc kludge, convert knows (u)ppltotf. + + * kanji.c (init_default_kanji): Set defaults before testing + PTEX_KANJI_ENC from the environment. + * kanji.c: WIN32 defaults differ, except for pBibTeX. + 2012-07-19 Peter Breitenlohner <peb@mppmu.mpg.de> * am/ptex.am: Distribute ptex_version.h. diff --git a/Build/source/texk/web2c/ptexdir/kanji.c b/Build/source/texk/web2c/ptexdir/kanji.c index ac1769085e7..d7e5a3f26be 100644 --- a/Build/source/texk/web2c/ptexdir/kanji.c +++ b/Build/source/texk/web2c/ptexdir/kanji.c @@ -80,6 +80,13 @@ void init_default_kanji (const_string file_str, const_string internal_str) enable_UPTEX (false); /* disable */ + if (!set_enc_string (file_str, internal_str)) { + fprintf (stderr, "Bad kanji encoding \"%s\" or \"%s\".\n", + file_str ? file_str : "NULL", + internal_str ? internal_str : "NULL"); + uexit(1); + } + p = getenv ("PTEX_KANJI_ENC"); if (p) { if (!set_enc_string (p, NULL)) @@ -94,11 +101,4 @@ void init_default_kanji (const_string file_str, const_string internal_str) free(p); } #endif - - if (!set_enc_string (file_str, internal_str)) { - fprintf (stderr, "Bad kanji encoding \"%s\" or \"%s\".\n", - file_str ? file_str : "NULL", - internal_str ? internal_str : "NULL"); - uexit(1); - } } diff --git a/Build/source/texk/web2c/ptexdir/kanji.h b/Build/source/texk/web2c/ptexdir/kanji.h index c46b712d240..e4fd2f0bd2b 100644 --- a/Build/source/texk/web2c/ptexdir/kanji.h +++ b/Build/source/texk/web2c/ptexdir/kanji.h @@ -33,10 +33,15 @@ extern integer calc_pos (integer c); extern integer kcatcodekey (integer c); extern void init_default_kanji (const_string file_str, const_string internal_str); -/* for pTeX and e-pTeX */ -#define initdefaultkanji() init_default_kanji(NULL, "euc") -/* for pBibTeX, pDVItype, pPLtoTF, and pTFtoPL */ +#ifdef PBIBTEX +/* pBibTeX is EUC only */ +#define initkanji() init_default_kanji(NULL, "euc") +#elif defined(WIN32) +/* for pTeX, e-pTeX, pDVItype, pPLtoTF, and pTFtoPL */ +#define initkanji() init_default_kanji(NULL, "sjis") +#else #define initkanji() init_default_kanji(NULL, "euc") +#endif /* for pDVItype */ #define setpriorfileenc() set_prior_file_enc() diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch index a071bf0f82c..1ca61bdb0e2 100644 --- a/Build/source/texk/web2c/ptexdir/ppltotf.ch +++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch @@ -48,20 +48,6 @@ for k:=@'40 to 255 do xchr[k]:=k; for k:=first_ord to last_ord do xord[chr(k)]:=invalid_code; @z -@x [27] l.587 - pTeX: to convert putc of web2c -for k:=1 to loc do print(buffer[k]); {print the characters already scanned} -@y -for k:=1 to loc do print(xchr[buffer[k]]); - {print the characters already scanned} -@z - -@x [27] l.591 - pTeX: to convert putc of web2c -for k:=loc+1 to limit do print(buffer[k]); {print the characters yet unseen} -@y -for k:=loc+1 to limit do print(xchr[buffer[k]]); - {print the characters yet unseen} -@z - @x [28] l.619 - pTeX: else begin while (limit<buf_size-2)and(not eoln(pl_file)) do begin incr(limit); read(pl_file,buffer[limit]); |