mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 13:11:41 +00:00
d95efa7698
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
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
diff --git a/generators/poppler/synctex/synctex_parser_utils.h b/generators/poppler/synctex/synctex_parser_utils.h
|
|
index f0709e9..92184b8 100644
|
|
--- a/generators/poppler/synctex/synctex_parser_utils.h
|
|
+++ b/generators/poppler/synctex/synctex_parser_utils.h
|
|
@@ -72,7 +72,13 @@ extern "C" {
|
|
# else
|
|
# define SYNCTEX_IS_DOT(c) ('.' == c)
|
|
# endif
|
|
-
|
|
+
|
|
+# ifdef __GNUC__
|
|
+# define SYNCTEX_PRINTF_FORMAT(si, ftc) __attribute__ ((format (printf, si, ftc)))
|
|
+# else
|
|
+# define SYNCTEX_PRINTF_FORMAT(si, ftc)
|
|
+# endif
|
|
+
|
|
/* This custom malloc functions initializes to 0 the newly allocated memory.
|
|
* There is no bzero function on windows. */
|
|
void *_synctex_malloc(size_t size);
|
|
@@ -80,7 +86,7 @@ void *_synctex_malloc(size_t size);
|
|
/* This is used to log some informational message to the standard error stream.
|
|
* On Windows, the stderr stream is not exposed and another method is used.
|
|
* The return value is the number of characters printed. */
|
|
-int _synctex_error(const char * reason,...);
|
|
+int _synctex_error(const char * reason,...) SYNCTEX_PRINTF_FORMAT(1, 2);
|
|
|
|
/* strip the last extension of the given string, this string is modified!
|
|
* This function depends on the OS because the path separator may differ.
|