summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2011-05-09 13:35:54 +0000
committerTaco Hoekwater <taco@elvenkind.com>2011-05-09 13:35:54 +0000
commit98e115e6ab23bd295c8199320c229a19bb3ad890 (patch)
tree9c6b8c4ee8106c524f1acd4a7e003b948adef1f6 /Build
parent53aac48c4311d498dfcd1355d9c159d2cd72136a (diff)
fix the synctex problem with relative filenames and output-directory (for luatex only)
git-svn-id: svn://tug.org/texlive/trunk@22378 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog3
-rw-r--r--Build/source/texk/web2c/luatexdir/luatex_svnversion.h2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texfileio.h3
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/texfileio.w22
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-luatex.h2
6 files changed, 32 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index afc44afeaa7..0ed797a6f71 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,6 @@
+2011-05-09 Taco Hoekwater <taco@luatex.org>
+ * tex/texfileio.[hw]: file relative filenames in synctex output.
+ * luatex_svnversion.h: updated to reflect latest luatex revision (4256)
2011-05-08 Taco Hoekwater <taco@luatex.org>
* dvi/dvigen.w, pdf/pdfgen.w: fix missing newline after
diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
index 4e426a09912..c7224ad40a2 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 4247
+#define luatex_svn_revision 4256
diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.h b/Build/source/texk/web2c/luatexdir/tex/texfileio.h
index 0ec6605b18c..ceb7a1383fd 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texfileio.h
+++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.h
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
-/* $Id: texfileio.h 4005 2010-11-29 11:52:43Z taco $ */
+/* $Id: texfileio.h 4255 2011-05-09 11:48:02Z taco $ */
#ifndef TEXFILEIO_H
# define TEXFILEIO_H
@@ -140,5 +140,6 @@ extern boolean open_in_or_pipe(FILE **, char *, int, const_string fopen_mode,
extern boolean open_out_or_pipe(FILE **, char *, const_string fopen_mode);
extern void close_file_or_pipe(FILE *);
+extern char *luatex_synctex_get_current_name(void);
#endif
diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.w b/Build/source/texk/web2c/luatexdir/tex/texfileio.w
index c26647e03d9..2a0a6c88913 100644
--- a/Build/source/texk/web2c/luatexdir/tex/texfileio.w
+++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.w
@@ -23,7 +23,7 @@
#include <kpathsea/absolute.h>
static const char _svn_version[] =
- "$Id: texfileio.w 4229 2011-04-30 07:20:23Z taco $"
+ "$Id: texfileio.w 4256 2011-05-09 13:15:39Z taco $"
"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.70.x/source/texk/web2c/luatexdir/tex/texfileio.w $";
@ @c
@@ -856,6 +856,26 @@ char *get_full_log_name (void)
}
}
+@ Synctex uses this to get the anchored path of an input file.
+
+@c
+char *luatex_synctex_get_current_name (void)
+{
+ char *pwdbuf = NULL, *ret;
+ int pwdbufsize = 2;
+ if (kpse_absolute_p(fullnameoffile, false)) {
+ return xstrdup(fullnameoffile);
+ }
+ do {
+ pwdbufsize = 2*pwdbufsize;
+ pwdbuf = xrealloc (pwdbuf, pwdbufsize);
+ } while (!getcwd(pwdbuf, pwdbufsize));
+ ret = concat3(pwdbuf, DIR_SEP_STRING, fullnameoffile);
+ free(pwdbuf) ;
+ return ret;
+}
+
+
@ Let's turn now to the procedure that is used to initiate file reading
when an `\.{\\input}' command is being processed.
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
index 7c969e81018..f1200648a04 100644
--- a/Build/source/texk/web2c/synctexdir/ChangeLog
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-09 Taco Hoekwater <taco@luatex.org>
+
+ * synctex-luatex.h: use an actual function to find the current name.
+
2011-04-16 Taco Hoekwater <taco@luatex.org>
* synctex.c: Rename flags member output => output_p to avoid
diff --git a/Build/source/texk/web2c/synctexdir/synctex-luatex.h b/Build/source/texk/web2c/synctexdir/synctex-luatex.h
index 28ee3dd3efd..e6dc12722a6 100644
--- a/Build/source/texk/web2c/synctexdir/synctex-luatex.h
+++ b/Build/source/texk/web2c/synctexdir/synctex-luatex.h
@@ -59,7 +59,7 @@ authorization from the copyright holder.
#define SYNCTEX_RULE_DP depth(p)
#define SYNCTEX_CURRENT_TAG (cur_input.synctex_tag_field)
-#define SYNCTEX_GET_CURRENT_NAME() (makecstring(cur_input.name_field))
+#define SYNCTEX_GET_CURRENT_NAME() luatex_synctex_get_current_name()
#define SYNCTEX_GET_TOTAL_PAGES() (total_pages)
#include "ptexlib.h"