diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-01 02:55:25 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-01 02:55:25 +0000 |
commit | 95d8ae1bb7db4490e61166bba0b7862d5cc78f03 (patch) | |
tree | 7a6bd979c873785e4639f11c7014751c6c854da7 /Build/source/texk/ptexenc | |
parent | 8ae654836fae207b632e089d0bfafc6bb6ac8f4c (diff) |
texk/ptexenc, web2c/eptexdir, web2c/euptexdir: add a new primitive \epTeXinputencoding. (from N. Abe).
git-svn-id: svn://tug.org/texlive/trunk@39532 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ptexenc')
-rw-r--r-- | Build/source/texk/ptexenc/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/ptexenc/ptexenc.c | 8 | ||||
-rw-r--r-- | Build/source/texk/ptexenc/ptexenc/ptexenc.h | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog b/Build/source/texk/ptexenc/ChangeLog index 0daf361f908..a03524a0872 100644 --- a/Build/source/texk/ptexenc/ChangeLog +++ b/Build/source/texk/ptexenc/ChangeLog @@ -1,3 +1,8 @@ +2016-02-01 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * ptexenc.c, ptexenc/ptexenc.h: Add a function setinfileenc() for a new + primitive \epTeXinputencoding in e-(u)pTeX. (from N. Abe). + 2016-01-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * ptexenc.c: Fix a bug, reported by N. Abe, in isUTF8Nstream(). diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c index 23b9ea4f052..4ad5bc6b186 100644 --- a/Build/source/texk/ptexenc/ptexenc.c +++ b/Build/source/texk/ptexenc/ptexenc.c @@ -840,6 +840,14 @@ long input_line2(FILE *fp, unsigned char *buff, long pos, return last; } +boolean setinfileenc(FILE *fp, const char *str){ + int enc; + enc = string_to_enc(str); + if (enc < 0) return false; + infile_enc[fileno(fp)] = enc; + return true; +} + #ifdef WIN32 void clear_infile_enc(FILE *fp) { diff --git a/Build/source/texk/ptexenc/ptexenc/ptexenc.h b/Build/source/texk/ptexenc/ptexenc/ptexenc.h index a4cbeb327f9..db5410e7f98 100644 --- a/Build/source/texk/ptexenc/ptexenc/ptexenc.h +++ b/Build/source/texk/ptexenc/ptexenc/ptexenc.h @@ -81,6 +81,9 @@ extern PTENCDLL int fputs2(const char *s, FILE *fp); extern PTENCDLL long input_line2(FILE *fp, unsigned char *buff, long pos, const long buffsize, int *lastchar); +/* set current encoding */ +extern PTENCDLL boolean setinfileenc(FILE *fp, const char *str); + #ifdef WIN32 extern PTENCDLL void clear_infile_enc(FILE *fp); #else |