summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorJérôme Laurens <jerome.laurens@u-bourgogne.fr>2009-12-29 10:13:15 +0000
committerJérôme Laurens <jerome.laurens@u-bourgogne.fr>2009-12-29 10:13:15 +0000
commit64a0ed722ea0120de29af5337ca9b4529e62d09d (patch)
tree4e8311a1f05a4e8f2624a1f5b1e360540fc79261 /Build
parent2d31b9f4213dd09ba941747e13aaa761229a0067 (diff)
3 minor changes: 1) simpler _synctex_malloc function, 2) OutputDebugString replaced with OutputDebugStringA, 3) better conditionals for older WIND2K support
git-svn-id: svn://tug.org/texlive/trunk@16525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog10
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser.c3
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt42
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.c51
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_version.txt2
5 files changed, 83 insertions, 25 deletions
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
index 0705402d6d0..2aeba920ac9 100644
--- a/Build/source/texk/web2c/synctexdir/ChangeLog
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-30 Jérôme Laurens <jerome.laurens@u-bourgogne.fr>
+
+ * synctex_parser_utils.c: in the _synctex_malloc() function,
+ memset() is used unconditionally (suggested by J. Kew).
+ * synctex_parser_utils.c: in the _synctex_error() function,
+ - all 3 instances of OutputDebugString() replaced with OutputDebugStringA()
+ such that unicode is ignored (also suggested by J. Kew).
+ - _WIN32 flag replaced by SYNCTEX_RECENT_WINDOWS because older windows systems
+ may have _WIN32 defined but no OutputDebugString().
+
2009-12-04 Peter Breitenlohner <peb@mppmu.mpg.de>
* synctex.c: Remove extern declaration of gettexstring(),
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser.c b/Build/source/texk/web2c/synctexdir/synctex_parser.c
index f634bc1a8b9..151a553ada1 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser.c
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser.c
@@ -3,7 +3,7 @@ Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
This file is part of the SyncTeX package.
-Version: 1.8
+Version: 1.9
See synctex_parser_readme.txt for more details
Latest Revision: Wed Jul 1 11:18:18 UTC 2009
@@ -4071,7 +4071,6 @@ struct __synctex_updater_t {
synctex_updater_t synctex_updater_new_with_output_file(const char * output, const char * build_directory) {
synctex_updater_t updater = NULL;
char * synctex = NULL;
- size_t size = 0;
synctex_io_mode_t io_mode = synctex_io_mode_read;
const char * mode;
/* prepare the updater */
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt b/Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt
index 6cc8111b0f1..c57f6987d29 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_readme.txt
@@ -16,12 +16,46 @@ synctex_parser_local.h
synctex_parser.h
synctex_parser.c
-This file contains more informations about the SyncTeX parser history.
+The file you are reading contains more informations about the SyncTeX parser history.
In order to support SyncTeX in a viewer, it is sufficient to include
in the source the files synctex_parser.h and synctex_parser.c.
The synctex parser usage is described in synctex_parser.h header file.
+The other files are used by tex engines or by the synctex command line utility:
+
+ChangeLog
+README.txt
+am
+man1
+man5
+synctex-common.h
+synctex-convert.sh
+synctex-e-mem.ch0
+synctex-e-mem.ch1
+synctex-e-rec.ch0
+synctex-e-rec.ch1
+synctex-etex.h
+synctex-mem.ch0
+synctex-mem.ch1
+synctex-mem.ch2
+synctex-pdf-rec.ch2
+synctex-pdftex.h
+synctex-rec.ch0
+synctex-rec.ch1
+synctex-rec.ch2
+synctex-tex.h
+synctex-xe-mem.ch2
+synctex-xe-rec.ch2
+synctex-xe-rec.ch3
+synctex-xetex.h
+synctex.c
+synctex.defines
+synctex.h
+synctex_main.c
+tests
+
+
Version:
--------
This is version 1, which refers to the synctex output file format.
@@ -61,6 +95,10 @@ Note that version 1.7 was delivered privately.
- enhancement: the pdf output file and the associated .synctex file no longer need to live in the same directory.
The new -d option of the synctex command line tool manages this situation.
This is handy when using something like tex -output-directory=DIR ...
+1.9: Wed Nov 4 11:52:35 UTC 2009
+- Various typo fixed
+- OutputDebugString replaced by OutputDebugStringA to deliberately disable unicode preprocessing
+- New conditional created because OutputDebugStringA is only available since Windows 2K professional
Acknowledgments:
----------------
@@ -72,5 +110,5 @@ Nota Bene:
If you include or use a significant part of the synctex package into a software,
I would appreciate to be listed as contributor and see "SyncTeX" highlighted.
-Copyright (c) 2008 jerome DOT laurens AT u-bourgogne DOT fr
+Copyright (c) 2008-2009 jerome DOT laurens AT u-bourgogne DOT fr
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
index 884b00412bb..e344beab1d7 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
@@ -3,9 +3,9 @@ Copyright (c) 2008, 2009 jerome DOT laurens AT u-bourgogne DOT fr
This file is part of the SyncTeX package.
-Latest Revision: Wed Jul 1 11:16:25 UTC 2009
+Latest Revision: Wed Nov 4 11:52:35 UTC 2009
-Version: 1.8
+Version: 1.9
See synctex_parser_readme.txt for more details
License:
@@ -52,19 +52,23 @@ authorization from the copyright holder.
#include <sys/stat.h>
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
+#define SYNCTEX_WINDOWS 1
+#endif
+
+#ifdef _WIN32_WINNT_WINXP
+#define SYNCTEX_RECENT_WINDOWS 1
+#endif
+
+#ifdef SYNCTEX_WINDOWS
#include <windows.h>
#endif
void *_synctex_malloc(size_t size) {
void * ptr = malloc(size);
if(ptr) {
-/* In Visual C, bzero is not available */
-#ifdef _MSC_VER
+/* There used to be a switch to use bzero because it is more secure. JL */
memset(ptr,0, size);
-#else
- bzero(ptr,size);
-#endif
}
return (void *)ptr;
}
@@ -73,23 +77,30 @@ int _synctex_error(const char * reason,...) {
va_list arg;
int result;
va_start (arg, reason);
-# ifdef _WIN32
- {/* This code is contributed by William Blum */
+# ifdef SYNCTEX_RECENT_WINDOWS
+ {/* This code is contributed by William Blum.
+ As it does not work on some older computers,
+ the _WIN32 conditional here is replaced with a SYNCTEX_RECENT_WINDOWS one.
+ According to http://msdn.microsoft.com/en-us/library/aa363362(VS.85).aspx
+ Minimum supported client Windows 2000 Professional
+ Minimum supported server Windows 2000 Server
+ People running Windows 2K standard edition will not have OutputDebugStringA.
+ JL.*/
char *buff;
size_t len;
- OutputDebugString("SyncTeX ERROR: ");
+ OutputDebugStringA("SyncTeX ERROR: ");
len = _vscprintf(reason, arg) + 1;
buff = (char*)malloc( len * sizeof(char) );
result = vsprintf(buff, reason, arg) +strlen("SyncTeX ERROR: ");
- OutputDebugString(buff);
- OutputDebugString("\n");
+ OutputDebugStringA(buff);
+ OutputDebugStringA("\n");
free(buff);
}
-#else
+# else
result = fprintf(stderr,"SyncTeX ERROR: ");
result += vfprintf(stderr, reason, arg);
result += fprintf(stderr,"\n");
-#endif
+# endif
va_end (arg);
return result;
}
@@ -109,12 +120,12 @@ void _synctex_strip_last_path_extension(char * string) {
last_component = next+1;
}
}
-#ifdef _WIN32
+# ifdef SYNCTEX_WINDOWS
/* On Windows, the '\' is also a path separator. */
while((next = strstr(last_component,"\\"))){
last_component = next+1;
}
-#endif
+# endif
/* then we find the last path extension */
if((last_extension = strstr(last_component,"."))){
++last_extension;
@@ -131,7 +142,7 @@ void _synctex_strip_last_path_extension(char * string) {
/* Compare two file names, windows is sometimes case insensitive... */
synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs) {
-# if _WIN32
+# if SYNCTEX_WINDOWS
/* On Windows, filename should be compared case insensitive.
* The characters '/' and '\' are both valid path separators.
* There will be a very serious problem concerning UTF8 because
@@ -163,7 +174,7 @@ synctex_bool_t _synctex_path_is_absolute(const char * name) {
if(!strlen(name)) {
return synctex_NO;
}
-# if _WIN32
+# if SYNCTEX_WINDOWS
if(strlen(name)>2) {
return (name[1]==':' && SYNCTEX_IS_PATH_SEPARATOR(name[2]))?synctex_YES:synctex_NO;
}
@@ -423,7 +434,7 @@ int _synctex_get_name(const char * output, const char * build_directory, char **
TEST(build_quoted,synctex_compress_mode_none);
TEST(build_quoted_gz,synctex_compress_mode_gz);
# undef TEST
- /* Free all the intermediate filenames, except the on that will be used as returned value. */
+ /* Free all the intermediate filenames, except the one that will be used as returned value. */
# define CLEAN_AND_REMOVE(FILENAME) \
if(FILENAME && (FILENAME!=synctex_name)) {\
remove(FILENAME);\
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_version.txt b/Build/source/texk/web2c/synctexdir/synctex_parser_version.txt
index 46843749469..872765e5f28 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_version.txt
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_version.txt
@@ -1 +1 @@
-1.8 \ No newline at end of file
+1.9 \ No newline at end of file