diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-08-18 13:52:11 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-08-18 13:52:11 +0000 |
commit | 8ec7e9e16594cda561fc22fc6607f7cbb95d4aed (patch) | |
tree | cdfe448fee20c35d425ae90826f35ff55810f1e8 /Build/source/texk/web2c/uptexdir | |
parent | d078252edb11572f39d434c7c97b107fdd5b8e49 (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/uptexdir')
-rw-r--r-- | Build/source/texk/web2c/uptexdir/am/uptex.am | 30 | ||||
-rw-r--r-- | Build/source/texk/web2c/uptexdir/kanji.c | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/uptexdir/kanji.h | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/uptexdir/updvitype.ch | 40 | ||||
-rw-r--r-- | Build/source/texk/web2c/uptexdir/uptex-m.ch | 14 | ||||
-rw-r--r-- | Build/source/texk/web2c/uptexdir/uptex.defines | 8 |
6 files changed, 89 insertions, 18 deletions
diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am index b231964f896..58c2f479b05 100644 --- a/Build/source/texk/web2c/uptexdir/am/uptex.am +++ b/Build/source/texk/web2c/uptexdir/am/uptex.am @@ -4,6 +4,10 @@ ## You may freely use, modify and/or distribute this file. uptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) +uptex_ldadd = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) +up_tangle = WEBINPUTS=.:$(srcdir)/uptexdir:$(srcdir) $(buildenv) $(TANGLE) + +upweb_programs = updvitype ## libukanji.a for upTeX and e-upTeX ## @@ -16,12 +20,15 @@ libukanji_a_CPPFLAGS = $(uptex_cppflags) if UPTEX bin_PROGRAMS += uptex endif UPTEX -EXTRA_PROGRAMS += uptex +if UPWEB +bin_PROGRAMS += $(upweb_programs) +endif UPWEB +EXTRA_PROGRAMS += uptex $(upweb_programs) uptex_CPPFLAGS = $(uptex_cppflags) # With --enable-ipc, upTeX may need to link with -lsocket. -uptex_LDADD = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ipc_socketlibs) +uptex_LDADD = $(uptex_ldadd) $(ipc_socketlibs) # upTeX C sources uptex_c_h = uptexini.c uptex0.c uptexcoerce.h uptexd.h @@ -79,8 +86,19 @@ EXTRA_DIST += $(uptex_web_srcs) $(uptex_ch_srcs) uptexdir/uptex.defines DISTCLEANFILES += $(nodist_uptex_SOURCES) uptex.web uptex.ch uptex-web2c \ uptex.p uptex.pool uptex-tangle -## ============= - -upTeX.w: uptex.p - $(tie) -m upTeX.w uptex.web uptex.ch +## upDVItype +## +nodist_updvitype_SOURCES = updvitype.c updvitype.h +updvitype_SOURCES = uptexdir/kanji.h +updvitype_CPPFLAGS = $(uptex_cppflags) -DDHEX_CHAR_CODE +updvitype_LDADD = $(uptex_ldadd) +updvitype.c updvitype.h: updvitype-web2c + $(web2c) updvitype +updvitype-web2c: updvitype.p $(web2c_depend) uptexdir/uptex.defines + $(web2c) updvitype +updvitype.p: tangle$(EXEEXT) updvitype.web uptexdir/updvitype.ch + $(up_tangle) updvitype updvitype +updvitype.web: tie$(EXEEXT) dvitype.web dvitype.ch ptexdir/pdvitype.ch + $(tie) -m updvitype.web dvitype.web dvitype.ch ptexdir/pdvitype.ch +EXTRA_DIST += ptexdir/pdvitype.ch uptexdir/updvitype.ch diff --git a/Build/source/texk/web2c/uptexdir/kanji.c b/Build/source/texk/web2c/uptexdir/kanji.c index 5e46647ef06..b6dd47edd55 100644 --- a/Build/source/texk/web2c/uptexdir/kanji.c +++ b/Build/source/texk/web2c/uptexdir/kanji.c @@ -11,6 +11,10 @@ #define KCAT_KANJI 16 #define KCAT_HANGUL 19 +#if !defined(WIN32) +int sjisterminal; +#endif + /* m: for debug */ integer check_kanji (integer c,integer m) { @@ -362,3 +366,8 @@ integer multilenbuffchar(integer c) boolean is_internalUPTEX(void) { return false; } boolean ismultichr (int length, int nth, int c) { return false; } /* FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME */ + +void initdefaultkanji (void) +{ + enable_UPTEX (true); /* enable */ +} diff --git a/Build/source/texk/web2c/uptexdir/kanji.h b/Build/source/texk/web2c/uptexdir/kanji.h index a1b5328041c..630fb5ccdde 100644 --- a/Build/source/texk/web2c/uptexdir/kanji.h +++ b/Build/source/texk/web2c/uptexdir/kanji.h @@ -13,6 +13,10 @@ #define KANJI +#if !defined(WIN32) +extern int sjisterminal; +#endif + /* functions */ #define XXHi(x) BYTE1(x) #define XHi(x) BYTE2(x) @@ -32,6 +36,8 @@ extern integer calc_pos (integer c); #define calcpos calc_pos extern integer kcatcodekey (integer c); extern integer multilenbuffchar (integer c); +extern void initdefaultkanji (void); + #define setptexencuptex() set_enc_string("utf8", "uptex"); /* number of rest of multi-char for kcode_pos */ diff --git a/Build/source/texk/web2c/uptexdir/updvitype.ch b/Build/source/texk/web2c/uptexdir/updvitype.ch new file mode 100644 index 00000000000..84f56f1d2d9 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/updvitype.ch @@ -0,0 +1,40 @@ +@x +@d banner=='This is PDVItype, Version 3.6-p0.4' +@y +@d banner=='This is upDVItype, Version 3.6-p0.4-u0.28' +@z + +@x procedure out_kanji + if text_ptr>=line_length-3 then flush_text; + c:=toBUFF(fromDVI(c)); + incr(text_ptr); text_buf[text_ptr]:= Hi(c); + incr(text_ptr); text_buf[text_ptr]:= Lo(c); +@y + if text_ptr>=line_length-5 then flush_text; + c:=toBUFF(fromDVI(c)); + if BYTE1(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE1(c); end; + if BYTE2(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE2(c); end; + if BYTE3(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE3(c); end; + incr(text_ptr); text_buf[text_ptr]:=BYTE4(c); +@z + +@x + usage ('pdvitype'); +@y + usage ('updvitype'); +@z + +@x + usage_help (PDVITYPE_HELP, nil); +@y + usage_help (UPDVITYPE_HELP, nil); +@z + +@x + write_ln (stderr, 'pdvitype: Need exactly one file argument.'); + usage ('pdvitype'); +@y + write_ln (stderr, 'updvitype: Need exactly one file argument.'); + usage ('updvitype'); +@z + diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch index b9f1b76911b..677385b5247 100644 --- a/Build/source/texk/web2c/uptexdir/uptex-m.ch +++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch @@ -955,7 +955,7 @@ primitive("chardef",shorthand_def,char_def_code);@/ @!@:char_def_}{\.{\\chardef} primitive@> @y @d char_sub_def_code=7 {|shorthand_def| for \.{\\charsubdef}} -@d kchar_def_code=8 {|shorthand_def| for \.{\\kchardef}} +@d kchar_def_code=char_sub_def_code+1 {|shorthand_def| for \.{\\kchardef}} @<Put each...@>= primitive("chardef",shorthand_def,char_def_code);@/ @@ -1121,13 +1121,13 @@ begin if is_char_node(link(p)) then @z @x - 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); + 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); @y - 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)+cur_cmd*max_cjk_val; + 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)+cur_cmd*max_cjk_val; @z @x diff --git a/Build/source/texk/web2c/uptexdir/uptex.defines b/Build/source/texk/web2c/uptexdir/uptex.defines index e477f082092..d32c67bca64 100644 --- a/Build/source/texk/web2c/uptexdir/uptex.defines +++ b/Build/source/texk/web2c/uptexdir/uptex.defines @@ -5,8 +5,6 @@ @define function BYTE4 (); @define function Hi (); @define function Lo (); -@define procedure initdefaultkanji; -@define procedure forcesjisterm (); @define function getencstring; @define function setencstring (); @@ -43,6 +41,6 @@ @define function multilenbuffchar (); @define function nrestmultichr (); -@define const PTEXTFTOPLHELP; -@define const PTEXPLTOTFHELP; -@define const UPDVITYPEHELP; +@define procedure initdefaultkanji; + +@define var sjisterminal; |