texlive[43120] Build/source/texk/web2c: mfluajitdir, mfluadir: sync

commits+kakuto at tug.org commits+kakuto at tug.org
Thu Feb 2 22:19:36 CET 2017


Revision: 43120
          http://tug.org/svn/texlive?view=revision&revision=43120
Author:   kakuto
Date:     2017-02-02 22:19:36 +0100 (Thu, 02 Feb 2017)
Log Message:
-----------
mfluajitdir, mfluadir: sync with the upstream

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch
    trunk/Build/source/texk/web2c/mfluadir/mflua.defines
    trunk/Build/source/texk/web2c/mfluadir/mfluac.c
    trunk/Build/source/texk/web2c/mfluadir/mfluac.h
    trunk/Build/source/texk/web2c/mfluajitdir/mfluajit.defines

Modified: trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch	2017-02-02 01:02:40 UTC (rev 43119)
+++ trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch	2017-02-02 21:19:36 UTC (rev 43120)
@@ -402,6 +402,8 @@
 @z
 
 @x [44.1064] MFLua
+  cur_wt:=w; rhs:=make_spec(rhs,max_offset(cur_pen),internal[tracing_specs]);
+  @<Check the turning number@>;
   if max_offset(cur_pen)=0 then fill_spec(rhs)
   else fill_envelope(rhs);
   if lhs<>null then
@@ -411,11 +413,15 @@
     if max_offset(cur_pen)=0 then fill_spec(lhs)
     else fill_envelope(lhs);
 @y
+  cur_wt:=w; mfluaPRE_make_spec_rhs(rhs); rhs:=make_spec(rhs,max_offset(cur_pen),internal[tracing_specs]);mfluaPOST_make_spec_rhs(rhs);
+  @<Check the turning number@>;
   if max_offset(cur_pen)=0 then begin mfluaPRE_fill_spec_rhs(rhs); fill_spec(rhs); mfluaPOST_fill_spec_rhs(rhs);end 
   else begin mfluaPRE_fill_envelope_rhs(rhs); fill_envelope(rhs); mfluaPOST_fill_envelope_rhs(rhs); end ;
   if lhs<>null then
     begin rev_turns:=true;
+    mfluaPRE_make_spec_lhs(lhs);
     lhs:=make_spec(lhs,max_offset(cur_pen),internal[tracing_specs]);
+    mfluaPOST_make_spec_lhs(lhs);
     rev_turns:=false;
     if max_offset(cur_pen)=0 then begin mfluaPRE_fill_spec_lhs(lhs); fill_spec(lhs); mfluaPOST_fill_spec_lhs(lhs); end
     else begin mfluaPRE_fill_envelope_lhs(lhs); fill_envelope(lhs); mfluaPOST_fill_envelope_lhs(lhs); end;

Modified: trunk/Build/source/texk/web2c/mfluadir/mflua.defines
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/mflua.defines	2017-02-02 01:02:40 UTC (rev 43119)
+++ trunk/Build/source/texk/web2c/mfluadir/mflua.defines	2017-02-02 21:19:36 UTC (rev 43120)
@@ -9,6 +9,10 @@
 @define procedure mfluaPOSTfillenveloperhs();
 @define procedure mfluaPREfillenvelopelhs();
 @define procedure mfluaPOSTfillenvelopelhs();
+ at define procedure mfluaPREmakespecrhs();
+ at define procedure mfluaPOSTmakespecrhs();
+ at define procedure mfluaPREmakespeclhs();
+ at define procedure mfluaPOSTmakespeclhs();
 @define procedure mfluaPREfillspecrhs();
 @define procedure mfluaPOSTfillspecrhs();
 @define procedure mfluaPREfillspeclhs();

Modified: trunk/Build/source/texk/web2c/mfluadir/mfluac.c
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/mfluac.c	2017-02-02 01:02:40 UTC (rev 43119)
+++ trunk/Build/source/texk/web2c/mfluadir/mfluac.c	2017-02-02 21:19:36 UTC (rev 43120)
@@ -982,7 +982,187 @@
 
 }
 
