summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-19 14:13:38 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-19 14:13:38 +0000
commit840804b09bcebbd29703442bb47857fbbf3f3b66 (patch)
treed5a64e2b023cfacbbd218ac8024e8b5488f062be /Build
parentaff8cf6c52a5cf470b600e0d5898446af7b313d0 (diff)
web2c/luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@39147 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.w6
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/mathcodes.w12
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texmath.w8
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/textcodes.w20
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/managed-sa.h6
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/managed-sa.w28
6 files changed, 46 insertions, 34 deletions
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
index 1762600ccd6..7c76e192635 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
@@ -913,7 +913,7 @@ static void init_pdf_outputparameters(PDF pdf)
int pk_mode;
pdf->draftmode = fix_int(int_par(draft_mode_code), 0, 1);
pdf->compress_level = fix_int(pdf_compress_level, 0, 9);
- pdf->decimal_digits = fix_int(pdf_decimal_digits, 3, 16);
+ pdf->decimal_digits = fix_int(pdf_decimal_digits, 0, 4);
pdf->gamma = fix_int(pdf_gamma, 0, 1000000);
pdf->image_gamma = fix_int(pdf_image_gamma, 0, 1000000);
pdf->image_hicolor = fix_int(pdf_image_hicolor, 0, 1);
@@ -921,6 +921,10 @@ static void init_pdf_outputparameters(PDF pdf)
pdf->objcompresslevel = fix_int(pdf_objcompresslevel, 0, MAX_OBJ_COMPRESS_LEVEL);
pdf->inclusion_copy_font = fix_int(pdf_inclusion_copy_font, 0, 1);
pdf->pk_resolution = fix_int(pdf_pk_resolution, 72, 8000);
+ if (pdf->decimal_digits < 4) {
+ pdf->decimal_digits = 4;
+ formatted_warning("pdf backend","forcing decimal digits to %d",pdf->decimal_digits);
+ }
if ((pdf->minor_version >= 5) && (pdf->objcompresslevel > 0)) {
pdf->os_enable = true;
} else {
diff --git a/Build/source/texk/web2c/luatexdir/tex/mathcodes.w b/Build/source/texk/web2c/luatexdir/tex/mathcodes.w
index 4acd887eace..e161af0fe54 100644
--- a/Build/source/texk/web2c/luatexdir/tex/mathcodes.w
+++ b/Build/source/texk/web2c/luatexdir/tex/mathcodes.w
@@ -193,12 +193,12 @@ static void initializemathcode(void)
static void dumpmathcode(void)
{
- dump_sa_tree(mathcode_head);
+ dump_sa_tree(mathcode_head,"mathcodes");
}
static void undumpmathcode(void)
{
- mathcode_head = undump_sa_tree();
+ mathcode_head = undump_sa_tree("mathcodes");
}
@ @c
@@ -304,21 +304,19 @@ int get_del_code_num(int n)
static void initializedelcode(void)
{
sa_tree_item sa_value = { 0 };
- /* sa_value.uint_value = DELCODEDEFAULT; */
- sa_value.dump_uint.value_1 = DELCODEDEFAULT;
- sa_value.dump_uint.value_2 = 0;
+ sa_value.uint_value = DELCODEDEFAULT;
delcode_head = new_sa_tree(DELCODESTACK, 2, sa_value);
}
@ @c
static void dumpdelcode(void)
{
- dump_sa_tree(delcode_head);
+ dump_sa_tree(delcode_head,"delcodes");
}
static void undumpdelcode(void)
{
- delcode_head = undump_sa_tree();
+ delcode_head = undump_sa_tree("delcodes");
}
@ @c
diff --git a/Build/source/texk/web2c/luatexdir/tex/texmath.w b/Build/source/texk/web2c/luatexdir/tex/texmath.w
index 661830bb16c..81cfd9cf733 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texmath.w
+++ b/Build/source/texk/web2c/luatexdir/tex/texmath.w
@@ -330,18 +330,18 @@ void dump_math_data(void)
sa_value.int_value = MATHFONTDEFAULT;
math_fam_head = new_sa_tree(MATHFONTSTACK, 1, sa_value);
}
- dump_sa_tree(math_fam_head);
+ dump_sa_tree(math_fam_head, "mathfonts");
if (math_param_head == NULL) {
sa_value.int_value = MATHPARAMDEFAULT;
math_param_head = new_sa_tree(MATHPARAMSTACK, 1, sa_value);
}
- dump_sa_tree(math_param_head);
+ dump_sa_tree(math_param_head, "mathparameters");
}
void undump_math_data(void)
{
- math_fam_head = undump_sa_tree();
- math_param_head = undump_sa_tree();
+ math_fam_head = undump_sa_tree("mathfonts");
+ math_param_head = undump_sa_tree("mathparameters");
}
@ @c
diff --git a/Build/source/texk/web2c/luatexdir/tex/textcodes.w b/Build/source/texk/web2c/luatexdir/tex/textcodes.w
index 5868716201b..89e93684132 100644
--- a/Build/source/texk/web2c/luatexdir/tex/textcodes.w
+++ b/Build/source/texk/web2c/luatexdir/tex/textcodes.w
@@ -98,7 +98,7 @@ static void dumpcatcodes(void)
for (k = 0; k <= catcode_max; k++) {
if (catcode_valid[k]) {
dump_int(k);
- dump_sa_tree(catcode_heads[k]);
+ dump_sa_tree(catcode_heads[k],"catcodes");
}
}
}
@@ -116,7 +116,7 @@ static void undumpcatcodes(void)
undump_int(total);
for (k = 0; k < total; k++) {
undump_int(x);
- catcode_heads[x] = undump_sa_tree();
+ catcode_heads[x] = undump_sa_tree("catcodes");
catcode_valid[x] = 1;
}
}
@@ -207,12 +207,12 @@ static void initializelccodes(void)
static void dumplccodes(void)
{
- dump_sa_tree(lccode_head);
+ dump_sa_tree(lccode_head,"lccodes");
}
static void undumplccodes(void)
{
- lccode_head = undump_sa_tree();
+ lccode_head = undump_sa_tree("lccodes");
}
static void freelccodes(void)
@@ -253,12 +253,12 @@ static void initializeuccodes(void)
static void dumpuccodes(void)
{
- dump_sa_tree(uccode_head);
+ dump_sa_tree(uccode_head,"uccodes");
}
static void undumpuccodes(void)
{
- uccode_head = undump_sa_tree();
+ uccode_head = undump_sa_tree("uccodes");
}
static void freeuccodes(void)
@@ -299,12 +299,12 @@ static void initializesfcodes(void)
static void dumpsfcodes(void)
{
- dump_sa_tree(sfcode_head);
+ dump_sa_tree(sfcode_head,"sfcodes");
}
static void undumpsfcodes(void)
{
- sfcode_head = undump_sa_tree();
+ sfcode_head = undump_sa_tree("sfcodes");
}
static void freesfcodes(void)
@@ -409,7 +409,7 @@ static void dumphjcodes(void)
for (k = 0; k <= hjcode_max; k++) {
if (hjcode_valid[k]) {
dump_int(k);
- dump_sa_tree(hjcode_heads[k]);
+ dump_sa_tree(hjcode_heads[k],"hjcodes");
}
}
}
@@ -427,7 +427,7 @@ static void undumphjcodes(void)
undump_int(total);
for (k = 0; k < total; k++) {
undump_int(x);
- hjcode_heads[x] = undump_sa_tree();
+ hjcode_heads[x] = undump_sa_tree("hjcodes");
hjcode_valid[x] = 1;
}
}
diff --git a/Build/source/texk/web2c/luatexdir/utils/managed-sa.h b/Build/source/texk/web2c/luatexdir/utils/managed-sa.h
index 0a17a642c8a..d23e3574a40 100644
--- a/Build/source/texk/web2c/luatexdir/utils/managed-sa.h
+++ b/Build/source/texk/web2c/luatexdir/utils/managed-sa.h
@@ -74,9 +74,9 @@ typedef struct {
int stack_step; /* increment stack step */
int stack_type;
int stack_ptr; /* current stack point */
- sa_tree_item dflt; /* default item value */
sa_tree_item ***tree; /* item tree head */
sa_stack_item *stack; /* stack tree head */
+ sa_tree_item dflt; /* default item value */
} sa_tree_head;
typedef sa_tree_head *sa_tree;
@@ -90,8 +90,8 @@ extern sa_tree new_sa_tree(int size, int type, sa_tree_item dflt);
extern sa_tree copy_sa_tree(sa_tree head);
extern void destroy_sa_tree(sa_tree head);
-extern void dump_sa_tree(sa_tree a);
-extern sa_tree undump_sa_tree(void);
+extern void dump_sa_tree(sa_tree a, const char * name);
+extern sa_tree undump_sa_tree(const char * name);
extern void restore_sa_stack(sa_tree a, int gl);
extern void clear_sa_stack(sa_tree a);
diff --git a/Build/source/texk/web2c/luatexdir/utils/managed-sa.w b/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
index 1be36eeb834..6ac4a68ac08 100644
--- a/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
+++ b/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
@@ -144,6 +144,7 @@ sa_tree copy_sa_tree(sa_tree b)
sa_tree a = (sa_tree) Mxmalloc_array(sa_tree_head, 1);
a->stack_step = b->stack_step;
a->stack_size = b->stack_size;
+ a->stack_type = b->stack_type;
a->dflt = b->dflt;
a->stack = NULL;
a->stack_ptr = 0;
@@ -189,6 +190,7 @@ sa_tree new_sa_tree(int size, int type, sa_tree_item dflt)
a->stack_step = size;
a->stack_type = type;
a->stack_ptr = 0;
+ /* printf("creating sa tree of type %d\n",type); */
return (sa_tree) a;
}
@@ -208,7 +210,7 @@ void restore_sa_stack(sa_tree head, int gl)
}
@ @c
-void dump_sa_tree(sa_tree a)
+void dump_sa_tree(sa_tree a, const char * name)
{
boolean f;
int x, n;
@@ -217,9 +219,10 @@ void dump_sa_tree(sa_tree a)
x = a->dflt.int_value;
dump_int(x);
if (a->tree != NULL) {
- dump_int(1);
+ dump_int(1); /* marker */
n = a->stack_type;
dump_int(n);
+ /* printf("dumping sa tree %s with type %d\n",name,n); */
for (h = 0; h < HIGHPART; h++) {
if (a->tree[h] != NULL) {
f = 1;
@@ -229,11 +232,14 @@ void dump_sa_tree(sa_tree a)
f = 1;
dump_qqqq(f);
for (l = 0; l < LOWPART; l++) {
- x = a->tree[h][m][l].dump_uint.value_1;
- dump_int(x);
if (n == 2) {
+ x = a->tree[h][m][l].dump_uint.value_1;
+ dump_int(x);
x = a->tree[h][m][l].dump_uint.value_2;
dump_int(x);
+ } else {
+ x = a->tree[h][m][l].uint_value;
+ dump_int(x);
}
}
} else {
@@ -247,12 +253,12 @@ void dump_sa_tree(sa_tree a)
}
}
} else {
- dump_int(0);
+ dump_int(0); /* marker */
}
}
@ @c
-sa_tree undump_sa_tree(void)
+sa_tree undump_sa_tree(const char * name)
{
int x, n;
int h, m, l;
@@ -266,12 +272,13 @@ sa_tree undump_sa_tree(void)
a->stack = Mxmalloc_array(sa_stack_item, a->stack_size);
a->stack_ptr = 0;
a->tree = NULL;
- undump_int(x);
+ undump_int(x); /* marker */
if (x == 0)
return a;
a->tree = (sa_tree_item ***) Mxcalloc_array(void *, HIGHPART);
undump_int(n);
a->stack_type = n;
+ /* printf("undumping sa tree %s with type %d\n",name,n); */
for (h = 0; h < HIGHPART; h++) {
undump_qqqq(f);
if (f > 0) {
@@ -281,11 +288,14 @@ sa_tree undump_sa_tree(void)
if (f > 0) {
a->tree[h][m] = Mxmalloc_array(sa_tree_item, LOWPART);
for (l = 0; l < LOWPART; l++) {
- undump_int(x);
- a->tree[h][m][l].dump_uint.value_1 = x;
if (n == 2) {
undump_int(x);
+ a->tree[h][m][l].dump_uint.value_1 = x;
+ undump_int(x);
a->tree[h][m][l].dump_uint.value_2 = x;
+ } else {
+ undump_int(x);
+ a->tree[h][m][l].uint_value = x;
}
}
}