summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-18 13:52:11 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-08-18 13:52:11 +0000
commit8ec7e9e16594cda561fc22fc6607f7cbb95d4aed (patch)
treecdfe448fee20c35d425ae90826f35ff55810f1e8 /Build/source/texk/web2c/ptexdir
parentd078252edb11572f39d434c7c97b107fdd5b8e49 (diff)
more upTeX and e-upTeX
git-svn-id: svn://tug.org/texlive/trunk@23592 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ptexdir')
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog17
-rw-r--r--Build/source/texk/web2c/ptexdir/am/ptex.am4
-rw-r--r--Build/source/texk/web2c/ptexdir/kanji.c12
-rw-r--r--Build/source/texk/web2c/ptexdir/kanji.h7
-rw-r--r--Build/source/texk/web2c/ptexdir/pbibtex.ch21
-rw-r--r--Build/source/texk/web2c/ptexdir/pdvitype.ch19
-rw-r--r--Build/source/texk/web2c/ptexdir/ppltotf.ch22
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch21
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex.defines4
-rw-r--r--Build/source/texk/web2c/ptexdir/ptftopl.ch22
10 files changed, 131 insertions, 18 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index fc5bdf9cfcd..2ac952686ad 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,20 @@
+2011-08-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pbibtex.ch, pdvitype.ch, ppltotf.ch, ptftopl.ch: Add WIN32
+ option "sjis-terminal" and init_default_kanji().
+ * ptex.defines: Add sjisterminal and initdefaultkanji.
+ * kanji.[ch]: Add support for WIN32 option "sjis-terminal".
+ (check_kanji): Change return type boolean => int (for -1, 0, +1).
+ (initdefaultkanji): New function from W32TeX kanjiextra.c.
+ * am/ptex.am (*_LDADD): Use libkanji.a for all binaries.
+
+2011-08-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ pTeX update tlsvn23478-uptex-1108111825 [ptex:00267]
+ from Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * ptex-base.ch: Merged with ptex-20110723-nullfont.ch (bug fix).
+
2011-08-12 Peter Breitenlohner <peb@mppmu.mpg.de>
* ptex-base.ch: Slightly reformulate to simplify e-upTeX.
diff --git a/Build/source/texk/web2c/ptexdir/am/ptex.am b/Build/source/texk/web2c/ptexdir/am/ptex.am
index 51c38bdf5f2..e9f3c835936 100644
--- a/Build/source/texk/web2c/ptexdir/am/ptex.am
+++ b/Build/source/texk/web2c/ptexdir/am/ptex.am
@@ -4,7 +4,7 @@
## You may freely use, modify and/or distribute this file.
ptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS)
-ptex_ldadd = $(pproglib) $(PTEXENC_LIBS) $(LDADD)
+ptex_ldadd = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD)
p_tangle = WEBINPUTS=.:$(srcdir)/ptexdir:$(srcdir) $(buildenv) $(TANGLE)
pweb_programs = pbibtex pdvitype ppltotf ptftopl
@@ -50,7 +50,7 @@ EXTRA_PROGRAMS += ptex $(pweb_programs)
ptex_CPPFLAGS = $(ptex_cppflags)
# With --enable-ipc, pTeX may need to link with -lsocket.
-ptex_LDADD = libkanji.a $(ptex_ldadd) $(ipc_socketlibs)
+ptex_LDADD = $(ptex_ldadd) $(ipc_socketlibs)
# pTeX C sources
ptex_c_h = ptexini.c ptex0.c ptexcoerce.h ptexd.h
diff --git a/Build/source/texk/web2c/ptexdir/kanji.c b/Build/source/texk/web2c/ptexdir/kanji.c
index c4d1d3d7a5b..5852be396e1 100644
--- a/Build/source/texk/web2c/ptexdir/kanji.c
+++ b/Build/source/texk/web2c/ptexdir/kanji.c
@@ -5,8 +5,11 @@
#include "kanji.h"
-/* FIXME: why not boolean value */
-boolean check_kanji(integer c)
+#if !defined(WIN32)
+int sjisterminal;
+#endif
+
+int check_kanji(integer c)
{
/* FIXME: why not 255 (0xff) */
if (0 <= c && c <= 256) return -1; /* ascii without catcode */
@@ -77,3 +80,8 @@ integer kcatcodekey(integer c)
{
return Hi(toDVI(c));
}
+
+void initdefaultkanji (void)
+{
+ enable_UPTEX (false); /* disable */
+}
diff --git a/Build/source/texk/web2c/ptexdir/kanji.h b/Build/source/texk/web2c/ptexdir/kanji.h
index 421a524b56d..67a3d18f05b 100644
--- a/Build/source/texk/web2c/ptexdir/kanji.h
+++ b/Build/source/texk/web2c/ptexdir/kanji.h
@@ -13,11 +13,15 @@
#define KANJI
+#if !defined(WIN32)
+extern int sjisterminal;
+#endif
+
/* functions */
#define Hi(x) (((x) >> 8) & 0xff)
#define Lo(x) ((x) & 0xff)
-extern boolean check_kanji (integer c);
+extern int check_kanji (integer c);
#define checkkanji check_kanji
extern boolean is_kanji (integer c);
#define iskanji is_kanji
@@ -29,6 +33,7 @@ extern boolean ismultiprn (integer c);
extern integer calc_pos (integer c);
#define calcpos calc_pos
extern integer kcatcodekey (integer c);
+extern void initdefaultkanji (void);
#ifndef PRESERVE_PUTC
#undef putc
diff --git a/Build/source/texk/web2c/ptexdir/pbibtex.ch b/Build/source/texk/web2c/ptexdir/pbibtex.ch
index ee2cd84682f..fd55579304b 100644
--- a/Build/source/texk/web2c/ptexdir/pbibtex.ch
+++ b/Build/source/texk/web2c/ptexdir/pbibtex.ch
@@ -35,7 +35,7 @@
@y
\def\titlepage{F}
\centerline{\:\titlefont The {\:\ttitlefont J\BibTeX} preprocessor}
- \vskip 15pt \centerline{(Version 0.32 base on C Version \BibTeX 0.99d---\today)} \vfill}
+ \vskip 15pt \centerline{(Version 0.33 based on C Version \BibTeX 0.99d---\today)} \vfill}
@z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -226,6 +226,13 @@ begin
@<Process a possible command line@>
@z
+@x
+parse_arguments;
+@y
+init_default_kanji;
+parse_arguments;
+@z
+
@x Changes for JBibTeX by Shouichi Matsui [332]
@!b_write : hash_loc; {\.{write\$}}
@!b_default : hash_loc; {either \.{skip\$} or \.{default.type}}
@@ -514,7 +521,7 @@ var @!long_options: array[0..n_options] of getopt_struct;
begin
@<Initialize the option variables@>;
@y
-const n_options = 5; {Pascal won't count array lengths for us.}
+const n_options = 6; {Pascal won't count array lengths for us.}
var @!long_options: array[0..n_options] of getopt_struct;
@!getopt_return_val: integer;
@!option_index: c_int_type;
@@ -578,6 +585,16 @@ long_options[current_option].flag := 0;
long_options[current_option].val := 0;
incr (current_option);
+@ Shift-JIS terminal (the flag is ignored except for WIN32).
+@.-sjis-terminal@>
+
+@<Define the option...@> =
+long_options[current_option].name := 'sjis-terminal';
+long_options[current_option].has_arg := 0;
+long_options[current_option].flag := address_of (sjis_terminal);
+long_options[current_option].val := 1;
+incr (current_option);
+
@ Kanji option.
@.-kanji@>
diff --git a/Build/source/texk/web2c/ptexdir/pdvitype.ch b/Build/source/texk/web2c/ptexdir/pdvitype.ch
index 02b245a63b4..143377709a6 100644
--- a/Build/source/texk/web2c/ptexdir/pdvitype.ch
+++ b/Build/source/texk/web2c/ptexdir/pdvitype.ch
@@ -10,6 +10,13 @@
@z
@x
+ parse_arguments;
+@y
+ init_default_kanji;
+ parse_arguments;
+@z
+
+@x
for i:=@'177 to 255 do xchr[i]:='?';
@y
for i:=@'177 to 255 do xchr[i]:=i;
@@ -478,7 +485,7 @@ if (m<>id_byte) and (m<>ptex_id_byte) then
@x
const n_options = 8; {Pascal won't count array lengths for us.}
@y
-const n_options = 9; {Pascal won't count array lengths for us.}
+const n_options = 10; {Pascal won't count array lengths for us.}
@z
@x
@@ -515,6 +522,16 @@ const n_options = 9; {Pascal won't count array lengths for us.}
@x
@ An element with all zeros always ends the list.
@y
+@ Shift-JIS terminal (the flag is ignored except for WIN32).
+@.-sjis-terminal@>
+
+@<Define the option...@> =
+long_options[current_option].name := 'sjis-terminal';
+long_options[current_option].has_arg := 0;
+long_options[current_option].flag := address_of (sjis_terminal);
+long_options[current_option].val := 1;
+incr (current_option);
+
@ Decide kanji encode
@.-kanji@>
diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch
index bdba99662ba..b9903aa265e 100644
--- a/Build/source/texk/web2c/ptexdir/ppltotf.ch
+++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch
@@ -17,6 +17,13 @@
{printed when the program starts}
@z
+@x
+ parse_arguments;
+@y
+ init_default_kanji;
+ parse_arguments;
+@z
+
@x [6] l.140 - pTeX:
print_ln (version_string);
@y
@@ -346,7 +353,7 @@ end;
@x
const n_options = 3; {Pascal won't count array lengths for us.}
@y
-const n_options = 4; {Pascal won't count array lengths for us.}
+const n_options = 5; {Pascal won't count array lengths for us.}
@z
@x
var @!long_options: array[0..n_options] of getopt_struct;
@@ -392,7 +399,18 @@ begin
@x
@ An element with all zeros always ends the list.
@y
-@ kanji option.
+@ Shift-JIS terminal (the flag is ignored except for WIN32).
+@.-sjis-terminal@>
+
+@<Define the option...@> =
+long_options[current_option].name := 'sjis-terminal';
+long_options[current_option].has_arg := 0;
+long_options[current_option].flag := address_of (sjis_terminal);
+long_options[current_option].val := 1;
+incr (current_option);
+
+@ Kanji option.
+@.-kanji@>
@<Define the option...@> =
long_options[current_option].name := 'kanji';
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index 010ca831e5a..74325111e22 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -46,6 +46,7 @@
% (31/12/2010) AK Bug fix and accent Kanji by Hironori Kitagawa.
% (19/01/2011) PB Let \lastkern etc act through disp node.
% (15/04/2011) PB pTeX p3.2 Add \ifdbox and \ifddir
+% (2011-08-18) PB Bug fix by Hironori Kitagawa.
%
@x [1.2] l.200 - pTeX:
@d banner==TeX_banner
@@ -5848,6 +5849,9 @@ function get_jfm_pos(@!kcode:KANJI_code;@!f:internal_font_number):eight_bits;
var @!jc:KANJI_code; {temporary register for KANJI}
@!sp,@!mp,@!ep:pointer;
begin@/
+if f=null_font then
+ begin get_jfm_pos:=kchar_type(null_font)(0); return;
+ end;
jc:=toDVI(kcode);
sp:=1; { start position }
ep:=font_num_ext[f]-1; { end position }
@@ -6677,11 +6681,13 @@ main_i:=orig_char_info(main_f)(qi(0));
goto main_loop_j+3;
@#
main_loop_j+1: space_factor:=1000;
- fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l;
- link(tail):=main_p; tail:=main_p; last_jchr:=tail;
- fast_get_avail(main_p); info(main_p):=KANJI(cur_chr);
- link(tail):=main_p; tail:=main_p;
- cx:=cur_chr; @<Insert kinsoku penalty@>;
+ if main_f<>null_font then
+ begin fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l;
+ link(tail):=main_p; tail:=main_p; last_jchr:=tail;
+ fast_get_avail(main_p); info(main_p):=KANJI(cur_chr);
+ link(tail):=main_p; tail:=main_p;
+ cx:=cur_chr; @<Insert kinsoku penalty@>;
+ end;
ins_kp:=false;
again_2:
get_next;
@@ -6717,7 +6723,10 @@ again_2:
@#
main_loop_j+3:
if ins_kp=true then @<Insert |pre_break_penalty| of |cur_chr|@>;
- @<Look ahead for glue or kerning@>;
+ if main_f<>null_font then
+ begin @<Look ahead for glue or kerning@>;
+ end
+ else inhibit_glue_flag:=false;
if ins_kp=false then begin { Kanji -> Kanji }
goto main_loop_j+1;
end else if ins_kp=true then begin { Kanji -> Ascii }
diff --git a/Build/source/texk/web2c/ptexdir/ptex.defines b/Build/source/texk/web2c/ptexdir/ptex.defines
index e4b30cbb72d..a591012d1c2 100644
--- a/Build/source/texk/web2c/ptexdir/ptex.defines
+++ b/Build/source/texk/web2c/ptexdir/ptex.defines
@@ -27,3 +27,7 @@
@define function ismultiprn ();
@define function calcpos ();
@define function kcatcodekey ();
+
+@define procedure initdefaultkanji;
+
+@define var sjisterminal;
diff --git a/Build/source/texk/web2c/ptexdir/ptftopl.ch b/Build/source/texk/web2c/ptexdir/ptftopl.ch
index 6b384b8602b..4583d08a736 100644
--- a/Build/source/texk/web2c/ptexdir/ptftopl.ch
+++ b/Build/source/texk/web2c/ptexdir/ptftopl.ch
@@ -29,6 +29,13 @@ var @!k:integer; {all-purpose initiallization index}
tfm_file_array := cast_to_byte_pointer (xmalloc (1003+4));
@z
+@x
+ parse_arguments;
+@y
+ init_default_kanji;
+ parse_arguments;
+@z
+
@x [7] l.149 - pTeX:
print_ln (version_string);
@y
@@ -343,7 +350,7 @@ else
@x
const n_options = 4; {Pascal won't count array lengths for us.}
@y
-const n_options = 5; {Pascal won't count array lengths for us.}
+const n_options = 6; {Pascal won't count array lengths for us.}
@z
@x
var @!long_options: array[0..n_options] of getopt_struct;
@@ -390,7 +397,18 @@ begin
@x
@ An element with all zeros always ends the list.
@y
-@ kanji option
+@ Shift-JIS terminal (the flag is ignored except for WIN32).
+@.-sjis-terminal@>
+
+@<Define the option...@> =
+long_options[current_option].name := 'sjis-terminal';
+long_options[current_option].has_arg := 0;
+long_options[current_option].flag := address_of (sjis_terminal);
+long_options[current_option].val := 1;
+incr (current_option);
+
+@ Kanji option.
+@.-kanji@>
@<Define the option...@> =
long_options[current_option].name := 'kanji';