+int mfluaPREmakespecrhs(halfword rhs)
+{
+  lua_State *L;
+  char* luafile;
+  int res;
+  
+  L = Luas[0];
+  luafile = kpse_find_file("do_add_to.lua", kpse_lua_format, 0);
+  if (luafile==NULL) {
+    res = 1;
+    lua_pushstring(L,"do_add_to.lua not found");
+    priv_lua_reporterrors(L, res);
+    return 0;
+  }
+  priv_lua_writemessage(L,"(",luafile,")",1);
+  res = luaL_loadfile(L, luafile);
+  free (luafile);
+  if ( res==0 ){
+      res = lua_pcall(L, 0, 0, 0);
+      if (res==0){
+	lua_getglobal(L, "PRE_make_spec_rhs");  /* function to be called */
+	lua_pushnumber(L, rhs);   /* push 1st argument */
+	/* do the call (1 arguments, 1 result) */
+	res = lua_pcall(L, 1, 1, 0) ;
+	if (res==0) {
+	  /* retrieve result */
+	  int z = 0;
+	  if (!lua_isnumber(L, -1)){
+	    fprintf(stderr,"\n! Error:function `PRE_make_spec_rhs' must return a number called with %s\n",lua_tostring(L, -1));
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }else {
+	    z = lua_tonumber(L, -1);
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }
+	}
+      }
+  }
+  /*stackdump_g(L);*/
+  priv_lua_reporterrors(L, res);
+  return 0;
+}
 
