summaryrefslogtreecommitdiff
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
parent8eeb471c78437a3fc1ad286d4ff02ee2a41d50b0 (diff)
minor pTeX fixes
git-svn-id: svn://tug.org/texlive/trunk@17960 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/ptexenc/ChangeLog.TL6
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c13
-rw-r--r--Build/source/texk/ptexenc/ptexenc.h4
-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
9 files changed, 43 insertions, 49 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog.TL b/Build/source/texk/ptexenc/ChangeLog.TL
index b1ccd18f891..bc6c66bab18 100644
--- a/Build/source/texk/ptexenc/ChangeLog.TL
+++ b/Build/source/texk/ptexenc/ChangeLog.TL
@@ -1,6 +1,12 @@
ChangeLog.TL: TeX Live (TL) changes for ptexenc
===============================================
+2010-04-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ptexenc.[ch] (input_line3): Removed.
+ * ptexenc.h (inputline3): Removed.
+ (inputline2): Moved from here to ../web2c/ptexdir/kanji.h.
+
2010-04-19 Peter Breitenlohner <peb@mppmu.mpg.de>
* jisx0208.h (new): Copy of ../../libs/gd/gd-2.0.35/jisx0208.h.
diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c
index bf8378c0044..9fc23129cea 100644
--- a/Build/source/texk/ptexenc/ptexenc.c
+++ b/Build/source/texk/ptexenc/ptexenc.c
@@ -579,19 +579,6 @@ long input_line2(FILE *fp, string buff, long pos,
}
-/* only for pbibtex */
-long input_line3(FILE *fp, string buff, long pos, const long buffsize)
-{
- int i;
- long last;
-
- last = input_line2(fp, buff, pos, buffsize, &i);
- if (i == EOF && pos == last) return -1;
- if (i != EOF && i != '\n' && i != '\r') return -1;
- return last;
-}
-
-
static const_string in_filter = NULL;
static FILE *piped_fp[NOFILE];
static int piped_num = 0;
diff --git a/Build/source/texk/ptexenc/ptexenc.h b/Build/source/texk/ptexenc/ptexenc.h
index 32dd464cb70..3fc2fe2711e 100644
--- a/Build/source/texk/ptexenc/ptexenc.h
+++ b/Build/source/texk/ptexenc/ptexenc.h
@@ -49,10 +49,6 @@ extern KPSEDLL int fputs2(const char *s, FILE *fp);
/* input line with encoding conversion */
extern KPSEDLL long input_line2(FILE *fp, string buff, long pos,
const long buffsize, int *lastchar);
-#define inputline2(fp,buff,pos,size) input_line2(fp,buff,pos,size,NULL)
-extern KPSEDLL long input_line3(FILE *fp, string buff, long pos,
- const long buffsize);
-#define inputline3(fp,buff,pos,size) input_line3(fp,buff,pos,size)
/* open/close through nkf */
extern KPSEDLL void nkf_disable(void);
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 ();