texlive[50260] Build/source/texk/web2c: Sync with luatex revision

commits+lscarso at tug.org commits+lscarso at tug.org
Wed Mar 6 14:23:58 CET 2019


Revision: 50260
          http://tug.org/svn/texlive?view=revision&revision=50260
Author:   lscarso
Date:     2019-03-06 14:23:58 +0100 (Wed, 06 Mar 2019)
Log Message:
-----------
Sync with luatex revision 7102.

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=7102

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/c-auto.in
    trunk/Build/source/texk/web2c/configure
    trunk/Build/source/texk/web2c/configure.ac
    trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c
    trunk/Build/source/texk/web2c/luatexdir/lua/texluac.c
    trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
    trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
    trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
    trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c
    trunk/Build/source/texk/web2c/mplibdir/mp.w
    trunk/Build/source/texk/web2c/mplibdir/psout.w

Modified: trunk/Build/source/texk/web2c/c-auto.in
===================================================================
--- trunk/Build/source/texk/web2c/c-auto.in	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/c-auto.in	2019-03-06 13:23:58 UTC (rev 50260)
@@ -76,6 +76,9 @@
 /* Define to 1 if you have the <errno.h> header file. */
 #undef HAVE_ERRNO_H
 
+/* Define to 1 if you have the `fabs' function. */
+#undef HAVE_FABS
+
 /* Define to 1 if you have the <float.h> header file. */
 #undef HAVE_FLOAT_H
 
@@ -103,6 +106,9 @@
 /* Define to 1 if you have the <iostream> header file. */
 #undef HAVE_IOSTREAM
 
+/* Define to 1 if you have the `labs' function. */
+#undef HAVE_LABS
+
 /* Define to 1 if you have the <langinfo.h> header file. */
 #undef HAVE_LANGINFO_H
 

Modified: trunk/Build/source/texk/web2c/configure
===================================================================
--- trunk/Build/source/texk/web2c/configure	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/configure	2019-03-06 13:23:58 UTC (rev 50260)
@@ -22734,7 +22734,7 @@
 
 fi
 
-for ac_func in access atoi fmax ftime gettimeofday mkdtemp setlocale strerror strlcat strlcpy strndup
+for ac_func in access atoi fmax ftime gettimeofday fabs labs mkdtemp setlocale strerror strlcat strlcpy strndup
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

Modified: trunk/Build/source/texk/web2c/configure.ac
===================================================================
--- trunk/Build/source/texk/web2c/configure.ac	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/configure.ac	2019-03-06 13:23:58 UTC (rev 50260)
@@ -233,7 +233,7 @@
 fi
 AC_CHECK_SIZEOF([long])
 AC_SEARCH_LIBS([pow], [m])
-AC_CHECK_FUNCS([access atoi fmax ftime gettimeofday mkdtemp setlocale strerror strlcat strlcpy strndup])
+AC_CHECK_FUNCS([access atoi fmax ftime gettimeofday fabs labs mkdtemp setlocale strerror strlcat strlcpy strndup])
 AC_CHECK_DECLS([strndup])
 AC_CHECK_HEADERS([errno.h langinfo.h locale.h sys/time.h sys/timeb.h sys/wait.h time.h])
 AC_CHECK_SIZEOF([void *])

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c	2019-03-06 13:23:58 UTC (rev 50260)
@@ -381,10 +381,10 @@
 */
 
 # define add_to_buffer(chr) \
