okular/core/synctex/patches/01-fix-win32-define.diff
Albert Astals Cid d95efa7698 Move synctex up to the core from poppler generator
This way dvi and any other potential user gets it for free

The diff is huge, but the synctex files are just moves.

And the code in core/ is also mostly just a move from the generator_pdf.cpp code

Acked by Luigi

REVIEW: 120311
2014-10-09 00:17:53 +02:00

43 lines
1.6 KiB
Diff

diff --git a/generators/poppler/synctex/synctex_parser_utils.c b/generators/poppler/synctex/synctex_parser_utils.c
index 569f7e9..e85ca73 100644
--- a/generators/poppler/synctex/synctex_parser_utils.c
+++ b/generators/poppler/synctex/synctex_parser_utils.c
@@ -157,7 +157,7 @@ synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs
/* Remove the leading regex '(\./+)*' in both rhs and lhs */
lhs = synctex_ignore_leading_dot_slash(lhs);
rhs = synctex_ignore_leading_dot_slash(rhs);
-# if SYNCTEX_WINDOWS
+# ifdef 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
@@ -189,7 +189,7 @@ synctex_bool_t _synctex_path_is_absolute(const char * name) {
if(!strlen(name)) {
return synctex_NO;
}
-# if SYNCTEX_WINDOWS
+# ifdef SYNCTEX_WINDOWS
if(strlen(name)>2) {
return (name[1]==':' && SYNCTEX_IS_PATH_SEPARATOR(name[2]))?synctex_YES:synctex_NO;
}
diff --git a/generators/poppler/synctex/synctex_parser_utils.h b/generators/poppler/synctex/synctex_parser_utils.h
index e67f8f5..f0709e9 100644
--- a/generators/poppler/synctex/synctex_parser_utils.h
+++ b/generators/poppler/synctex/synctex_parser_utils.h
@@ -61,13 +61,13 @@ authorization from the copyright holder.
extern "C" {
#endif
-# if _WIN32
+# ifdef _WIN32
# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c || '\\' == c)
# else
# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c)
# endif
-# if _WIN32
+# ifdef _WIN32
# define SYNCTEX_IS_DOT(c) ('.' == c)
# else
# define SYNCTEX_IS_DOT(c) ('.' == c)