summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-22 12:31:25 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-22 12:31:25 +0000
commit9ab647a519c9349087025e280cfac5b2035585a8 (patch)
tree6d5e3ab1f12a42ff17c1155bfc826f6bd397648b /Build/source/texk/web2c/ptexdir
parent8eeb471c78437a3fc1ad286d4ff02ee2a41d50b0 (diff)
minor pTeX fixes
git-svn-id: svn://tug.org/texlive/trunk@17960 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ptexdir')
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog10
-rw-r--r--Build/source/texk/web2c/ptexdir/kanji.h2
-rw-r--r--Build/source/texk/web2c/ptexdir/pbibtex.ch11
-rw-r--r--Build/source/texk/web2c/ptexdir/pdvitype.ch11
-rw-r--r--Build/source/texk/web2c/ptexdir/ppltotf.ch34
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex.defines1
6 files changed, 37 insertions, 32 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index ce62278d2bf..d9053aa8473 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,13 @@
+2010-04-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pdvitype.ch: Remove unnecessary change.
+ * ppltotf.ch: Adapt to bug fix now done in ../pltotf.ch,
+ originally by Ken Nakano <nakano@nextsolution.co.jp>.
+ * kanji.h (inputline2): Moved from ../../ptexenc/ptexenc.h to here.
+
+ * pbibtex.ch: Correct handling of buffer_overflow. From Akira.
+ * ptex.defines (inputline3): Removed.
+
2010-04-21 Peter Breitenlohner <peb@mppmu.mpg.de>
* pdvitype.test, ppltotf.test, ptftopl.test (new): Shell scripts
diff --git a/Build/source/texk/web2c/ptexdir/kanji.h b/Build/source/texk/web2c/ptexdir/kanji.h
index 97b4844ebd8..6d514f6bdc7 100644
--- a/Build/source/texk/web2c/ptexdir/kanji.h
+++ b/Build/source/texk/web2c/ptexdir/kanji.h
@@ -30,6 +30,8 @@ extern integer kcatcodekey(integer c);
#define putc(c,fp) putc2(c,fp)
#endif /* !PRESERVE_PUTC */
+#define inputline2(fp,buff,pos,size) input_line2(fp,buff,pos,size,NULL)
+
#ifdef MP
#undef TEXMFPOOLNAME
#undef TEXMFENGINENAME
diff --git a/Build/source/texk/web2c/ptexdir/pbibtex.ch b/Build/source/texk/web2c/ptexdir/pbibtex.ch
index b1cede95c60..c2f36651dda 100644
--- a/Build/source/texk/web2c/ptexdir/pbibtex.ch
+++ b/Build/source/texk/web2c/ptexdir/pbibtex.ch
@@ -187,7 +187,7 @@ char_width[@'176] := 500;
for i:=@'240 to 254 do char_width[i]:=514;
@z
-@x [48] web2c doesn't understand f^. JBibTeX
+@x [48] JBibTeX and dynamic buf_size.
while (not eoln(f)) do
begin
if (last >= buf_size) then
@@ -197,8 +197,13 @@ for i:=@'240 to 254 do char_width[i]:=514;
end;
vgetc (f); {skip the eol}
@y
- last := input_line3(f,buffer,last,buf_size);
- if (last < 0) then buffer_overflow;
+ last := input_line2(f,buffer,last,buf_size);
+ while (not eof(f)) and (last > 0) and (buffer[last-1] <> xord[10])
+ and (buffer[last-1] <> xord[13]) do
+ begin
+ buffer_overflow;
+ last := input_line2(f,buffer,last,buf_size);
+ end;
@z
@x
diff --git a/Build/source/texk/web2c/ptexdir/pdvitype.ch b/Build/source/texk/web2c/ptexdir/pdvitype.ch
index be4e72b5e19..2eb49fd6d26 100644
--- a/Build/source/texk/web2c/ptexdir/pdvitype.ch
+++ b/Build/source/texk/web2c/ptexdir/pdvitype.ch
@@ -136,17 +136,6 @@ for k:=1 to nt do
end;
@z
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% JFM
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@x Not use fprintf() for JIS
- for k:=1 to text_ptr do print(xchr[text_buf[k]]);
- print_ln(']');
-@y
- for k:=1 to text_ptr do print(xchr[text_buf[k]]);
- print(']'); print_ln('');
-@z
-
@x
@p procedure out_text(c:ASCII_code);
begin if text_ptr=line_length-2 then flush_text;
diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch
index 16cae851e2d..f050a64d9db 100644
--- a/Build/source/texk/web2c/ptexdir/ppltotf.ch
+++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch
@@ -56,11 +56,11 @@ for k:=loc+1 to limit do print(xchr[buffer[k]]);
@z
@x [28] l.619 - pTeX:
-else begin while (limit<buf_size-1)and(not eoln(pl_file)) do
+else begin while (limit<buf_size-2)and(not eoln(pl_file)) do
begin incr(limit); read(pl_file,buffer[limit]);
end;
@y
-else begin limit:=input_line2(pl_file,buffer,limit+1,buf_size)-1;
+else begin limit:=input_line2(pl_file,buffer,limit+1,buf_size-1)-1;
@z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -71,21 +71,21 @@ else begin limit:=input_line2(pl_file,buffer,limit+1,buf_size)-1;
% This bug may be found in other routines so...
% Fix: add some (more?) space at the end of each line, in fill_buffer.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@x [28] l.622 - pTeX:
- buffer[limit+1]:=' '; right_ln:=eoln(pl_file);
- if left_ln then @<Set |loc| to the number of leading blanks in
- the buffer, and check the indentation@>;
- end;
-end;
-@y
- buffer[limit+1]:=' '; right_ln:=eoln(pl_file);
- if right_ln then begin incr(limit); buffer[limit+1]:=' ';
- end;
- if left_ln then @<Set |loc| to the number of leading blanks in
- the buffer, and check the indentation@>;
- end;
-end;
-@z
+% @x [28] l.622 - pTeX:
+% buffer[limit+1]:=' '; right_ln:=eoln(pl_file);
+% if left_ln then @<Set |loc| to the number of leading blanks in
+% the buffer, and check the indentation@>;
+% end;
+% end;
+% @y
+% buffer[limit+1]:=' '; right_ln:=eoln(pl_file);
+% if right_ln then begin incr(limit); buffer[limit+1]:=' ';
+% end;
+% if left_ln then @<Set |loc| to the number of leading blanks in
+% the buffer, and check the indentation@>;
+% end;
+% end;
+% @z
@x [36] l.754 - pTeX: May have to increase some numbers to fit new commands
@d max_name_index=88 {upper bound on the number of keywords}
diff --git a/Build/source/texk/web2c/ptexdir/ptex.defines b/Build/source/texk/web2c/ptexdir/ptex.defines
index 1f6e839ff35..e4b30cbb72d 100644
--- a/Build/source/texk/web2c/ptexdir/ptex.defines
+++ b/Build/source/texk/web2c/ptexdir/ptex.defines
@@ -2,7 +2,6 @@
@define function Hi ();
@define function Lo ();
-@define function inputline3 ();
@define function getencstring;
@define function setencstring ();