summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2019-03-06 13:23:58 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2019-03-06 13:23:58 +0000
commitc4f771a2be42ef7a46974bea88d0a71987280e77 (patch)
treef67fd4f9e693c9779d61a34dabbca0788cfa9c2b /Build/source/texk/web2c/luatexdir
parent5c369e9c0320131c484974d5aa932fe7d80cb7f4 (diff)
Sync with luatex revision 7102.
git-svn-id: svn://tug.org/texlive/trunk@50260 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c4
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/texluac.c7
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c2
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c4
-rw-r--r--Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c22
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex_svnversion.h2
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.c4
7 files changed, 33 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c b/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c
index cb3736b8ee3..09a51bd1063 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lnewtokenlib.c
@@ -381,10 +381,10 @@ static int run_scan_int(lua_State * L)
*/
# 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); \
}
diff --git a/Build/source/texk/web2c/luatexdir/lua/texluac.c b/Build/source/texk/web2c/luatexdir/lua/texluac.c
index 61016cfdb5b..984a854c036 100644
--- a/Build/source/texk/web2c/luatexdir/lua/texluac.c
+++ b/Build/source/texk/web2c/luatexdir/lua/texluac.c
@@ -298,9 +298,14 @@ int luac_main(int ac, char *av[])
#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;
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
index 243d4ec6a44..16f540f1b0b 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/lookups.c
@@ -1442,7 +1442,7 @@ void NameOTLookup(OTLookup *otl,SplineFont *sf) {
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;
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
index 12b054ab46f..7d83c4e991c 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/parsettf.c
@@ -710,8 +710,8 @@ static int PickCFFFont(char **fontnames) {
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;
diff --git a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c
index f68ddc81d39..af2e72dad76 100644
--- a/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c
+++ b/Build/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splineutil.c
@@ -39,6 +39,14 @@ typedef struct quartic {
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 @@ void chunktest(void) {
}
#endif
+
+
void *chunkalloc(int size) {
# if ALLOC_CHUNK<=1
return( gcalloc(1,size));
@@ -171,6 +181,9 @@ return;
}
#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( 0 );
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 );
diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
index 433bde2a4a7..672814ea5ef 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 7084
+#define luatex_svn_revision 7097
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c
index 78ce165957f..0bd5a3a7b12 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c
@@ -947,7 +947,7 @@ static void init_pdf_outputparameters(PDF pdf)
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 @@ void scan_pdfcatalog(PDF pdf)
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.
*/