-    if (chr <= 255) { \
+    if (chr <= 127) { \
         luaL_addchar(&b,(unsigned) (char) chr); \
     } else { \
-        uindex = uni2string((char *)word,(unsigned) chr); \
+        uindex = uni2string((char *)word,(unsigned int) chr); \
         *uindex = '\0'; \
         luaL_addstring(&b,(char *) word); \
     }

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/texluac.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/texluac.c	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/texluac.c	2019-03-06 13:23:58 UTC (rev 50260)
@@ -298,9 +298,14 @@
 #define TSVALUE(o) tsvalue(o)
 #endif
 
+/* if ts is a const pointer, using Lua's getstr(ts) is not correct */
+#define getconststr(ts)  \
+  check_exp(sizeof((ts)->extra), cast(const char *, (ts)) + sizeof(UTString))
+
+
 static void PrintString(const TString* ts)
 {
-    const char* s=getstr(ts);
+    const char* s=getconststr(ts);
     size_t i,n;
 #if (defined(LuajitTeX)) || (LUA_VERSION_NUM == 502)
     n=ts->tsv.len;

Modified: trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c	2019-03-06 13:23:58 UTC (rev 50260)
@@ -1442,7 +1442,7 @@
 		found = found2;
 	    if ( found!=NULL ) {
 		script_tag = found->script;
-		for ( j=0; localscripts[j].text!=NULL && script_tag!=localscripts[j].tag; ++j );
+		for ( j=0; localscripts[j].text!=NULL && script_tag!=localscripts[j].tag; ++j ) {;}
 #ifdef LUA_FF_LIB
             buf[0] = fl->scripts->script>>24;
             buf[1] = (fl->scripts->script>>16)&0xff;

Modified: trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c	2019-03-06 13:23:58 UTC (rev 50260)
@@ -710,8 +710,8 @@
     unichar_t **names;
     int cnt, i, choice;
 
-    for ( cnt=0; fontnames[cnt]!=NULL; ++cnt);
-        names = gcalloc(cnt+1,sizeof(unichar_t *));
+    for ( cnt=0; fontnames[cnt]!=NULL; ++cnt){;}
+    names = gcalloc(cnt+1,sizeof(unichar_t *));
     for ( i=0; i<cnt; ++i )
         names[i] = uc_copy(fontnames[i]);
     choice = 0;

Modified: trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c	2019-03-06 13:23:58 UTC (rev 50260)
@@ -39,6 +39,14 @@
     double a,b,c,d,e;
 } Quartic;
 
+
+#ifdef HAVE_FABS
+#define FABS(x) fabs((x))
+#else
+#define FABS(x) ((x)>=0?(x):(-(x)))
+#endif
+
+
 /* In an attempt to make allocation more efficient I just keep preallocated */
 /*  lists of certain common sizes. It doesn't seem to make much difference */
 /*  when allocating stuff, but does when freeing. If the extra complexity */
@@ -88,6 +96,8 @@
 }
 #endif
 
+
+
 void *chunkalloc(int size) {
 # if ALLOC_CHUNK<=1
 return( gcalloc(1,size));
@@ -171,6 +181,9 @@
 }
 #endif
 
+
+
+
 char *strconcat(const char *str1,const char *str2) {
     int len1 = strlen(str1);
     char *ret = galloc(len1+strlen(str2)+1);
@@ -3109,18 +3122,21 @@
 return( cnt );
 }
 
+
+
+
 static int Closer(const Spline *s1,const Spline *s2,extended t1,extended t2,extended t1p,extended t2p) {
+    double dx,dy;
     double x1 = ((s1->splines[0].a*t1+s1->splines[0].b)*t1+s1->splines[0].c)*t1+s1->splines[0].c;
     double y1 = ((s1->splines[1].a*t1+s1->splines[1].b)*t1+s1->splines[1].c)*t1+s1->splines[1].c;
     double x2 = ((s2->splines[0].a*t2+s2->splines[0].b)*t2+s2->splines[0].c)*t2+s2->splines[0].c;
     double y2 = ((s2->splines[1].a*t2+s2->splines[1].b)*t2+s2->splines[1].c)*t2+s2->splines[1].c;
-    double diff = abs(x1-x2) + abs(y1-y2);
+    double diff = FABS(x1-x2) + FABS(y1-y2);
     double x1p = ((s1->splines[0].a*t1p+s1->splines[0].b)*t1p+s1->splines[0].c)*t1p+s1->splines[0].c;
     double y1p = ((s1->splines[1].a*t1p+s1->splines[1].b)*t1p+s1->splines[1].c)*t1p+s1->splines[1].c;
     double x2p = ((s2->splines[0].a*t2p+s2->splines[0].b)*t2p+s2->splines[0].c)*t2p+s2->splines[0].c;
     double y2p = ((s2->splines[1].a*t2p+s2->splines[1].b)*t2p+s2->splines[1].c)*t2p+s2->splines[1].c;
-    double diffp = abs(x1p-x2p) + abs(y1p-y2p);
-
+    double diffp = FABS(x1p-x2p) + FABS(y1p-y2p);
     if ( diff<diffp )
 return( false );
 

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2019-03-06 13:23:58 UTC (rev 50260)
@@ -1 +1 @@
-#define luatex_svn_revision 7084
+#define luatex_svn_revision 7097

Modified: trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c	2019-03-06 13:23:58 UTC (rev 50260)
@@ -947,7 +947,7 @@
     pdf->inclusion_copy_font = fix_int(pdf_inclusion_copy_font, 0, 1);
     pdf->pk_resolution = fix_int(pdf_pk_resolution, 72, 8000);
     pdf->pk_fixed_dpi = fix_int(pdf_pk_fixed_dpi, 0, 1);
-    if ((pdf->minor_version >= 5) && (pdf->objcompresslevel > 0)) {
+    if (((pdf->major_version > 1) || (pdf->minor_version >= 5)) && (pdf->objcompresslevel > 0)) {
         pdf->os_enable = true;
     } else {
         if (pdf->objcompresslevel > 0) {
@@ -2483,7 +2483,7 @@
     appendix C.1 of the \PDF\ standard. The maximum value of ints is |+2^32|, the
     maximum value of reals is |+2^15| and the smallest values of reals is
     |1/(2^16)|. We are quite large on precision, because it could happen that a
-    pdf file imported as figure has real numbers with an unusual (and possibly useless) 
+    pdf file imported as figure has real numbers with an unusual (and possibly useless)
     high precision. Later the formatter will write the numbers in the correct format.
 
 */

Modified: trunk/Build/source/texk/web2c/mplibdir/mp.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mp.w	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/mplibdir/mp.w	2019-03-06 13:23:58 UTC (rev 50260)
@@ -122,9 +122,24 @@
 #ifndef HAVE_BOOLEAN
 typedef int boolean;
 #endif
+
 #ifndef INTEGER_TYPE
 typedef int integer;
+#define MPOST_ABS abs
+#else
+/* See source/texk/web2c/w2c/config.h */
+#if INTEGER_TYPE == long 
+#ifdef HAVE_LABS
+#define MPOST_ABS labs
+#else
+#define MPOST_ABS abs
 #endif
+#else
+#define MPOST_ABS abs
+#endif /* if INTEGER_TYPE == long */
+#endif /* ifndef INTEGER_TYPE */
+
+
 @<Declare helpers@>;
 @<Enumeration types@>;
 @<Types in the outer block@>;
@@ -1783,7 +1798,7 @@
 
 @c
 static void mp_print_dd (MP mp, integer n) {                               /* prints two least significant digits */
-  n = abs (n) % 100;
+  n = MPOST_ABS (n) % 100;
   mp_print_char (mp, xord ('0' + (n / 10)));
   mp_print_char (mp, xord ('0' + (n % 10)));
 }
@@ -2943,7 +2958,11 @@
 }
 
 @ @<Internal library declarations@>=
-#  define mp_snprintf (void)snprintf
+int mp_snprintf_res ;
+/* Some compilers (i.e. gcc 8.2.0 ) complained with the old */
+/* #define mp_snprintf (void)snprintf                       */
+/* about truncation. For the moment we store the result.    */
+#  define mp_snprintf mp_snprintf_res=snprintf
 
 @* Dynamic memory allocation.
 

Modified: trunk/Build/source/texk/web2c/mplibdir/psout.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/psout.w	2019-03-06 12:47:32 UTC (rev 50259)
+++ trunk/Build/source/texk/web2c/mplibdir/psout.w	2019-03-06 13:23:58 UTC (rev 50260)
@@ -267,7 +267,7 @@
 
 @c 
 static void mp_ps_print_dd (MP mp,integer n) { /* prints two least significant digits */
-  n=abs(n) % 100; 
+  n= MPOST_ABS(n) % 100; 
   mp_ps_print_char(mp, '0'+(n / 10));
   mp_ps_print_char(mp, '0'+(n % 10));
 }
@@ -560,6 +560,7 @@
 @<Static variables in the outer block@>=
 static char notdef[] = ".notdef";
 
+
 @ @<Set initial...@>=
 mp->ps->enc_tree = NULL;
 



More information about the tex-live-commits mailing list