summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir/ptex-base.ch
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-08-11 22:53:04 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-08-11 22:53:04 +0000
commit1c1ad254bc2ef588b6e6c7975209d31aa99f3b73 (patch)
tree87c54feffc3bc3acfcae8d6152589c390e1a14a4 /Build/source/texk/web2c/ptexdir/ptex-base.ch
parente2563cede9ce7068f20c7f5898d18bcf25e0837c (diff)
Allow file names with 0x5c in (e)pTeX on Windows.
git-svn-id: svn://tug.org/texlive/trunk@31414 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ptexdir/ptex-base.ch')
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch32
1 files changed, 32 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index 5bac4890118..fabc9971fb1 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -114,6 +114,7 @@ var k,@!l:KANJI_code; {small indices or counters}
pseudoprinting}
@!trick_buf2:array[0..ssup_error_line] of 0..2; {pTeX: buffer for KANJI}
@!kcode_pos: 0..2; {pTeX: denotes whether first byte or second byte of KANJI}
+@!prev_char: ASCII_code;
@z
@x [5.55] l.1519 - pTeX: Initialize the kcode_pos
@@ -2406,6 +2407,37 @@ else if (cur_cmd>active_char)or(cur_chr>255) then
end;
@z
+@x pTeX for Windows, treat filename with 0x5c
+@p procedure begin_name;
+begin area_delimiter:=0; ext_delimiter:=0; quoted_filename:=false;
+end;
+@y
+@p procedure begin_name;
+begin area_delimiter:=0; ext_delimiter:=0; quoted_filename:=false; prev_char:=0;
+end;
+@z
+
+@x pTeX for Windows, treat filename with 0x5c
+else begin str_room(1); append_char(c); {contribute |c| to the current string}
+ if IS_DIR_SEP(c) then
+ begin area_delimiter:=cur_length; ext_delimiter:=0;
+ end
+ else if c="." then ext_delimiter:=cur_length;
+ more_name:=true;
+ end;
+end;
+@y
+else begin str_room(1); append_char(c); {contribute |c| to the current string}
+ if (IS_DIR_SEP(c)and(not_kanji_char_seq(prev_char,c))) then
+ begin area_delimiter:=cur_length; ext_delimiter:=0;
+ end
+ else if c="." then ext_delimiter:=cur_length;
+ more_name:=true;
+ end;
+ prev_char:=c;
+end;
+@z
+
@x [29.526] l.10668 - pTeX: scan file name
loop@+begin if (cur_cmd>other_char)or(cur_chr>255) then {not a character}
begin back_input; goto done;