$OpenBSD: patch-texk_web2c_xetexdir_XeTeX_ext_c,v 1.1.1.1 2007/07/17 21:53:33 jasper Exp $ --- texk/web2c/xetexdir/XeTeX_ext.c.orig Mon Jan 15 13:04:36 2007 +++ texk/web2c/xetexdir/XeTeX_ext.c Fri Jun 22 10:51:56 2007 @@ -236,9 +236,9 @@ void initversionstring(char **versions) } -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 @@ input_line_icu(UFILE* f) 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 UBreakIterator* brkIter = NULL; 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 @@ linebreaknext() 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 @@ splitFontName(char* name, char** var, char** feat, cha } 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 @@ void 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 @@ otgetfontmetrics(void* pEngine, scaled* ascent, scaled *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 @@ otfontget(int what, void* pEngine) } -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 @@ otfontget1(int what, void* pEngine, long param) } -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 @@ otfontget2(int what, void* pEngine, long param1, long } -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 @@ makeXDVGlyphArrayData(void* pNode) 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 @@ makeXDVGlyphArrayData(void* pNode) return ((char*)cp - xdvbuffer); } -long -makefontdef(long f) +int +makefontdef(integer f) { UInt16 flags = 0; UInt32 variationCount = 0; @@ -1349,7 +1347,7 @@ snap_zone(scaled* value, scaled snap_value, scaled fuz } 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 @@ getnativecharheightdepth(int font, int ch, scaled* hei } scaled -getnativecharht(int f, int c) +getnativecharht(integer f, integer c) { scaled h, d; getnativecharheightdepth(f, c, &h, &d); @@ -1397,7 +1395,7 @@ getnativecharht(int f, int c) } scaled -getnativechardp(int f, int c) +getnativechardp(integer f, integer c) { scaled h, d; getnativecharheightdepth(f, c, &h, &d); @@ -1405,7 +1403,7 @@ getnativechardp(int f, int c) } 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 @@ getnativecharsidebearings(int font, int ch, scaled* ls } scaled -getnativecharic(int f, int c) +getnativecharic(integer f, integer c) { scaled lsb, rsb; getnativecharsidebearings(f, c, &lsb, &rsb); @@ -1443,7 +1441,7 @@ getnativecharic(int f, int c) } scaled -getnativecharwd(int f, int c) +getnativecharwd(integer f, integer c) { scaled wd = 0; #ifdef XETEX_MAC @@ -1515,7 +1513,7 @@ measure_native_node(void* pNode, int use_glyph_metrics 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 @@ measure_native_node(void* pNode, int use_glyph_metrics 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 @@ measure_native_node(void* pNode, int use_glyph_metrics } 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 @@ measure_native_glyph(void* pNode, int use_glyph_metric } } -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 @@ mapchartoglyph(int font, unsigned int ch) } } -int -mapglyphtoindex(int font) +integer +mapglyphtoindex(integer font) /* glyph name is at nameoffile+1 */ { #ifdef XETEX_MAC @@ -1822,8 +1820,8 @@ mapglyphtoindex(int font) } } -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 @@ atsugetfontmetrics(ATSUStyle style, Fixed* ascent, Fix #endif } -long +int atsufontget(int what, ATSUStyle style) { - long rval = -1; + int rval = -1; #ifdef XETEX_MAC ATSUFontID fontID; @@ -1966,10 +1964,10 @@ atsufontget(int what, ATSUStyle style) 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 @@ atsufontget1(int what, ATSUStyle style, int param) 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 @@ atsufontget2(int what, ATSUStyle style, int param1, in return rval; } -long +int atsufontgetnamed(int what, ATSUStyle style) { - long rval = -1; + int rval = -1; #ifdef XETEX_MAC ATSUFontID fontID; @@ -2090,10 +2088,10 @@ atsufontgetnamed(int what, ATSUStyle style) 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 @@ atsuprintfontname(int what, ATSUStyle style, int param } void -printglyphname(int font, int gid) +printglyphname(integer font, integer gid) { char* s; int len = 0; @@ -2243,8 +2241,8 @@ printglyphname(int font, int gid) 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 @@ u_open_in(unicodefile* f, int filefmt, const_string fo return rval; } -boolean +int open_dvi_output(FILE** fptr) { if (nopdfoutput) { @@ -2391,7 +2389,7 @@ get_uni_c(UFILE* f) return rval; } -boolean +int input_line(UFILE* f) { int i;