summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2008-05-08 13:16:56 +0000
committerJonathan Kew <jfkthame@googlemail.com>2008-05-08 13:16:56 +0000
commita10711ec4f3a0ce10ece61a929101038b83e19f2 (patch)
treed96b31bbbd70c63e6bde6853ecba897efbe9f39c /Build/source/texk/web2c/lib
parent012963a39269c51a7c94afabeb2bda2ac20f84aa (diff)
updated synctex code from xetex svn r.670
git-svn-id: svn://tug.org/texlive/trunk@7936 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/lib')
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 36a940b0d96..887f07d4402 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -225,8 +225,16 @@ maininit P2C(int, ac, string *, av)
kpse_record_output = recorder_record_output;
#if /*defined (pdfTeX) ||*/ defined(XeTeX) || defined(__syncTeX__)
- /* 0 means don't use Synchronize TeXnology. */
- synctexoption = 0;
+# warning SyncTeX: -synctex command line option available
+ /* 0 means "disable Synchronize TeXnology".
+ * synctexoption is a *.web variable.
+ * We initialize it to a weird value to catch the -synctex command line flag
+ * At runtime, if synctexoption is not INT_MAX, then it contains the command line option provided,
+ * otherwise no such option was given by the user. */
+# define SYNCTEX_NO_OPTION INT_MAX
+ synctexoption = SYNCTEX_NO_OPTION;
+#else
+# warning SyncTeX: -synctex command line option NOT available
#endif
#if defined(pdfTeX) || defined(luaTeX)
@@ -1139,9 +1147,9 @@ parse_options P2C(int, argc, string *, argv)
#if /*defined (pdfTeX) ||*/ defined(XeTeX) || defined(__syncTeX__)
} else if (ARGUMENT_IS ("synctex")) {
- /* Synchronize TeXnology: catching the command line option as an unsigned long */
- synctexoption = (int) strtoul(optarg, NULL, 0);
- #endif
+ /* Synchronize TeXnology: catching the command line option as a long */
+ synctexoption = (int) strtol(optarg, NULL, 0);
+#endif
} else if (ARGUMENT_IS ("version")) {
char *versions;