Index: texk/web2c/xetexdir/xetex.h =================================================================== --- texk/web2c/xetexdir/xetex.h (revision 4491) +++ texk/web2c/xetexdir/xetex.h (working copy) @@ -63,8 +63,7 @@ #define dviopenout(f) open_dvi_output(&(f)) -#define casttoptr(x) (void*)(x) -#define casttointeger(x) (long)(x) +#define nullptr (NULL) #define glyphinfobyte(p,k) ((unsigned char*)p)[k] #define casttoushort(x) (unsigned short)(x) Index: texk/web2c/xetexdir/xetex.defines =================================================================== --- texk/web2c/xetexdir/xetex.defines (revision 4491) +++ texk/web2c/xetexdir/xetex.defines (working copy) @@ -32,6 +32,8 @@ { xetex.defines: additions for xetex } +@define @field ptr; +@define const nullptr; @define type voidpointer; @define function getnativechar(); @define procedure setnativechar(); Index: texk/web2c/xetexdir/xetex-new.ch =================================================================== --- texk/web2c/xetexdir/xetex-new.ch (revision 4491) +++ texk/web2c/xetexdir/xetex-new.ch (working copy) @@ -56,7 +56,7 @@ @d XeTeX_version=0 @d XeTeX_revision==".996" -@d XeTeX_version_string=='-0.996' {current \XeTeX\ version} +@d XeTeX_version_string=='-0.996-patch1' {current \XeTeX\ version} @z @x @@ -706,29 +706,28 @@ To support ``native'' fonts, we build |native_word_nodes|, which are variable size whatsits. These have the same |width|, |depth|, and |height| fields as a |box_node|, at offsets 1-3, -and then a word containing a size field for the node, a font number, and a length. -Then there is a field containing two halfwords, a glyph count and a C pointer to a glyph info array; -these are set by |set_native_metrics|. Copying and freeing of these nodes needs to take account of this! +and then a word containing a size field for the node, a font number, a length, and a glyph count. +Then there is a field containing a C pointer to a glyph info array; +this and the glyph count are set by |set_native_metrics|. +Copying and freeing of these nodes needs to take account of this! This is followed by |length| bytes, for the actual characters of the string. (Yes, we count in bytes, even though what we store there is UTF-16.) So |native_node_size|, which does not include any space for the actual text, is 6.} -@d deleted_native_node=41 {native words that have been superseded by their successors} - @d native_node_size=6 {size of a native_word node (plus the actual chars) -- see also xetex.h} -@d native_size(#)==mem[#+4].hh.b0 -@d native_font(#)==mem[#+4].hh.b1 -@d native_length(#)==mem[#+4].hh.rh -@d native_glyph_count(#)==mem[#+5].hh.lh -@d native_glyph_info_ptr(#)==mem[#+5].hh.rh +@d native_size(#)==mem[#+4].qqqq.b0 +@d native_font(#)==mem[#+4].qqqq.b1 +@d native_length(#)==mem[#+4].qqqq.b2 +@d native_glyph_count(#)==mem[#+4].qqqq.b3 +@d native_glyph_info_ptr(#)==mem[#+5].ptr @d native_glyph_info_size=10 { number of bytes of info per glyph: 16-bit glyph ID, 32-bit x and y coords } @d free_native_glyph_info(#) == begin - if native_glyph_info_ptr(#) <> 0 then begin - libc_free(cast_to_ptr(native_glyph_info_ptr(#))); - native_glyph_info_ptr(#) := 0; + if native_glyph_info_ptr(#) <> null_ptr then begin + libc_free(native_glyph_info_ptr(#)); + native_glyph_info_ptr(#) := null_ptr; native_glyph_count(#) := 0; end end @@ -736,10 +735,10 @@ @p procedure copy_native_glyph_info(src:pointer; dest:pointer); var glyph_count:integer; begin - if native_glyph_info_ptr(src) <> 0 then begin + if native_glyph_info_ptr(src) <> null_ptr then begin glyph_count := native_glyph_count(src); - native_glyph_info_ptr(dest) := cast_to_integer(xmalloc_array(char, glyph_count * native_glyph_info_size)); - memcpy(cast_to_ptr(native_glyph_info_ptr(dest)), cast_to_ptr(native_glyph_info_ptr(src)), glyph_count * native_glyph_info_size); + native_glyph_info_ptr(dest) := xmalloc_array(char, glyph_count * native_glyph_info_size); + memcpy(native_glyph_info_ptr(dest), native_glyph_info_ptr(src), glyph_count * native_glyph_info_size); native_glyph_count(dest) := glyph_count; end end; @@ -2936,8 +2935,7 @@ end @ @= -while (q <> null) and (not is_char_node(q)) - and ( (type(q) = disc_node) or ((type(q) = whatsit_node) and (subtype(q) = deleted_native_node)) ) do +while (q <> null) and (not is_char_node(q)) and (type(q) = disc_node) do q := link(q) @ We ought to give special care to the efficiency of one part of |hlist_out|, @@ -3293,7 +3291,6 @@ or (subtype(v)=pic_node) or (subtype(v)=pdf_node) then break_width[1]:=break_width[1]-width(v) - else if subtype(v)=deleted_native_node then do_nothing else confusion("disc1a"); othercases confusion("disc1") @z @@ -3307,7 +3304,6 @@ or (subtype(s)=pic_node) or (subtype(s)=pdf_node) then break_width[1]:=break_width[1]+width(s) - else if subtype(s)=deleted_native_node then do_nothing else confusion("disc2a"); othercases confusion("disc2") @z @@ -3327,7 +3323,6 @@ or (subtype(s)=pic_node) or (subtype(s)=pdf_node) then disc_width:=disc_width+width(s) - else if subtype(s)=deleted_native_node then do_nothing else confusion("disc3a"); othercases confusion("disc3") @z @@ -3341,7 +3336,6 @@ or (subtype(s)=pic_node) or (subtype(s)=pdf_node) then act_width:=act_width+width(s) - else if subtype(s)=deleted_native_node then do_nothing else confusion("disc4a"); othercases confusion("disc4") @z @@ -3784,7 +3778,7 @@ @!main_p:pointer; {temporary register for list manipulation} @y @!main_p:pointer; {temporary register for list manipulation} -@!main_pp:pointer; {another temporary register for list manipulation} +@!main_pp,@!main_ppp:pointer; {more temporary registers for list manipulation} @!main_h:pointer; {temp for hyphen offset in native-font text} @!is_hyph:boolean; {whether the last char seen is the font's hyphenchar} @z @@ -3859,11 +3853,22 @@ if mode=hmode then begin + main_ppp := head; + if main_ppp<>main_pp then + while (link(main_ppp)<>main_pp) do + main_ppp:=link(main_ppp); { find node preceding tail } + temp_ptr := str_start_macro(str_ptr); repeat if main_h = 0 then main_h := main_k; - if (not is_char_node(main_pp)) and (type(main_pp)=whatsit_node) and (subtype(main_pp)=native_word_node) and (native_font(main_pp)=main_f) then begin + if (not is_char_node(main_pp)) + and (type(main_pp)=whatsit_node) + and (subtype(main_pp)=native_word_node) + and (native_font(main_pp)=main_f) + and (main_ppp<>main_pp) + and type(main_ppp)<>disc_node + then begin { make a new temp string that contains the concatenated text of |tail| + the current word/fragment } main_k := main_h + native_length(main_pp); @@ -3888,9 +3893,13 @@ do incr(main_h); { look for next hyphen or end of text } if (main_h < main_k) then incr(main_h); - { flag the previous node as no longer valid } - free_native_glyph_info(main_pp); - subtype(main_pp) := deleted_native_node; + { remove the preceding node from the list } + link(main_ppp) := link(main_pp); + link(main_pp) := null; + flush_node_list(main_pp); + main_pp := tail; + while (link(main_ppp)<>main_pp) do + main_ppp:=link(main_ppp); end else begin @@ -3929,9 +3938,14 @@ set_native_char(tail, main_p + native_length(main_pp), str_pool[str_start_macro(str_ptr) + main_p]); set_native_metrics(tail, XeTeX_use_glyph_metrics); - { flag the previous node as no longer valid } - free_native_glyph_info(main_pp); - subtype(main_pp) := deleted_native_node; + { remove the preceding node from the list } + main_p := head; + if main_p<>main_pp then + while link(main_p)<>main_pp do + main_p := link(main_p); + link(main_p) := link(main_pp); + link(main_pp) := null; + flush_node_list(main_pp); end else begin { package the current string into a |native_word| whatsit } link(main_pp) := new_native_word_node(main_f, main_k); @@ -3997,7 +4011,6 @@ @y if type(p)<>kern_node then if type(p)<>ligature_node then if (type(p)<>whatsit_node) or ((subtype(p)<>native_word_node) - and (subtype(p)<>deleted_native_node) and (subtype(p)<>glyph_node)) then begin print_err("Improper discretionary list"); @z @@ -4802,8 +4815,10 @@ print_char(" "); print_native_word(p); end; +@{ deleted_native_node: print("[DELETED]"); +@} glyph_node:begin print_esc(font_id_text(native_font(p))); print(" glyph#"); @@ -4837,12 +4852,9 @@ r:=get_node(words); while words > 0 do begin decr(words); mem[r+words]:=mem[p+words]; end; - native_glyph_info_ptr(r):=0; native_glyph_count(r):=0; + native_glyph_info_ptr(r):=null_ptr; native_glyph_count(r):=0; copy_native_glyph_info(p, r); end; -deleted_native_node: begin words:=native_size(p); - r:=get_node(words); - end; glyph_node: begin r:=get_node(glyph_node_size); words:=glyph_node_size; end; @@ -4858,7 +4870,6 @@ othercases confusion("ext3") @y native_word_node: begin free_native_glyph_info(p); free_node(p,native_size(p)); end; -deleted_native_node: free_node(p,native_size(p)); glyph_node: free_node(p,glyph_node_size); pic_node,pdf_node: free_node(p,total_pic_node_size(p)); pdf_save_pos_node: @@ -5106,7 +5117,7 @@ dvi_two(native_glyph(p)); cur_h := cur_h + width(p); end else begin - if native_glyph_info_ptr(p) <> 0 then begin + if native_glyph_info_ptr(p) <> null_ptr then begin len := make_xdv_glyph_array_data(p); for k := 0 to len-1 do dvi_out(xdv_buffer_byte(k)); @@ -5231,7 +5242,7 @@ @x language_node:do_nothing; @y -language_node,deleted_native_node:do_nothing; +language_node:do_nothing; @z @x @@ -6012,6 +6023,11 @@ goto next_p; @ Here we compute the effective width of a glue node as in |hlist_out|. + +@= +glue_node: begin round_glue; + @; + end; @z @x @@ -6106,7 +6122,7 @@ native_length(q) := n; native_glyph_count(q) := 0; - native_glyph_info_ptr(q) := 0; + native_glyph_info_ptr(q) := null_ptr; new_native_word_node := q; end; @@ -6163,7 +6179,7 @@ native_size(p) := native_node_size + 1; native_glyph_count(p) := 0; - native_glyph_info_ptr(p) := 0; + native_glyph_info_ptr(p) := null_ptr; native_font(p) := f; if c > @"FFFF then begin Index: texk/web2c/xetexdir/XeTeX_mac.c =================================================================== --- texk/web2c/xetexdir/XeTeX_mac.c (revision 4491) +++ texk/web2c/xetexdir/XeTeX_mac.c (working copy) @@ -162,7 +162,7 @@ lsDelta -= lsUnit; native_glyph_count(node) = realGlyphCount; - native_glyph_info_ptr(node) = (long)glyph_info; + native_glyph_info_ptr(node) = glyph_info; if (!justify) node_width(node) = FixedPStoTeXPoints(layoutRec[count-1].realPos) + lsDelta; Index: texk/web2c/xetexdir/XeTeX_ext.c =================================================================== --- texk/web2c/xetexdir/XeTeX_ext.c (revision 4491) +++ texk/web2c/xetexdir/XeTeX_ext.c (working copy) @@ -236,9 +236,9 @@ } -extern char* gettexstring(int strNumber); +extern char* gettexstring(integer strNumber); void -setinputfileencoding(UFILE* f, int mode, int encodingData) +setinputfileencoding(UFILE* f, integer mode, integer encodingData) { if ((f->encodingMode == ICUMAPPING) && (f->conversionData != NULL)) ucnv_close((UConverter*)(f->conversionData)); @@ -288,9 +288,9 @@ static char* byteBuffer = NULL; UInt32 bytesRead = 0; - int i; + int i; UConverter* cnv; - long outLen; + int outLen; UErrorCode errorCode = 0; if (byteBuffer == NULL) @@ -355,10 +355,9 @@ static int brkLocaleStrNum = 0; void -linebreakstart(int localeStrNum, const UniChar* text, int textLength) +linebreakstart(integer localeStrNum, const UniChar* text, integer textLength) { UErrorCode status = 0; - int i; if ((localeStrNum != brkLocaleStrNum) && (brkIter != NULL)) { ubrk_close(brkIter); @@ -392,8 +391,8 @@ return ubrk_next((UBreakIterator*)brkIter); } -long -getencodingmodeandinfo(long* info) +int +getencodingmodeandinfo(integer* info) { /* \XeTeXinputencoding "enc-name" * -> name is packed in |nameoffile| as a C string, starting at [1] @@ -811,7 +810,7 @@ } void* -findnativefont(unsigned char* uname, long scaled_size) +findnativefont(unsigned char* uname, integer scaled_size) /* scaled_size here is in TeX points */ { void* rval = 0; @@ -950,7 +949,6 @@ otgetfontmetrics(void* pEngine, scaled* ascent, scaled* descent, scaled* xheight, scaled* capheight, scaled* slant) { XeTeXLayoutEngine engine = (XeTeXLayoutEngine)pEngine; - long rval = 0; float a, d; int glyphID; @@ -977,8 +975,8 @@ *capheight = *ascent; /* arbitrary figure if there's no 'X' in the font */ } -long -otfontget(int what, void* pEngine) +integer +otfontget(integer what, void* pEngine) { XeTeXLayoutEngine engine = (XeTeXLayoutEngine)pEngine; XeTeXFont fontInst = getFont(engine); @@ -995,8 +993,8 @@ } -long -otfontget1(int what, void* pEngine, long param) +integer +otfontget1(integer what, void* pEngine, integer param) { XeTeXLayoutEngine engine = (XeTeXLayoutEngine)pEngine; XeTeXFont fontInst = getFont(engine); @@ -1013,8 +1011,8 @@ } -long -otfontget2(int what, void* pEngine, long param1, long param2) +integer +otfontget2(integer what, void* pEngine, integer param1, integer param2) { XeTeXLayoutEngine engine = (XeTeXLayoutEngine)pEngine; XeTeXFont fontInst = getFont(engine); @@ -1032,8 +1030,8 @@ } -long -otfontget3(int what, void* pEngine, long param1, long param2, long param3) +integer +otfontget3(integer what, void* pEngine, integer param1, integer param2, integer param3) { XeTeXLayoutEngine engine = (XeTeXLayoutEngine)pEngine; XeTeXFont fontInst = getFont(engine); @@ -1091,7 +1089,7 @@ xdvbuffer = (char*)xmalloc(xdvBufSize); } - glyph_info = (void*)native_glyph_info_ptr(p); + glyph_info = native_glyph_info_ptr(p); locations = (FixedPoint*)glyph_info; glyphIDs = (UInt16*)(locations + glyphCount); @@ -1138,8 +1136,8 @@ return ((char*)cp - xdvbuffer); } -long -makefontdef(long f) +int +makefontdef(integer f) { UInt16 flags = 0; UInt32 variationCount = 0; @@ -1349,7 +1347,7 @@ } void -getnativecharheightdepth(int font, int ch, scaled* height, scaled* depth) +getnativecharheightdepth(integer font, integer ch, scaled* height, scaled* depth) { #define QUAD(f) fontinfo[6+parambase[f]].cint #define X_HEIGHT(f) fontinfo[5+parambase[f]].cint @@ -1389,7 +1387,7 @@ } scaled -getnativecharht(int f, int c) +getnativecharht(integer f, integer c) { scaled h, d; getnativecharheightdepth(f, c, &h, &d); @@ -1397,7 +1395,7 @@ } scaled -getnativechardp(int f, int c) +getnativechardp(integer f, integer c) { scaled h, d; getnativecharheightdepth(f, c, &h, &d); @@ -1405,7 +1403,7 @@ } void -getnativecharsidebearings(int font, int ch, scaled* lsb, scaled* rsb) +getnativecharsidebearings(integer font, integer ch, scaled* lsb, scaled* rsb) { float l, r; @@ -1432,7 +1430,7 @@ } scaled -getnativecharic(int f, int c) +getnativecharic(integer f, integer c) { scaled lsb, rsb; getnativecharsidebearings(f, c, &lsb, &rsb); @@ -1443,7 +1441,7 @@ } scaled -getnativecharwd(int f, int c) +getnativecharwd(integer f, integer c) { scaled wd = 0; #ifdef XETEX_MAC @@ -1515,7 +1513,7 @@ void* glyph_info = 0; static float* positions = 0; static UInt32* glyphs = 0; - static long maxGlyphs = 0; + static int maxGlyphs = 0; FixedPoint* locations; UInt16* glyphIDs; @@ -1591,7 +1589,7 @@ node_width(node) = X2Fix(wid); native_glyph_count(node) = realGlyphCount; - native_glyph_info_ptr(node) = (long)glyph_info; + native_glyph_info_ptr(node) = glyph_info; } else { int i; @@ -1632,7 +1630,7 @@ } native_glyph_count(node) = realGlyphCount; - native_glyph_info_ptr(node) = (long)glyph_info; + native_glyph_info_ptr(node) = glyph_info; } ubidi_close(pBiDi); @@ -1787,8 +1785,8 @@ } } -int -mapchartoglyph(int font, unsigned int ch) +integer +mapchartoglyph(integer font, integer ch) { if (ch > 0x10ffff || ((ch >= 0xd800) && (ch <= 0xdfff))) return 0; @@ -1805,8 +1803,8 @@ } } -int -mapglyphtoindex(int font) +integer +mapglyphtoindex(integer font) /* glyph name is at nameoffile+1 */ { #ifdef XETEX_MAC @@ -1822,8 +1820,8 @@ } } -int -getfontcharrange(int font, int first) +integer +getfontcharrange(integer font, int first) { #ifdef XETEX_MAC if (fontarea[font] == AAT_FONT_FLAG) @@ -1928,10 +1926,10 @@ #endif } -long +int atsufontget(int what, ATSUStyle style) { - long rval = -1; + int rval = -1; #ifdef XETEX_MAC ATSUFontID fontID; @@ -1966,10 +1964,10 @@ return rval; } -long +int atsufontget1(int what, ATSUStyle style, int param) { - long rval = -1; + int rval = -1; #ifdef XETEX_MAC ATSUFontID fontID; @@ -2026,10 +2024,10 @@ return rval; } -long +int atsufontget2(int what, ATSUStyle style, int param1, int param2) { - long rval = -1; + int rval = -1; #ifdef XETEX_MAC ATSUFontID fontID; @@ -2063,10 +2061,10 @@ return rval; } -long +int atsufontgetnamed(int what, ATSUStyle style) { - long rval = -1; + int rval = -1; #ifdef XETEX_MAC ATSUFontID fontID; @@ -2090,10 +2088,10 @@ return rval; } -long +int atsufontgetnamed1(int what, ATSUStyle style, int param) { - long rval = -1; + int rval = -1; #ifdef XETEX_MAC ATSUFontID fontID; @@ -2220,7 +2218,7 @@ } void -printglyphname(int font, int gid) +printglyphname(integer font, integer gid) { char* s; int len = 0; @@ -2243,8 +2241,8 @@ printchar(*s++); } -boolean -u_open_in(unicodefile* f, int filefmt, const_string fopen_mode, int mode, int encodingData) +int +u_open_in(unicodefile* f, integer filefmt, const_string fopen_mode, integer mode, integer encodingData) { boolean rval; *f = malloc(sizeof(UFILE)); @@ -2287,7 +2285,7 @@ return rval; } -boolean +int open_dvi_output(FILE** fptr) { if (nopdfoutput) { @@ -2391,7 +2389,7 @@ return rval; } -boolean +int input_line(UFILE* f) { int i; Index: texk/web2c/xetexdir/XeTeX_ext.h =================================================================== --- texk/web2c/xetexdir/XeTeX_ext.h (revision 4491) +++ texk/web2c/xetexdir/XeTeX_ext.h (working copy) @@ -141,10 +141,10 @@ #define node_width(node) node[width_offset].cint #define node_depth(node) node[depth_offset].cint #define node_height(node) node[height_offset].cint -#define native_length(node) node[native_info_offset].hh.v.RH -#define native_font(node) node[native_info_offset].hh.b1 -#define native_glyph_count(node) node[native_glyph_info_offset].hh.v.LH -#define native_glyph_info_ptr(node) node[native_glyph_info_offset].hh.v.RH +#define native_length(node) node[native_info_offset].qqqq.b2 +#define native_font(node) node[native_info_offset].qqqq.b1 +#define native_glyph_count(node) node[native_info_offset].qqqq.b3 +#define native_glyph_info_ptr(node) node[native_glyph_info_offset].ptr #define native_glyph_info_size 10 /* info for each glyph is location (FixedPoint) + glyph ID (UInt16) */ #define native_glyph(p) native_length(p) /* glyph ID field in a glyph_node */ @@ -206,6 +206,8 @@ extern const UInt32 byteMask; extern const UInt32 byteMark; +#include /* for FILE */ + #include "trans.h" #ifdef __cplusplus @@ -213,51 +215,62 @@ #endif void initversionstring(char **versions); - void setinputfileencoding(unicodefile f, int mode, int encodingData); + void setinputfileencoding(unicodefile f, integer mode, integer encodingData); void uclose(unicodefile f); int input_line_icu(unicodefile f); - void linebreakstart(int localeStrNum, const UniChar* text, int textLength); + void linebreakstart(integer localeStrNum, const UniChar* text, integer textLength); int linebreaknext(); - long getencodingmodeandinfo(long* info); + int getencodingmodeandinfo(integer* info); void printutf8str(const unsigned char* str, int len); void printchars(const unsigned short* str, int len); void* load_mapping_file(const char* s, const char* e); - void* findnativefont(unsigned char* name, long scaled_size); + void* findnativefont(unsigned char* name, integer scaled_size); void releasefontengine(void* engine, int type_flag); - /* 'integer' params here are really TeX 'scaled' values, but that typedef isn't available every place this is included */ + /* the metrics params here are really TeX 'scaled' values, but that typedef isn't available every place this is included */ void otgetfontmetrics(void* engine, integer* ascent, integer* descent, integer* xheight, integer* capheight, integer* slant); - void getnativecharheightdepth(int font, int ch, integer* height, integer* depth); - void getnativecharsidebearings(int font, int ch, integer* lsb, integer* rsb); + void getnativecharheightdepth(integer font, integer ch, integer* height, integer* depth); + void getnativecharsidebearings(integer font, integer ch, integer* lsb, integer* rsb); /* single-purpose metrics accessors */ - integer getnativecharwd(int font, int ch); - integer getnativecharht(int font, int ch); - integer getnativechardp(int font, int ch); - integer getnativecharic(int font, int ch); + integer getnativecharwd(integer font, integer ch); + integer getnativecharht(integer font, integer ch); + integer getnativechardp(integer font, integer ch); + integer getnativecharic(integer font, integer ch); - long otfontget(int what, void* engine); - long otfontget1(int what, void* engine, long param); - long otfontget2(int what, void* engine, long param1, long param2); - long otfontget3(int what, void* engine, long param1, long param2, long param3); + integer otfontget(integer what, void* engine); + integer otfontget1(integer what, void* engine, integer param); + integer otfontget2(integer what, void* engine, integer param1, integer param2); + integer otfontget3(integer what, void* engine, integer param1, integer param2, integer param3); int makeXDVGlyphArrayData(void* p); - long makefontdef(long f); + int makefontdef(integer f); int applymapping(void* cnv, const UniChar* txtPtr, int txtLen); void store_justified_native_glyphs(void* node); void measure_native_node(void* node, int use_glyph_metrics); Fixed get_native_ital_corr(void* node); Fixed get_native_glyph_ital_corr(void* node); void measure_native_glyph(void* node, int use_glyph_metrics); - int mapchartoglyph(int font, unsigned int ch); - int mapglyphtoindex(int font); + integer mapchartoglyph(integer font, integer ch); + integer mapglyphtoindex(integer font); + integer getfontcharrange(integer font, int first); + void printglyphname(integer font, integer gid); + double read_double(const char** s); + unsigned int read_rgb_a(const char** cp); + const char* getGlyphNamePtr(const char* buffer, int tableSize, UInt16 gid, int* len); int find_pic_file(char** path, realrect* bounds, int pdfBoxType, int page); + int u_open_in(unicodefile* f, integer filefmt, const char* fopen_mode, integer mode, integer encodingData); + int open_dvi_output(FILE** fptr); + void dviclose(FILE* fptr); + int get_uni_c(UFILE* f); + int input_line(UFILE* f); + void makeutf16name(); #ifdef XETEX_MAC /* functions in XeTeX_mac.c */ - void* loadAATfont(ATSFontRef fontRef, long scaled_size, const char* cp1); + void* loadAATfont(ATSFontRef fontRef, integer scaled_size, const char* cp1); void DoAtsuiLayout(void* node, int justify); void GetGlyphBBox_AAT(ATSUStyle style, UInt16 gid, GlyphBBox* bbox); float GetGlyphWidth_AAT(ATSUStyle style, UInt16 gid); Index: texk/web2c/texmfmem.h =================================================================== --- texk/web2c/texmfmem.h (revision 4491) +++ texk/web2c/texmfmem.h (working copy) @@ -112,33 +112,20 @@ #else twohalves hhfield; #endif -#ifdef WORDS_BIGENDIAN #ifdef XeTeX - struct - { - integer CINT; - integer CINT1; - } x; -#else - integer cint; + voidpointer ptr; #endif +#ifdef WORDS_BIGENDIAN + integer cint; fourquarters qqqq; #else /* not WORDS_BIGENDIAN */ -#ifdef XeTeX struct { - integer CINT1; - integer CINT; - } x; -#else - struct - { #if defined (TeX) && !defined (SMALLTeX) || defined (MF) && !defined (SMALLMF) || defined (MP) && !defined (SMALLMP) halfword junk; #endif /* big {TeX,MF,MP} */ integer CINT; } u; -#endif struct { @@ -159,28 +146,13 @@ typedef union { #ifdef WORDS_BIGENDIAN -#ifdef XeTeX - struct - { - integer CINT; - } x; -#else integer cint; -#endif fourquarters qqqq; #else /* not WORDS_BIGENDIAN */ -#ifdef XeTeX struct { - halfword junk; integer CINT; - } x; -#else - struct - { - integer CINT; } u; -#endif struct { @@ -199,14 +171,9 @@ #define rh v.RH #define lhfield v.LH -#ifdef XeTeX -#define cint x.CINT -#define cint1 x.CINT1 -#else #ifndef WORDS_BIGENDIAN #define cint u.CINT #endif -#endif /* XeTeX */ #ifndef WORDS_BIGENDIAN #define qqqq v.QQQQ