summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir
diff options
context:
space:
mode:
authorJérôme Laurens <jerome.laurens@u-bourgogne.fr>2013-04-10 14:26:14 +0000
committerJérôme Laurens <jerome.laurens@u-bourgogne.fr>2013-04-10 14:26:14 +0000
commit5803c0c1d284d58d2314f2e174b3a482a609e246 (patch)
treedcbe2a5291986dc0576c6334e3840c9bc53ab2ef /Build/source/texk/web2c/synctexdir
parentb077b1842b0a65ed8f283b80c336cc57c3aa0ee8 (diff)
Adding support for OS2 thanks to silvan scherrer
git-svn-id: svn://tug.org/texlive/trunk@29825 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/synctexdir')
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.c8
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex_parser_utils.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
index 0000f7e20bb..f8a9f6f9d61 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.c
@@ -57,6 +57,10 @@ authorization from the copyright holder.
#define SYNCTEX_WINDOWS 1
#endif
+#if defined(__OS2__)
+#define SYNCTEX_OS2 1
+#endif
+
#ifdef _WIN32_WINNT_WINXP
#define SYNCTEX_RECENT_WINDOWS 1
#endif
@@ -121,7 +125,7 @@ void _synctex_strip_last_path_extension(char * string) {
last_component = next+1;
}
}
-# ifdef SYNCTEX_WINDOWS
+# if defined(SYNCTEX_WINDOWS) || defined(SYNCTEX_OS2)
/* On Windows, the '\' is also a path separator. */
while((next = strstr(last_component,"\\"))){
last_component = next+1;
@@ -207,7 +211,7 @@ synctex_bool_t _synctex_path_is_absolute(const char * name) {
if(!strlen(name)) {
return synctex_NO;
}
-# if SYNCTEX_WINDOWS
+# if defined(SYNCTEX_WINDOWS) || defined(SYNCTEX_OS2)
if(strlen(name)>2) {
return (name[1]==':' && SYNCTEX_IS_PATH_SEPARATOR(name[2]))?synctex_YES:synctex_NO;
}
diff --git a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
index f817853f5f8..db19b2dadcc 100644
--- a/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
+++ b/Build/source/texk/web2c/synctexdir/synctex_parser_utils.h
@@ -61,7 +61,7 @@ authorization from the copyright holder.
extern "C" {
#endif
-# if _WIN32
+# if defined(_WIN32) || defined(__OS2__)
# define SYNCTEX_CASE_SENSITIVE_PATH 0
# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c || '\\' == c)
# else
@@ -69,7 +69,7 @@ extern "C" {
# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c)
# endif
-# if _WIN32
+# if defined(_WIN32) || defined(__OS2__)
# define SYNCTEX_IS_DOT(c) ('.' == c)
# else
# define SYNCTEX_IS_DOT(c) ('.' == c)