summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/utils
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2011-04-12 14:17:47 +0000
committerTaco Hoekwater <taco@elvenkind.com>2011-04-12 14:17:47 +0000
commit307453997ef030ec4dfa1e876feaf0b8b8125bab (patch)
treeab2054693ba95e9ac8f6e3478b4d0175d893329f /Build/source/texk/web2c/luatexdir/utils
parentd95b11a25d3d9e17cc4afb9c8713ef4037567527 (diff)
check in luatex 0.66.0
git-svn-id: svn://tug.org/texlive/trunk@22059 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/utils')
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/avlstuff.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/managed-sa.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h13
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/synctex.c52
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/utils.w21
5 files changed, 48 insertions, 42 deletions
diff --git a/Build/source/texk/web2c/luatexdir/utils/avlstuff.w b/Build/source/texk/web2c/luatexdir/utils/avlstuff.w
index d46c5cabe77..81b0bd92028 100644
--- a/Build/source/texk/web2c/luatexdir/utils/avlstuff.w
+++ b/Build/source/texk/web2c/luatexdir/utils/avlstuff.w
@@ -26,7 +26,7 @@
static const char _svn_version[] =
"$Id: avlstuff.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/utils/avlstuff.w $";
+ "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/utils/avlstuff.w $";
@ memory management functions for AVL
@c
diff --git a/Build/source/texk/web2c/luatexdir/utils/managed-sa.w b/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
index 5c02f13d76d..a9cd131d64a 100644
--- a/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
+++ b/Build/source/texk/web2c/luatexdir/utils/managed-sa.w
@@ -24,7 +24,7 @@
static const char _svn_version[] =
"$Id: managed-sa.w 3584 2010-04-02 17:45:55Z hhenkel $ "
-"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/utils/managed-sa.w $";
+"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/utils/managed-sa.w $";
@ @c
static void store_sa_stack(sa_tree a, int n, sa_tree_item v, int gl)
diff --git a/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h b/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h
index 9a8dba6825b..53988694299 100644
--- a/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h
+++ b/Build/source/texk/web2c/luatexdir/utils/synctex-luatex.h
@@ -34,7 +34,7 @@ authorization from the copyright holder.
*/
-/* $Id: synctex-luatex.h 3685 2010-05-13 07:37:47Z taco $ */
+/* $Id: synctex-luatex.h 4064 2011-01-12 22:12:22Z hhenkel $ */
#undef synchronization_field_size
#define synchronization_field_size 1
@@ -85,7 +85,7 @@ authorization from the copyright holder.
#define SYNCTEX_CURH static_pdf->posstruct->pos.h
#define SYNCTEX_GET_JOB_NAME() makecstring(job_name)
-#define SYNCTEX_GET_LOG_NAME() (char *)xstrdup((const char*)texmf_log_name)
+#define SYNCTEX_GET_LOG_NAME() get_full_log_name()
#define SYNCTEX_RULE_WD width(p)
#define SYNCTEX_RULE_HT height(p)
@@ -97,14 +97,13 @@ authorization from the copyright holder.
#include "ptexlib.h"
-/* We observe pdfoutputvalue in order to determine whether output mode is
+/* We observe static_pdf->o_mode in order to determine whether output mode is
* pdf or dvi.
- * We will assume that pdf_output_value equals pdf_output before entering
+ * We will assume that pdf->o_mode is set before entering
* the synctex_sheet function below. */
#undef SYNCTEX_OFFSET_IS_PDF
-#define SYNCTEX_OFFSET_IS_PDF (pdf_output_value>0)
+#define SYNCTEX_OFFSET_IS_PDF (static_pdf->o_mode==OMODE_PDF)
#undef SYNCTEX_OUTPUT
-#define SYNCTEX_OUTPUT ((pdf_output_value>0)?"pdf":"dvi")
+#define SYNCTEX_OUTPUT ((static_pdf->o_mode==OMODE_PDF)?"pdf":"dvi")
#define __SyncTeX__ 1
-
diff --git a/Build/source/texk/web2c/luatexdir/utils/synctex.c b/Build/source/texk/web2c/luatexdir/utils/synctex.c
index 557c0bdae23..3b643ee064f 100644
--- a/Build/source/texk/web2c/luatexdir/utils/synctex.c
+++ b/Build/source/texk/web2c/luatexdir/utils/synctex.c
@@ -998,6 +998,12 @@ static inline void synctex_record_rule(halfword p);
# define SYNCTEX_IGNORE_RULE(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
|| (0 >= SYNCTEX_TAG_MODEL(NODE,rule_node_size)) \
|| (0 >= SYNCTEX_LINE_MODEL(NODE,rule_node_size))
+# define SYNCTEX_IGNORE_GLUE(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
+ || (0 >= SYNCTEX_TAG_MODEL(NODE,glue_node_size)) \
+ || (0 >= SYNCTEX_LINE_MODEL(NODE,glue_node_size))
+# define SYNCTEX_IGNORE_KERN(NODE) SYNCTEX_IS_OFF || !SYNCTEX_VALUE \
+ || (0 >= SYNCTEX_TAG_MODEL(NODE,kern_node_size)) \
+ || (0 >= SYNCTEX_LINE_MODEL(NODE,kern_node_size))
void synctexhorizontalruleorglue(halfword p, halfword this_box
__attribute__ ((unused)))
{
@@ -1009,8 +1015,12 @@ void synctexhorizontalruleorglue(halfword p, halfword this_box
if (SYNCTEX_IGNORE_RULE(p)) {
return;
}
- } else {
- if (SYNCTEX_IGNORE(p)) {
+ } else if (SYNCTEX_TYPE(p) == glue_node) {
+ if (SYNCTEX_IGNORE_GLUE(p)) {
+ return;
+ }
+ } else if (SYNCTEX_TYPE(p) == kern_node) {
+ if (SYNCTEX_IGNORE_KERN(p)) {
return;
}
}
@@ -1025,13 +1035,13 @@ void synctexhorizontalruleorglue(halfword p, halfword this_box
synctex_record_rule(p); /* always record synchronously: maybe some text is outside the box */
break;
case glue_node:
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, glue_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, glue_node_size);
synctex_record_glue(p); /* always record synchronously: maybe some text is outside the box */
break;
case kern_node:
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_record_kern(p); /* always record synchronously: maybe some text is outside the box */
break;
default:
@@ -1049,7 +1059,7 @@ void synctexkern(halfword p, halfword this_box)
# if SYNCTEX_DEBUG
printf("\nSynchronize DEBUG: synctexkern\n");
# endif
- if (SYNCTEX_IGNORE(p)) {
+ if (SYNCTEX_IGNORE_KERN(p)) {
return;
}
if (SYNCTEX_CONTEXT_DID_CHANGE(p)) {
@@ -1061,13 +1071,13 @@ void synctexkern(halfword p, halfword this_box)
if (synctex_ctxt.node == this_box) {
/* first node in the list */
synctex_ctxt.node = p;
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_ctxt.recorder = &synctex_kern_recorder;
} else {
synctex_ctxt.node = p;
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_ctxt.recorder = NULL;
/* always record when the context has just changed
* and when not the first node */
@@ -1076,8 +1086,8 @@ void synctexkern(halfword p, halfword this_box)
} else {
/* just update the geometry and type (for future improvements) */
synctex_ctxt.node = p;
- synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, medium_node_size);
- synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, medium_node_size);
+ synctex_ctxt.tag = SYNCTEX_TAG_MODEL(p, kern_node_size);
+ synctex_ctxt.line = SYNCTEX_LINE_MODEL(p, kern_node_size);
synctex_ctxt.recorder = &synctex_kern_recorder;
}
}
@@ -1455,8 +1465,8 @@ static inline void synctex_record_glue(halfword p)
printf("\nSynchronize DEBUG: synctex_glue_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "g%i,%i:%i,%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, glue_node_size),
+ SYNCTEX_LINE_MODEL(p, glue_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT);
if (len > 0) {
synctex_ctxt.total_length += len;
@@ -1475,8 +1485,8 @@ static inline void synctex_record_kern(halfword p)
printf("\nSynchronize DEBUG: synctex_kern_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,%i:%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, kern_node_size),
+ SYNCTEX_LINE_MODEL(p, kern_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT,
SYNCTEX_WIDTH(p) UNIT);
if (len > 0) {
@@ -1517,8 +1527,8 @@ void synctex_math_recorder(halfword p)
printf("\nSynchronize DEBUG: synctex_math_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "$%i,%i:%i,%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, math_node_size),
+ SYNCTEX_LINE_MODEL(p, math_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT);
if (len > 0) {
synctex_ctxt.total_length += len;
@@ -1537,8 +1547,8 @@ void synctex_kern_recorder(halfword p)
printf("\nSynchronize DEBUG: synctex_kern_recorder\n");
# endif
len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,%i:%i\n",
- SYNCTEX_TAG_MODEL(p, medium_node_size),
- SYNCTEX_LINE_MODEL(p, medium_node_size),
+ SYNCTEX_TAG_MODEL(p, kern_node_size),
+ SYNCTEX_LINE_MODEL(p, kern_node_size),
synctex_ctxt.curh UNIT, synctex_ctxt.curv UNIT,
SYNCTEX_WIDTH(p) UNIT);
if (len > 0) {
diff --git a/Build/source/texk/web2c/luatexdir/utils/utils.w b/Build/source/texk/web2c/luatexdir/utils/utils.w
index 05eca81cbc6..e3dc26bc6bf 100644
--- a/Build/source/texk/web2c/luatexdir/utils/utils.w
+++ b/Build/source/texk/web2c/luatexdir/utils/utils.w
@@ -20,8 +20,8 @@
@ @c
static const char _svn_version[] =
- "$Id: utils.w 3584 2010-04-02 17:45:55Z hhenkel $ "
- "$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/utils/utils.w $";
+ "$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 $";
@ @c
#include "openbsd-compat.h"
@@ -49,13 +49,11 @@ static const char _svn_version[] =
#include "lua/luatex-api.h" /* for ptexbanner */
#include "png.h"
-#ifdef POPPLER_VERSION
-# define xpdfString "poppler"
-# include "poppler-config.h"
-# define xpdfVersion POPPLER_VERSION
-#else
-# define xpdfString "xpdf"
-# include "xpdf/config.h" /* just to get the xpdf version */
+
+#include "poppler-config.h"
+#ifndef POPPLER_VERSION
+# include "aconf.h"
+# define POPPLER_VERSION POPPLER_PACKAGE_VERSION
#endif
@ @c
@@ -354,9 +352,9 @@ void initversionstring(char **versions)
(void) asprintf(versions,
"Compiled with libpng %s; using libpng %s\n"
"Compiled with zlib %s; using zlib %s\n"
- "Compiled with %s version %s\n",
+ "Compiled with poppler version %s\n",
PNG_LIBPNG_VER_STRING, png_libpng_ver,
- ZLIB_VERSION, zlib_version, xpdfString, xpdfVersion);
+ ZLIB_VERSION, zlib_version, POPPLER_VERSION);
}
@ @c
@@ -407,7 +405,6 @@ scaled divide_scaled(scaled s, scaled m, int dd)
/* rounding */
if (2 * r >= m) {
q++;
- r -= m;
}
return sign * q;
}