+
+int mfluaPOSTmakespecrhs(halfword rhs)
+{
+  lua_State *L;
+  char* luafile;
+  int res;
+  
+  L = Luas[0];
+  luafile = kpse_find_file("do_add_to.lua", kpse_lua_format, 0);
+  if (luafile==NULL) {
+    res = 1;
+    lua_pushstring(L,"do_add_to.lua not found");
+    priv_lua_reporterrors(L, res);
+    return 0;
+  }
+  priv_lua_writemessage(L,"(",luafile,")",1);
+  res = luaL_loadfile(L, luafile);
+  free (luafile);
+  if ( res==0 ){
+      res = lua_pcall(L, 0, 0, 0);
+      if (res==0){
+	lua_getglobal(L, "POST_make_spec_rhs");  /* function to be called */
+	lua_pushnumber(L, rhs);   /* push 1st argument */
+	/* do the call (1 arguments, 1 result) */
+	res = lua_pcall(L, 1, 1, 0) ;
+	if (res==0) {
+	  /* retrieve result */
+	  int z = 0;
+	  if (!lua_isnumber(L, -1)){
+	    fprintf(stderr,"\n! Error:function `POST_make_spec_rhs' must return a number called with %s\n",lua_tostring(L, -1));
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }else {
+	    z = lua_tonumber(L, -1);
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }
+	}
+      }
+  }
+  /*stackdump_g(L);*/
+  priv_lua_reporterrors(L, res);
+  return 0;
+}
+
+
+int mfluaPREmakespeclhs(halfword lhs)
+{
+  lua_State *L;
+  char* luafile;
+  int res;
+  
+  L = Luas[0];
+  luafile = kpse_find_file("do_add_to.lua", kpse_lua_format, 0);
+  if (luafile==NULL) {
+    res = 1;
+    lua_pushstring(L,"do_add_to.lua not found");
+    priv_lua_reporterrors(L, res);
+    return 0;
+  }
+  priv_lua_writemessage(L,"(",luafile,")",1);
+  res = luaL_loadfile(L, luafile);
+  free (luafile);
+  if ( res==0 ){
+      res = lua_pcall(L, 0, 0, 0);
+      if (res==0){
+	lua_getglobal(L, "PRE_make_spec_lhs");  /* function to be called */
+	lua_pushnumber(L, lhs);   /* push 1st argument */
+	/* do the call (1 arguments, 1 result) */
+	res = lua_pcall(L, 1, 1, 0) ;
+	if (res==0) {
+	  /* retrieve result */
+	  int z = 0;
+	  if (!lua_isnumber(L, -1)){
+	    fprintf(stderr,"\n! Error:function `PRE_make_spec_lhs' must return a number called with %s\n",lua_tostring(L, -1));
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }else {
+	    z = lua_tonumber(L, -1);
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }
+	}
+      }
+  }
+  /*stackdump_g(L);*/
+  priv_lua_reporterrors(L, res);
+  return 0;
+}
+
+
+int mfluaPOSTmakespeclhs(halfword lhs)
+{
+  lua_State *L;
+  char* luafile;
+  int res;
+  
+  L = Luas[0];
+  luafile = kpse_find_file("do_add_to.lua", kpse_lua_format, 0);
+  if (luafile==NULL) {
+    res = 1;
+    lua_pushstring(L,"do_add_to.lua not found");
+    priv_lua_reporterrors(L, res);
+    return 0;
+  }
+  priv_lua_writemessage(L,"(",luafile,")",1);
+  res = luaL_loadfile(L, luafile);
+  free (luafile);
+  if ( res==0 ){
+      res = lua_pcall(L, 0, 0, 0);
+      if (res==0){
+	lua_getglobal(L, "POST_make_spec_lhs");  /* function to be called */
+	lua_pushnumber(L, lhs);   /* push 1st argument */
+	/* do the call (1 arguments, 1 result) */
+	res = lua_pcall(L, 1, 1, 0) ;
+	if (res==0) {
+	  /* retrieve result */
+	  int z = 0;
+	  if (!lua_isnumber(L, -1)){
+	    fprintf(stderr,"\n! Error:function `POST_make_spec_lhs' must return a number called with %s\n",lua_tostring(L, -1));
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }else {
+	    z = lua_tonumber(L, -1);
+	    lua_pop(L, 1);  /* pop returned value */
+	    return z;
+	  }
+	}
+      }
+  }
+  /*stackdump_g(L);*/
+  priv_lua_reporterrors(L, res);
+  return 0;
+}
+
+
+
 int mfluaPREfillenveloperhs(halfword rhs)
 {
   lua_State *L;

Modified: trunk/Build/source/texk/web2c/mfluadir/mfluac.h
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/mfluac.h	2017-02-02 01:02:40 UTC (rev 43119)
+++ trunk/Build/source/texk/web2c/mfluadir/mfluac.h	2017-02-02 21:19:36 UTC (rev 43120)
@@ -21,6 +21,11 @@
 extern int mfluaPREfillenvelopelhs(halfword);
 extern int mfluaPOSTfillenvelopelhs(halfword);
 
+extern int mfluaPREmakespecrhs(halfword);
+extern int mfluaPOSTmakespecrhs(halfword);
+extern int mfluaPREmakespeclhs(halfword);
+extern int mfluaPOSTmakespeclhs(halfword);
+
 extern int mfluaPREfillspecrhs(halfword);
 extern int mfluaPOSTfillspecrhs(halfword);
 extern int mfluaPREfillspeclhs(halfword);

Modified: trunk/Build/source/texk/web2c/mfluajitdir/mfluajit.defines
===================================================================
--- trunk/Build/source/texk/web2c/mfluajitdir/mfluajit.defines	2017-02-02 01:02:40 UTC (rev 43119)
+++ trunk/Build/source/texk/web2c/mfluajitdir/mfluajit.defines	2017-02-02 21:19:36 UTC (rev 43120)
@@ -9,6 +9,10 @@
 @define procedure mfluaPOSTfillenveloperhs();
 @define procedure mfluaPREfillenvelopelhs();
 @define procedure mfluaPOSTfillenvelopelhs();
+ at define procedure mfluaPREmakespecrhs();
+ at define procedure mfluaPOSTmakespecrhs();
+ at define procedure mfluaPREmakespeclhs();
+ at define procedure mfluaPOSTmakespeclhs();
 @define procedure mfluaPREfillspecrhs();
 @define procedure mfluaPOSTfillspecrhs();
 @define procedure mfluaPREfillspeclhs();



More information about the tex-live-commits mailing list