diff options
-rw-r--r-- | Build/source/texk/web2c/alephdir/ChangeLog | 13 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/aleph.c | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/aleph.defines | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/alephbis.c | 106 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/alephextra-rc1.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/alephextra-rc2.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/alephextra.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/alephmem.h | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/eover-rc2.ch | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/alephdir/omfilter.ch | 6 |
10 files changed, 82 insertions, 60 deletions
diff --git a/Build/source/texk/web2c/alephdir/ChangeLog b/Build/source/texk/web2c/alephdir/ChangeLog new file mode 100644 index 00000000000..0c110cfd50f --- /dev/null +++ b/Build/source/texk/web2c/alephdir/ChangeLog @@ -0,0 +1,13 @@ +2006-05-25 Roozbeh Pournader <roozbeh@farsiweb.info> + * omfilter.ch: fixed a bug in OCP processing, increased + active_mem_size from 2000 to 50000. + + * alephbis.c: updated from ../omegadir/omegabis.c: optimized UTF-8 + read/write code, fixed a macro, closed files and freed memory to + avoid a leak. + + * omfilter.ch, eover-rc2.ch: made 'weave'-able. + + * alephbis.c, aleph.c, aleph.defines, alephextra.h, + alephextra-rc1.h, alephextra-rc2.h, alephmem.h: fixed copyright + lines. diff --git a/Build/source/texk/web2c/alephdir/aleph.c b/Build/source/texk/web2c/alephdir/aleph.c index ffb921c1be1..af0fb3a0124 100644 --- a/Build/source/texk/web2c/alephdir/aleph.c +++ b/Build/source/texk/web2c/alephdir/aleph.c @@ -3,7 +3,8 @@ This file is part of the Aleph project -Copyleft (c) 2004 the Aleph team +Copyright (C) 1994--2001 John Plaice and Yannis Haralambous +Copyright (C) 2004 the Aleph team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/Build/source/texk/web2c/alephdir/aleph.defines b/Build/source/texk/web2c/alephdir/aleph.defines index 1d866c493b0..4da5858021c 100644 --- a/Build/source/texk/web2c/alephdir/aleph.defines +++ b/Build/source/texk/web2c/alephdir/aleph.defines @@ -3,7 +3,8 @@ This file is part of Aleph, which is based on the web2c distribution of TeX, -Copyleft (c) 2002--2004 the Aleph task force +Copyright (C) 1994--2000 John Plaice and Yannis Haralambous +Copyright (C) 2002--2004 the Aleph task force Aleph is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Build/source/texk/web2c/alephdir/alephbis.c b/Build/source/texk/web2c/alephdir/alephbis.c index 45594d422f5..c74eb33206a 100644 --- a/Build/source/texk/web2c/alephdir/alephbis.c +++ b/Build/source/texk/web2c/alephdir/alephbis.c @@ -3,7 +3,10 @@ This file is part of the Aleph project -Copyleft (c) 2004 the Aleph team +Copyright (C) 1994--2001 John Plaice and Yannis Haralambous +Copyright (C) 2002 Behdad Esfahbod +Copyright (C) 2002, 2005, 2006 Roozbeh Pournader +Copyright (C) 2004 the Aleph team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -84,41 +87,41 @@ runexternalocp P1C(string, external_ocp_name) fprintf(stderr, "Aleph does not currently support 31-bit chars\n"); exit(1); } - if (c>0x4000000) { - fputc(0xfc | ((c>>30) & 0x1), in_file); - fputc(0x80 | ((c>>24) & 0x3f), in_file); - fputc(0x80 | ((c>>18) & 0x3f), in_file); + if (c<0x80) { + fputc(c & 0x7f, in_file); + } else if (c<0x800) { + fputc(0xc0 | ((c>>6) & 0x1f), in_file); + fputc(0x80 | (c & 0x3f), in_file); + } else if (c<0x10000) { + fputc(0xe0 | ((c>>12) & 0xf), in_file); + fputc(0x80 | ((c>>6) & 0x3f), in_file); + fputc(0x80 | (c & 0x3f), in_file); + } else if (c<0x200000) { + fputc(0xf0 | ((c>>18) & 0x7), in_file); fputc(0x80 | ((c>>12) & 0x3f), in_file); fputc(0x80 | ((c>>6) & 0x3f), in_file); fputc(0x80 | (c & 0x3f), in_file); - } else if (c>0x200000) { + } else if (c<0x4000000) { fputc(0xf8 | ((c>>24) & 0x3), in_file); fputc(0x80 | ((c>>18) & 0x3f), in_file); fputc(0x80 | ((c>>12) & 0x3f), in_file); fputc(0x80 | ((c>>6) & 0x3f), in_file); fputc(0x80 | (c & 0x3f), in_file); - } else if (c>0x10000) { - fputc(0xf0 | ((c>>18) & 0x7), in_file); + } else { /* c>=0x4000000 */ + fputc(0xfc | ((c>>30) & 0x1), in_file); + fputc(0x80 | ((c>>24) & 0x3f), in_file); + fputc(0x80 | ((c>>18) & 0x3f), in_file); fputc(0x80 | ((c>>12) & 0x3f), in_file); fputc(0x80 | ((c>>6) & 0x3f), in_file); fputc(0x80 | (c & 0x3f), in_file); - } else if (c>0x800) { - fputc(0xe0 | ((c>>12) & 0xf), in_file); - fputc(0x80 | ((c>>6) & 0x3f), in_file); - fputc(0x80 | (c & 0x3f), in_file); - } else if (c>0x80) { - fputc(0xc0 | ((c>>6) & 0x1f), in_file); - fputc(0x80 | (c & 0x3f), in_file); - } else { - fputc(c & 0x7f, in_file); } } fclose(in_file); -#define advance_cin if ((c_in = fgetc(out_file)) == -1) { \ +#define advance_cin do { if ((c_in = fgetc(out_file)) == -1) { \ fprintf(stderr, "File contains bad char\n"); \ goto end_of_while; \ - } + } } while (0) #ifdef WIN32 out_file_name = concat(tempenv, "/__aleph__out__XXXXXX"); @@ -151,55 +154,58 @@ runexternalocp P1C(string, external_ocp_name) otpoutputend = 0; otpoutputbuf[otpoutputend] = 0; while ((c_in = fgetc(out_file)) != -1) { - if (c_in>=0xfc) { - c = (c_in & 0x1) << 30; - {advance_cin} - c |= (c_in & 0x3f) << 24; - {advance_cin} - c |= (c_in & 0x3f) << 18; - {advance_cin} + if (c_in<0x80) { + c = c_in & 0x7f; + } else if (c_in<0xe0) { + c = (c_in & 0x1f) << 6; + advance_cin; + c |= c_in & 0x3f; + } else if (c_in<=0xf0) { + c = (c_in & 0xf) << 12; + advance_cin; + c |= (c_in & 0x3f) << 6; + advance_cin; + c |= c_in & 0x3f; + } else if (c_in<0xf8) { + c = (c_in & 0x7) << 18; + advance_cin; c |= (c_in & 0x3f) << 12; - {advance_cin} + advance_cin; c |= (c_in & 0x3f) << 6; - {advance_cin} + advance_cin; c |= c_in & 0x3f; - } else if (c_in>=0xf8) { + } else if (c_in<0xfc) { c = (c_in & 0x3) << 24; - {advance_cin} + advance_cin; c |= (c_in & 0x3f) << 18; - {advance_cin} + advance_cin; c |= (c_in & 0x3f) << 12; - {advance_cin} + advance_cin; c |= (c_in & 0x3f) << 6; - {advance_cin} + advance_cin; c |= c_in & 0x3f; - } else if (c_in>=0xf0) { - c = (c_in & 0x7) << 18; - {advance_cin} + } else { /* c>=0xfc */ + c = (c_in & 0x1) << 30; + advance_cin; + c |= (c_in & 0x3f) << 24; + advance_cin; + c |= (c_in & 0x3f) << 18; + advance_cin; c |= (c_in & 0x3f) << 12; - {advance_cin} - c |= (c_in & 0x3f) << 6; - {advance_cin} - c |= c_in & 0x3f; - } else if (c_in>=0xe0) { - c = (c_in & 0xf) << 12; - {advance_cin} + advance_cin; c |= (c_in & 0x3f) << 6; - {advance_cin} + advance_cin; c |= c_in & 0x3f; - } else if (c_in>=0x80) { - c = (c_in & 0x1f) << 6; - {advance_cin} - c |= c_in & 0x3f; - } else { - c = c_in & 0x7f; } otpoutputbuf[++otpoutputend] = c; } end_of_while: + fclose(out_file); remove(in_file_name); remove(out_file_name); + free(in_file_name); + free(out_file_name); } #else diff --git a/Build/source/texk/web2c/alephdir/alephextra-rc1.h b/Build/source/texk/web2c/alephdir/alephextra-rc1.h index 516577b59c4..65fb762da5c 100644 --- a/Build/source/texk/web2c/alephdir/alephextra-rc1.h +++ b/Build/source/texk/web2c/alephdir/alephextra-rc1.h @@ -5,7 +5,7 @@ This file is part of Aleph. -Copyleft (c) 2004 the Aleph team +Copyright (c) 2004 the Aleph team Aleph is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Build/source/texk/web2c/alephdir/alephextra-rc2.h b/Build/source/texk/web2c/alephdir/alephextra-rc2.h index 99d0a2be53c..ad0139ac263 100644 --- a/Build/source/texk/web2c/alephdir/alephextra-rc2.h +++ b/Build/source/texk/web2c/alephdir/alephextra-rc2.h @@ -5,7 +5,7 @@ This file is part of Aleph. -Copyleft (c) 2004 the Aleph team +Copyright (C) 2004 the Aleph team Aleph is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Build/source/texk/web2c/alephdir/alephextra.h b/Build/source/texk/web2c/alephdir/alephextra.h index 99d0a2be53c..ad0139ac263 100644 --- a/Build/source/texk/web2c/alephdir/alephextra.h +++ b/Build/source/texk/web2c/alephdir/alephextra.h @@ -5,7 +5,7 @@ This file is part of Aleph. -Copyleft (c) 2004 the Aleph team +Copyright (C) 2004 the Aleph team Aleph is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Build/source/texk/web2c/alephdir/alephmem.h b/Build/source/texk/web2c/alephdir/alephmem.h index 28704c3aacf..901ab0aa9f3 100644 --- a/Build/source/texk/web2c/alephdir/alephmem.h +++ b/Build/source/texk/web2c/alephdir/alephmem.h @@ -3,7 +3,8 @@ This file is part of the Aleph project, which is based on the web2c distribution of TeX. -Copyleft (c) 2004 the Aleph team +Copyright (C) 1994--2000 John Plaice and Yannis Haralambous +Copyright (C) 2004 the Aleph team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/Build/source/texk/web2c/alephdir/eover-rc2.ch b/Build/source/texk/web2c/alephdir/eover-rc2.ch index d43b817c88c..71209c78e83 100644 --- a/Build/source/texk/web2c/alephdir/eover-rc2.ch +++ b/Build/source/texk/web2c/alephdir/eover-rc2.ch @@ -15,7 +15,7 @@ {printed when \eTeX\ starts} @y @d eTeX_version_banner=='2.1' {current \eTeX\ version} -@d Omega_version_banner=='1.15' {current \Omega\ version} +@d Omega_version_banner=='1.15' {current $\Omega$ version} @d Aleph_version_banner=='0.0-rc4' {current \Aleph\ version} @d eTeX_version_string=="2.1" {current \eTeX\ version} @d Omega_version_string=="1.15" { \.{\\OmegaVersion} } diff --git a/Build/source/texk/web2c/alephdir/omfilter.ch b/Build/source/texk/web2c/alephdir/omfilter.ch index e57dcb0ae78..ac2063ac4da 100644 --- a/Build/source/texk/web2c/alephdir/omfilter.ch +++ b/Build/source/texk/web2c/alephdir/omfilter.ch @@ -26,7 +26,7 @@ @y {string of length |file_name_size|; tells where the string pool appears} @.TeXformats@> -@!active_mem_size=2000; {number of words of |active_info| for active ocps} +@!active_mem_size=50000; {number of words of |active_info| for active ocps} @z %--------------------------------------- @x [5] - Omega Translation @@ -503,7 +503,7 @@ if (first+otp_output_end)>=buf_size then overflow("(OTP invaded) buffer size", buf_size); { FIXME do something about it!!! } end; -push_input; { FIXME has no pop_input!!! } +push_input; { FIXME has no |pop_input|!!! } current_ocp_lstack:=active_lstack_no(active_real); current_ocp_no:=active_counter(active_real); state:=mid_line; @@ -516,7 +516,7 @@ for otp_counter:=1 to otp_output_end do begin end; {|if last>=max_buf_stack then max_buf_stack:=last+1;|} limit:=last-1; -{first:=last;} +first:=last; end @ |