diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-01-05 06:47:30 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-01-05 06:47:30 +0000 |
commit | 2fa3ace8e2fef6e8c7c4336917808b63a1ccca21 (patch) | |
tree | 16692a214adc35d25b1debb0b4797fca5035bf7a /Build/source/texk/ptexenc | |
parent | e5c8e95e9c8ff215f00a510e5e4b6d24abd554e7 (diff) |
enable -kanji option in pdvitype and updvitype: patch from TANAKA Takuji-san.
git-svn-id: svn://tug.org/texlive/trunk@25028 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ptexenc')
-rw-r--r-- | Build/source/texk/ptexenc/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/ptexenc/ptexenc.c | 9 | ||||
-rw-r--r-- | Build/source/texk/ptexenc/ptexenc/ptexenc.h | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog b/Build/source/texk/ptexenc/ChangeLog index f6ac1bf7989..1d316aa8691 100644 --- a/Build/source/texk/ptexenc/ChangeLog +++ b/Build/source/texk/ptexenc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-05 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * ptexenc/ptexenc.h, ptexenc.c: add set_prior_file_enc() in order to + enable -kanji option in pdvitype and updvitype. + (patch from TANAKA Takuji-san). + 2011-10-07 Peter Breitenlohner <peb@mppmu.mpg.de> * ptexenc.c, ptexenc/ptexenc.h: Declare and export Poptr. diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c index d12f3459b56..59a17cdea4d 100644 --- a/Build/source/texk/ptexenc/ptexenc.c +++ b/Build/source/texk/ptexenc/ptexenc.c @@ -25,6 +25,7 @@ static int default_kanji_enc = ENC_UTF8; static boolean UPTEX_enabled; +static boolean prior_file_enc = false; #define ESC '\033' @@ -157,6 +158,11 @@ void enable_UPTEX (boolean enable) } } +void set_prior_file_enc(void) +{ + prior_file_enc = true; +} + const_string get_enc_string(void) { static char buffer[20]; /* enough large space */ @@ -437,7 +443,8 @@ int putc2(int c, FILE *fp) const int fd = fileno(fp); int ret = c, output_enc; - if (fp == stdout || fp == stderr) output_enc = get_terminal_enc(); + if ((fp == stdout || fp == stderr) && !(prior_file_enc)) + output_enc = get_terminal_enc(); else output_enc = get_file_enc(); if (num[fd] > 0) { /* multi-byte char */ diff --git a/Build/source/texk/ptexenc/ptexenc/ptexenc.h b/Build/source/texk/ptexenc/ptexenc/ptexenc.h index 54dd63ab336..34e9092c6d1 100644 --- a/Build/source/texk/ptexenc/ptexenc/ptexenc.h +++ b/Build/source/texk/ptexenc/ptexenc/ptexenc.h @@ -32,6 +32,7 @@ extern PTENCDLL int infile_enc_auto; /* enable/disable UPTEX */ extern PTENCDLL void enable_UPTEX (boolean enable); +extern PTENCDLL void set_prior_file_enc(void); /* get/set Kanji encoding by string */ extern PTENCDLL const_string get_enc_string(void); |