diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-05-05 14:59:16 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-05-05 14:59:16 +0000 |
commit | 8cea5ff4b0216ab69be00a2fcef7f00acd84868b (patch) | |
tree | a2fc06b851f29303eb94bdf1ef8a1b7ddadefab7 /Build/source | |
parent | 573a4bfca168d1c77325143aa9bb7f39dcf2cd93 (diff) |
final sources for luatex 0.70.0 (to be released tomorrow)
git-svn-id: svn://tug.org/texlive/trunk@22312 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 16 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/NEWS | 23 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/image/writepng.w | 148 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/llfslibext.c | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lnodelib.c | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/loslibext.c | 12 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/ltexlib.c | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/luainit.w | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex.c | 20 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex_svnversion.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texfileio.w | 16 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texmath.w | 101 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/utils/utils.w | 8 |
13 files changed, 254 insertions, 123 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index a9719fc8f39..fed549f3658 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,19 @@ +2011-05-05 Taco Hoekwater <taco@luatex.org> + * image/writepng.w: fixes for libpng 1.5.2. + * lua/lnodelib.c (lua_nodelib_fields): fix field count for + nodes without subtype. + * lua/llfslibext.c: fix an variable type and a compiler warning. + * lua/loslibext.c (os_execute): fix non-argument use of os.execute. + * lua/ltexlib.c (do_luacprint): fix use of bad catcode tables. + * lua/luainit.w (HAVE_ASPRINTF): superfluous test removed. + * luatex.c: bump version to 0.70, remove SOCK_NONBLOCK definition. + * luatex_svnversion.h (luatex_svn_revision): now at 4247. + * NEWS: updated for luatex 0.70.0 release. + * tex/texfileio.w: patch from bug 615 (recorder filename location). + * tex/texmath.w: fix display alignment in TRT mode. + * utils/utils.w (HAVE_ASPRINTF): superfluous test removed. + + 2011-04-16 Peter Breitenlohner <peb@mppmu.mpg.de> * utils/synctex{-common.h,.c,.h} (removed): Use copies from diff --git a/Build/source/texk/web2c/luatexdir/NEWS b/Build/source/texk/web2c/luatexdir/NEWS index fad2afefcc8..30af5bba58e 100644 --- a/Build/source/texk/web2c/luatexdir/NEWS +++ b/Build/source/texk/web2c/luatexdir/NEWS @@ -2,7 +2,26 @@ This file is in the public domain. ============================================================== -Luatex beta-0.66.0 was released 20110512 +Luatex beta-0.70.0 was released 20110506 +============================================================== + +News: + +* fixed: various changes needed for libpng 1.5.2. + +* fixed: node.fields() for nodes without subtype. + +* fixed: non-argument use of os.execute(). + +* fixed: tex.[s|t|]print() with invalid catcode table arguments. + +* fixed: recorder filename location with --output-directory. + +* fixed: display alignment in TRT mode. + + +============================================================== +Luatex beta-0.66.0 was released 20110412 ============================================================== News: @@ -1899,7 +1918,7 @@ Other news: we probably introduced new problems as well). * Most (all?) files now have a corrected Copyright header, - and link in $Id$ and $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/NEWS $ into the object file. + and link in $Id$ and $URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/NEWS $ into the object file. * Some unnecessary files were removed from the distribution. diff --git a/Build/source/texk/web2c/luatexdir/image/writepng.w b/Build/source/texk/web2c/luatexdir/image/writepng.w index dea43ff0d18..0ca7b35137c 100644 --- a/Build/source/texk/web2c/luatexdir/image/writepng.w +++ b/Build/source/texk/web2c/luatexdir/image/writepng.w @@ -20,8 +20,8 @@ @ @c static const char _svn_version[] = - "$Id: writepng.w 4133 2011-04-11 16:54:11Z oneiros $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/image/writepng.w $"; + "$Id: writepng.w 4240 2011-05-01 20:52:01Z hhenkel $ " + "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/image/writepng.w $"; #include <assert.h> #include "ptexlib.h" @@ -47,7 +47,6 @@ static void close_and_cleanup_png(image_dict * idict) @ @c void read_png_info(PDF pdf, image_dict * idict, img_readtype_e readtype) { - double gamma; png_structp png_p; png_infop info_p; assert(idict != NULL); @@ -70,31 +69,9 @@ void read_png_info(PDF pdf, image_dict * idict, img_readtype_e readtype) pdftex_fail("libpng: internal error"); png_init_io(png_p, img_file(idict)); png_read_info(png_p, info_p); - /* simple transparency support */ - if (png_get_valid(png_p, info_p, PNG_INFO_tRNS)) { - png_set_tRNS_to_alpha(png_p); - } - /* alpha channel support */ - if (pdf->minor_version < 4 && png_get_color_type(png_p, info_p) | PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_p); - /* 16bit depth support */ - if (pdf->minor_version < 5) - pdf->image_hicolor = 0; - if ((png_get_bit_depth(png_p, info_p) == 16) && (pdf->image_hicolor == 0)) - png_set_strip_16(png_p); - /* gamma support */ - if (pdf->image_apply_gamma) { - if (png_get_gAMA(png_p, info_p, &gamma)) - png_set_gamma(png_p, (pdf->gamma / 1000.0), gamma); - else - png_set_gamma(png_p, (pdf->gamma / 1000.0), - (1000.0 / pdf->image_gamma)); - } - /* reset structure */ - png_read_update_info(png_p, info_p); /* resolution support */ - img_xsize(idict) = (int) png_get_image_width (png_p, info_p); - img_ysize(idict) = (int) png_get_image_height (png_p, info_p); + img_xsize(idict) = (int) png_get_image_width(png_p, info_p); + img_ysize(idict) = (int) png_get_image_height(png_p, info_p); if (png_get_valid(png_p, info_p, PNG_INFO_pHYs)) { img_xres(idict) = round(0.0254 * (double) png_get_x_pixels_per_meter(png_p, info_p)); @@ -114,7 +91,8 @@ void read_png_info(PDF pdf, image_dict * idict, img_readtype_e readtype) img_procset(idict) |= PROCSET_IMAGE_C; break; default: - pdftex_fail("unsupported type of color_type <%i>", (int)png_get_color_type (png_p, info_p)); + pdftex_fail("unsupported type of color_type <%i>", + (int) png_get_color_type(png_p, info_p)); } img_colordepth(idict) = png_get_bit_depth(png_p, info_p); if (readtype == IMG_CLOSEINBETWEEN) @@ -539,7 +517,9 @@ static boolean last_png_needs_page_group; void write_png(PDF pdf, image_dict * idict) { - double gamma, checked_gamma; + boolean png_copy = true; + double gamma = 0.0; + png_fixed_point int_file_gamma = 0; int i; int palette_objnum = 0; png_structp png_p; @@ -557,27 +537,62 @@ void write_png(PDF pdf, image_dict * idict) if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) pdf_printf(pdf, "%s\n", img_attr(idict)); pdf_printf(pdf, "/Width %i\n/Height %i\n/BitsPerComponent %i\n", - (int) png_get_image_width (png_p, info_p), - (int) png_get_image_height (png_p, info_p), + (int) png_get_image_width(png_p, info_p), + (int) png_get_image_height(png_p, info_p), (int) png_get_bit_depth(png_p, info_p)); pdf_puts(pdf, "/ColorSpace "); - checked_gamma = 1.0; + /* simple transparency support */ + if (png_get_valid(png_p, info_p, PNG_INFO_tRNS)) { + png_set_tRNS_to_alpha(png_p); + png_copy = false; + } + /* alpha channel support */ + if (pdf->minor_version < 4 + && png_get_color_type(png_p, info_p) | PNG_COLOR_MASK_ALPHA) { + png_set_strip_alpha(png_p); + png_copy = false; + } + /* 16 bit depth support */ + if (pdf->minor_version < 5) + pdf->image_hicolor = 0; + if ((png_get_bit_depth(png_p, info_p) == 16) && (pdf->image_hicolor == 0)) { + png_set_strip_16(png_p); + png_copy = false; + } + /* gamma support */ + if (png_get_valid(png_p, info_p, PNG_INFO_gAMA)) { + png_get_gAMA(png_p, info_p, &gamma); + png_get_gAMA_fixed(png_p, info_p, &int_file_gamma); + } if (pdf->image_apply_gamma) { - if (png_get_gAMA(png_p, info_p, &gamma)) { - checked_gamma = (pdf->gamma / 1000.0) * gamma; - } else { - checked_gamma = (pdf->gamma / 1000.0) * (1000.0 / pdf->image_gamma); - } + if (png_get_valid(png_p, info_p, PNG_INFO_gAMA)) + png_set_gamma(png_p, (pdf->gamma / 1000.0), gamma); + else + png_set_gamma(png_p, (pdf->gamma / 1000.0), + (1000.0 / pdf->image_gamma)); + png_copy = false; } - /* the switching between |info_p| and |png_p| queries has been trial and error. - */ - if (pdf->minor_version > 1 - && png_get_interlace_type (png_p, info_p) == PNG_INTERLACE_NONE - &&!(png_get_color_type (png_p, info_p) == PNG_COLOR_TYPE_GRAY_ALPHA || - png_get_color_type (png_p, info_p) == PNG_COLOR_TYPE_RGB_ALPHA) - && ((pdf->image_hicolor != 0) || (png_get_bit_depth (png_p, info_p) <= 8)) - && (checked_gamma <= 1.01 && checked_gamma > 0.99) + /* reset structure */ + (void) png_set_interlace_handling(png_p); + png_read_update_info(png_p, info_p); + + if (png_copy && pdf->minor_version > 1 + && png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE + && (png_get_color_type(png_p, info_p) == PNG_COLOR_TYPE_GRAY + || png_get_color_type(png_p, info_p) == PNG_COLOR_TYPE_RGB) + && !pdf->image_apply_gamma + && (!png_get_valid(png_p, info_p, PNG_INFO_gAMA) + || int_file_gamma == PNG_FP_1) + && !png_get_valid(png_p, info_p, PNG_INFO_cHRM) + && !png_get_valid(png_p, info_p, PNG_INFO_iCCP) + && !png_get_valid(png_p, info_p, PNG_INFO_sBIT) + && !png_get_valid(png_p, info_p, PNG_INFO_sRGB) + && !png_get_valid(png_p, info_p, PNG_INFO_bKGD) + && !png_get_valid(png_p, info_p, PNG_INFO_hIST) + && !png_get_valid(png_p, info_p, PNG_INFO_tRNS) + && !png_get_valid(png_p, info_p, PNG_INFO_sPLT) ) { + /* Copy PNG */ png_colorp palette; int num_palette; @@ -614,22 +629,37 @@ void write_png(PDF pdf, image_dict * idict) } } else { if (0) { - tex_printf(" PNG copy skipped because: "); - if ((pdf->image_apply_gamma != 0) && - (checked_gamma > 1.01 || checked_gamma < 0.99)) - tex_printf("gamma delta=%lf ", checked_gamma); - if ((png_get_color_type (png_p, info_p) != PNG_COLOR_TYPE_GRAY) - && (png_get_color_type (png_p, info_p) != PNG_COLOR_TYPE_RGB) - && (png_get_color_type (png_p, info_p) != PNG_COLOR_TYPE_PALETTE)) - tex_printf("colortype "); - if (pdf->minor_version <= 1) - tex_printf("version=%d ", pdf->minor_version); - if (png_get_interlace_type(png_p, info_p) != PNG_INTERLACE_NONE) + tex_printf(" *** PNG copy skipped because: "); + if (!png_copy) + tex_printf("!png_copy "); + if (!(pdf->minor_version > 1)) + tex_printf("minorversion=%d ", pdf->minor_version); + if (!(png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE)) tex_printf("interlaced "); - if (png_get_bit_depth(png_p, info_p) > 8) - tex_printf("bitdepth=%d ", png_get_bit_depth(png_p, info_p)); + if (!((png_get_color_type(png_p, info_p) == PNG_COLOR_TYPE_GRAY) + || (png_get_color_type(png_p, info_p) == PNG_COLOR_TYPE_RGB))) + tex_printf("colortype "); + if (pdf->image_apply_gamma) + tex_printf("apply gamma "); + if (!(!png_get_valid(png_p, info_p, PNG_INFO_gAMA) + || int_file_gamma == PNG_FP_1)) + tex_printf("gamma "); + if (png_get_valid(png_p, info_p, PNG_INFO_cHRM)) + tex_printf("cHRM "); + if (png_get_valid(png_p, info_p, PNG_INFO_iCCP)) + tex_printf("iCCP "); + if (png_get_valid(png_p, info_p, PNG_INFO_sBIT)) + tex_printf("sBIT "); + if (png_get_valid(png_p, info_p, PNG_INFO_sRGB)) + tex_printf("sRGB "); + if (png_get_valid(png_p, info_p, PNG_INFO_bKGD)) + tex_printf("bKGD "); + if (png_get_valid(png_p, info_p, PNG_INFO_hIST)) + tex_printf("hIST "); if (png_get_valid(png_p, info_p, PNG_INFO_tRNS)) - tex_printf("simple transparancy "); + tex_printf("tRNS "); + if (png_get_valid(png_p, info_p, PNG_INFO_sPLT)) + tex_printf("sPLT "); } switch (png_get_color_type(png_p, info_p)) { case PNG_COLOR_TYPE_PALETTE: diff --git a/Build/source/texk/web2c/luatexdir/lua/llfslibext.c b/Build/source/texk/web2c/luatexdir/lua/llfslibext.c index 5168d9c24de..0e17a4e6a1c 100644 --- a/Build/source/texk/web2c/luatexdir/lua/llfslibext.c +++ b/Build/source/texk/web2c/luatexdir/lua/llfslibext.c @@ -1,6 +1,6 @@ /* llfslibext.c - Copyright 2010 Taco Hoekwater <taco@luatex.org> + Copyright 2010-2011 Taco Hoekwater <taco@luatex.org> This file is part of LuaTeX. @@ -25,7 +25,7 @@ #include <time.h> static const char _svn_version[] = - "$Id: llfslibext.c 4084 2011-02-10 09:06:29Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/llfslibext.c $"; + "$Id: llfslibext.c 4164 2011-04-16 09:00:09Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/lua/llfslibext.c $"; #ifdef _WIN32 # include <windows.h> @@ -81,7 +81,7 @@ static int Preadlink(lua_State * L) /** readlink(path) */ const char *path = luaL_checkstring(L, 1); char *b = NULL; - size_t allocated = 128; + int allocated = 128; int n; while (1) { b = malloc(allocated); @@ -109,7 +109,7 @@ static int read_link(lua_State * L) return Preadlink(L); } -static int get_short_name(lua_State * L) +static int get_short_name(lua_State * L __attribute__ ((unused))) { /* simply do nothing */ return 1; diff --git a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c index 8fa1fb0d4cc..066815cc7ca 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lnodelib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lnodelib.c @@ -18,8 +18,8 @@ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */ static const char _svn_version[] = - "$Id: lnodelib.c 4140 2011-04-12 10:18:37Z taco $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lnodelib.c $"; + "$Id: lnodelib.c 4166 2011-04-16 09:12:20Z taco $ " + "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/lua/lnodelib.c $"; #include "lua/luatex-api.h" #include "ptexlib.h" @@ -782,6 +782,8 @@ static int get_node_field_id(lua_State * L, int n, int node) { register int t = type(node); register const char *s = lua_tostring(L, n); + if (s == NULL) + return -2; if (luaS_ptr_eq(s, list)) { s = luaS_head_ptr; /* create a |head| alias for now */ } @@ -895,7 +897,7 @@ static int lua_nodelib_whatsits(lua_State * L) static int lua_nodelib_fields(lua_State * L) { int i = -1; - int offset = 3; + int offset = 2; const char **fields; int t = get_valid_node_type_id(L, 1); if (t == whatsit_node) { @@ -913,7 +915,7 @@ static int lua_nodelib_fields(lua_State * L) if (nodetype_has_subtype(t)) { lua_pushstring(L, "subtype"); lua_rawseti(L, -2, 2); - offset--; + offset++; } if (fields != NULL) { if (nodetype_has_prev(t)) { diff --git a/Build/source/texk/web2c/luatexdir/lua/loslibext.c b/Build/source/texk/web2c/luatexdir/lua/loslibext.c index b0bf0d5abea..1fda293513b 100644 --- a/Build/source/texk/web2c/luatexdir/lua/loslibext.c +++ b/Build/source/texk/web2c/luatexdir/lua/loslibext.c @@ -25,7 +25,7 @@ #include <time.h> static const char _svn_version[] = - "$Id: loslibext.c 3682 2010-05-11 08:07:11Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/loslibext.c $"; + "$Id: loslibext.c 4167 2011-04-16 09:20:26Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/lua/loslibext.c $"; #if defined(_WIN32) || defined(__NT__) # define MKDIR(a,b) mkdir(a) @@ -974,6 +974,16 @@ static int os_execute(lua_State * L) char *cmdname = NULL; const char *cmd = luaL_optstring(L, 1, NULL); + if (cmd == NULL) { /* pretend we are \.{\\pdfshellescape} */ + if (shellenabledp <= 0) { + lua_pushinteger(L, 0); + } else if (restrictedshell == 0) { + lua_pushinteger(L, 1); + } else { + lua_pushinteger(L, 2); + } + return 1; + } if (shellenabledp <= 0) { lua_pushnil(L); lua_pushstring(L, "All command execution disabled."); diff --git a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c index f40e173a108..50cef444f4e 100644 --- a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c +++ b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c @@ -23,7 +23,7 @@ static const char _svn_version[] = - "$Id: ltexlib.c 4132 2011-04-11 14:04:10Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/ltexlib.c $"; + "$Id: ltexlib.c 4234 2011-04-30 14:02:15Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/lua/ltexlib.c $"; #define attribute(A) eqtb[attribute_base+(A)].hh.rh #define dimen(A) eqtb[scaled_base+(A)].hh.rh @@ -97,6 +97,9 @@ static int do_luacprint(lua_State * L, int partial, int deftable) if (lua_type(L, 1) == LUA_TNUMBER && n > 1) { lua_number2int(cattable, lua_tonumber(L, 1)); startstrings = 2; + if (!valid_catcode_table(cattable)) { + cattable = DEFAULT_CAT_TABLE; + } } } if (lua_type(L, startstrings) == LUA_TTABLE) { @@ -152,6 +155,9 @@ static int luactprint(lua_State * L) if (lua_type(L, -1) == LUA_TNUMBER) { lua_number2int(cattable, lua_tonumber(L, -1)); startstrings = 2; + if (!valid_catcode_table(cattable)) { + cattable = DEFAULT_CAT_TABLE; + } } lua_pop(L, 1); diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w index aa63118624c..f61bc0b79c3 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luainit.w +++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w @@ -19,16 +19,13 @@ @ @c #include "openbsd-compat.h" -#ifdef HAVE_ASPRINTF /* asprintf is not defined in openbsd-compat.h, but in stdio.h */ -# include <stdio.h> -#endif #include <kpathsea/c-stat.h> #include "lua/luatex-api.h" #include "ptexlib.h" static const char _svn_version[] = - "$Id: luainit.w 4114 2011-04-11 06:44:43Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/luainit.w $"; + "$Id: luainit.w 4244 2011-05-05 09:31:30Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/lua/luainit.w $"; @ TH: TODO diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c index 06ec012cc93..a257b60e383 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.c +++ b/Build/source/texk/web2c/luatexdir/luatex.c @@ -15,16 +15,16 @@ #include "luatex_svnversion.h" static const char _svn_version[] = - "$Id: luatex.c 4117 2011-04-11 07:58:32Z taco $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/luatex.c $"; + "$Id: luatex.c 4248 2011-05-05 13:56:58Z taco $ " + "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/luatex.c $"; #define TeX int luatex_svn = luatex_svn_revision; -int luatex_version = 66; /* \.{\\luatexversion} */ +int luatex_version = 70; /* \.{\\luatexversion} */ int luatex_revision = '0'; /* \.{\\luatexrevision} */ int luatex_date_info = -extra_version_info; /* the compile date is negated */ -const char *luatex_version_string = "beta-0.66.0"; +const char *luatex_version_string = "beta-0.70.0"; const char *engine_name = "luatex"; /* the name of this engine */ #include <kpathsea/c-ctype.h> @@ -576,9 +576,6 @@ static void ipc_open_out(void) { #ifdef WIN32 u_long mode = 1; -#define SOCK_NONBLOCK(s) ioctlsocket (s, FIONBIO, &mode) -#else -#define SOCK_NONBLOCK(s) fcntl (s, F_SETFL, O_NONBLOCK) #endif # ifdef IPC_DEBUG fputs("tex: Opening socket for IPC output ...\n", stderr); @@ -594,8 +591,13 @@ static void ipc_open_out(void) sock = socket(PF_UNIX, SOCK_STREAM, 0); if (sock >= 0) { - if (connect(sock, ipc_addr, ipc_addr_len) != 0 - || SOCK_NONBLOCK (sock) < 0) { + if (connect(sock, ipc_addr, ipc_addr_len) != 0 || +#ifdef WIN32 + ioctlsocket (sock, FIONBIO, &mode) < 0 +#else + fcntl (sock, F_SETFL, O_NONBLOCK) < 0 +#endif + ) { close(sock); sock = -1; return; diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h index f74ca715caa..4e426a09912 100644 --- a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -1 +1 @@ -#define luatex_svn_revision 4141 +#define luatex_svn_revision 4247 diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.w b/Build/source/texk/web2c/luatexdir/tex/texfileio.w index 652265d0119..92fbbe230bc 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texfileio.w +++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.w @@ -23,8 +23,8 @@ #include <kpathsea/absolute.h> static const char _svn_version[] = - "$Id: texfileio.w 4128 2011-04-11 12:37:47Z taco $" - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/texfileio.w $"; + "$Id: texfileio.w 4229 2011-04-30 07:20:23Z taco $" + "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/tex/texfileio.w $"; @ @c #define end_line_char int_par(end_line_char_code) @@ -784,6 +784,16 @@ except of course for a short time just after |job_name| has become nonzero. @c unsigned char *texmf_log_name; /* full name of the log file */ +static void set_recorder_filename(char *filename) { + if (output_directory) { + filename = concat3(output_directory, DIR_SEP_STRING, filename); + recorder_change_filename(filename); + free(filename); + } else { + recorder_change_filename(filename); + } +} + @ The |open_log_file| routine is used to open the transcript file and to help it catch up to what has previously been printed on the terminal. @@ -799,7 +809,7 @@ void open_log_file(void) if (job_name == 0) job_name = getjobname(maketexstring("texput")); /* TODO */ fn = pack_job_name(".fls"); - recorder_change_filename(fn); + set_recorder_filename(fn); fn = pack_job_name(".log"); while (!lua_a_open_out(&log_file, fn, 0)) { /* Try to get a different log file name */ diff --git a/Build/source/texk/web2c/luatexdir/tex/texmath.w b/Build/source/texk/web2c/luatexdir/tex/texmath.w index 47ed05d2651..1628ed5f99e 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texmath.w +++ b/Build/source/texk/web2c/luatexdir/tex/texmath.w @@ -21,8 +21,8 @@ #include "ptexlib.h" static const char _svn_version[] = - "$Id: texmath.w 3981 2010-11-26 12:26:44Z taco $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/texmath.w $"; + "$Id: texmath.w 4170 2011-04-16 13:16:39Z taco $ " + "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/tex/texmath.w $"; @ @c #define mode cur_list.mode_field @@ -2051,7 +2051,7 @@ At this time we are in vertical mode (or internal vertical mode). @c -static void finish_displayed_math(boolean l, pointer a, pointer p) +static void finish_displayed_math(boolean l, pointer eqno_box, pointer p) { pointer eq_box; /* box containing the equation */ scaled eq_w; /* width of the equation */ @@ -2061,12 +2061,12 @@ static void finish_displayed_math(boolean l, pointer a, pointer p) scaled line_s; /* move the line right this much */ scaled d; /* displacement of equation in the line */ small_number g1, g2; /* glue parameter codes for before and after */ - pointer r; /* kern node used to position the display */ + pointer r,s; /* kern nodes used to position the display */ pointer t; /* tail of adjustment list */ pointer pre_t; /* tail of pre-adjustment list */ boolean swap_dir; /* true if the math and surrounding text dirs are opposed */ swap_dir = (int_par(pre_display_direction_code) < 0 ? true : false ); - if (a != null && swap_dir) + if (eqno_box != null && swap_dir) l = !l; adjust_tail = adjust_head; @@ -2080,11 +2080,11 @@ static void finish_displayed_math(boolean l, pointer a, pointer p) eq_w = width(eq_box); line_w = display_width; line_s = display_indent; - if (a == null) { + if (eqno_box == null) { eqno_w = 0; eqno_w2 = 0; } else { - eqno_w = width(a); + eqno_w = width(eqno_box); eqno_w2 = eqno_w + get_math_quad(text_size); } if (eq_w + eqno_w2 > line_w) { @@ -2140,10 +2140,10 @@ static void finish_displayed_math(boolean l, pointer a, pointer p) displacement for all three potential lines of the display, even though `\.{\\parshape}' may specify them differently. */ - if (a && l && (eqno_w == 0)) { /* \.{\\leqno} on a forced single line due to |width=0| */ + if (eqno_box && l && (eqno_w == 0)) { /* \.{\\leqno} on a forced single line due to |width=0| */ /* it follows that |type(a)=hlist_node| */ - shift_amount(a) = line_s; - append_to_vlist(a); + shift_amount(eqno_box) = line_s; + append_to_vlist(eqno_box); tail_append(new_penalty(inf_penalty)); } else { tail_append(new_param_glue(g1)); @@ -2151,33 +2151,76 @@ static void finish_displayed_math(boolean l, pointer a, pointer p) if (eqno_w != 0) { r = new_kern(line_w - eq_w - eqno_w - d); + s = new_kern(width(r) + eqno_w); if (l) { - vlink(a) = r; - vlink(r) = eq_box; - eq_box = a; - d = 0; + if (swap_dir) { + if (math_direction==dir_TLT) { + /* TRT + TLT + \eqno, (swap_dir=true, math_direction=TLT, l=true) */ + vlink(eqno_box) = r; + vlink(r) = eq_box; + vlink(eq_box) = s; + eq_box = eqno_box; + } else { + /* TLT + TRT + \eqno, (swap_dir=true, math_direction=TRT, l=true) */ + vlink(eqno_box) = r; + vlink(r) = eq_box; + vlink(eq_box) = s; + eq_box = eqno_box; + } + } else { + if (math_direction==dir_TLT) { + /* TLT + TLT + \leqno, (swap_dir=false, math_direction=TLT, l=true) */ /* OK */ + vlink(eqno_box) = r; + vlink(r) = eq_box; + vlink(eq_box) = s; + eq_box = eqno_box; + } else { + /* TRT + TRT + \leqno, (swap_dir=false, math_direction=TRT, l=true) */ + vlink(eqno_box) = r; + vlink(r) = eq_box; + vlink(eq_box) = s; + eq_box = eqno_box; + } + } } else { - vlink(eq_box) = r; - vlink(r) = a; + if (swap_dir) { + if (math_direction==dir_TLT) { + /* TRT + TLT + \leqno, (swap_dir=true, math_direction=TLT, l=false) */ + vlink(eq_box) = r; + vlink(r) = eqno_box; + } else { + /* TLT + TRT + \leqno, (swap_dir=true, math_direction=TRT, l=false) */ + vlink(eq_box) = r; + vlink(r) = eqno_box; + } + } else { + if (math_direction==dir_TLT) { + /* TLT + TLT + \eqno, (swap_dir=false, math_direction=TLT, l=false) */ /* OK */ + s = new_kern(d); + vlink(s) = eq_box; + vlink(eq_box) = r; + vlink(r) = eqno_box; + eq_box = s; + } else { + /* TRT + TRT + \eqno, (swap_dir=false, math_direction=TRT, l=false) */ + vlink(s) = eq_box; + vlink(eq_box) = r; + vlink(r) = eqno_box; + eq_box = s; + } + } } eq_box = hpack(eq_box, 0, additional, -1); - } - if (a && math_direction == dir_TRT) - if (l) { - r = new_kern(line_w - width(eq_box)); - vlink(eq_box) = r; - eq_box = hpack(eq_box, 0, additional, -1); - shift_amount(eq_box) = 0; - } else - shift_amount(eq_box) = 0; - else + shift_amount(eq_box) = line_s; + } else { shift_amount(eq_box) = line_s + d; + } append_to_vlist(eq_box); - if ((a != null) && (eqno_w == 0) && !l) { + if ((eqno_box != null) && (eqno_w == 0) && !l) { tail_append(new_penalty(inf_penalty)); - shift_amount(a) = line_s; - append_to_vlist(a); + shift_amount(eqno_box) = line_s; + append_to_vlist(eqno_box); g2 = 0; } if (t != adjust_head) { /* migrating material comes after equation number */ diff --git a/Build/source/texk/web2c/luatexdir/utils/utils.w b/Build/source/texk/web2c/luatexdir/utils/utils.w index 4acb9f2d9dd..2e5d533c20f 100644 --- a/Build/source/texk/web2c/luatexdir/utils/utils.w +++ b/Build/source/texk/web2c/luatexdir/utils/utils.w @@ -20,17 +20,13 @@ @ @c static const char _svn_version[] = - "$Id: utils.w 3779 2010-07-31 11:29:22Z oneiros $ " - "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/utils/utils.w $"; + "$Id: utils.w 4244 2011-05-05 09:31:30Z taco $ " + "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/utils/utils.w $"; @ @c #include "openbsd-compat.h" #include <kpathsea/config.h> /* this is a trick to load mingw32's io.h early, using a macro redefinition of |eof()|. */ -#ifdef HAVE_ASPRINTF /* asprintf is not defined in openbsd-compat.h, but in stdio.h */ -# include <stdio.h> -#endif - #include "sys/types.h" #ifndef __MINGW32__ # include "sysexits.h" |