X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=upstream%2Fbuild%2Ftex%2Ftex.ch;h=0a2fe052756821ea99b38c2f5c1df46def94cebe;hp=d39a89c834635fa8c7986f97a182e33f35a17a46;hb=0cf8e6919a91a0f39c1d6852328b8bd1cf68160b;hpb=a5ac4a3d6bf4ca158c3111c2fd03a4628f28c3b3 diff --git a/upstream/build/tex/tex.ch b/upstream/build/tex/tex.ch index d39a89c..0a2fe05 100644 --- a/upstream/build/tex/tex.ch +++ b/upstream/build/tex/tex.ch @@ -28,7 +28,7 @@ @x @d banner=='This is TeX, Version 3.14159' {printed when \TeX\ starts} @y -@d banner=='This is TeX, Version 3.14159 for Java' {printed when \TeX\ starts} +@d banner=='This is '#27'[33;1mNesTeX'#27'[0m, Version 3.14159 for '#27'[31;1mJava'#27'[0m' @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -268,17 +268,17 @@ end; @y @ An external C procedure, |test_access| is used to check whether or not the open will work. It is declared in the ``ext.h'' include file, and it returns -|true| or |false|. The |name_of_file| global holds the file name whose access +|true| or |false|. The |Trim(name_of_file)| global holds the file name whose access is to be tested. The first parameter for |test_access| is the access mode, one of |read_access_mode| or |write_access_mode|. We also implement path searching in |test_access|: its second parameter is -one of the ``file path'' constants defined below. If |name_of_file| +one of the ``file path'' constants defined below. If |Trim(name_of_file)| doesn't start with |'/'| then |test_access| tries prepending pathnames from the appropriate path list until success or the end of path list is reached. -On return, |name_of_file| contains the original name with the path +On return, |Trim(name_of_file)| contains the original name with the path that succeeded (if any) prepended. It is the name used in the various open procedures. @@ -301,7 +301,10 @@ Path searching is not done for output files. @p function a_open_in(var f:alpha_file):boolean; {open a text file for input} -begin reset(f,name_of_file); a_open_in:=IOResult=0; +var str:String; +begin +reset(f,name_of_file); +a_open_in:=IOResult=0; end; @@ -311,7 +314,7 @@ function a_open_out(var f:alpha_file):boolean; {open a text file for output} var @!ok:boolean; begin - rewrite(f,name_of_file); + rewrite(f,Trim(name_of_file)); a_open_out:=true; end; @# @@ -319,7 +322,7 @@ function b_open_in(var f:byte_file):boolean; {open a binary file for input} var @!ok:boolean; begin - reset(f,name_of_file); + reset(f,Trim(name_of_file)); b_open_in:=true; end; @# @@ -327,7 +330,7 @@ function b_open_out(var f:byte_file):boolean; {open a binary file for output} var @!ok:boolean; begin - rewrite(f,name_of_file); + rewrite(f,Trim(name_of_file)); b_open_out:=true; end; @# @@ -335,7 +338,7 @@ function w_open_in(var f:word_file):boolean; {open a word file for input} var @!ok:boolean; begin - reset(f,name_of_file); + reset(f,Trim(name_of_file)); w_open_in:=true; end; @# @@ -343,7 +346,7 @@ function w_open_out(var f:word_file):boolean; {open a word file for output} var @!ok:boolean; begin - rewrite(f,name_of_file); + rewrite(f,Trim(name_of_file)); w_open_out:=true; end; @z