summaryrefslogtreecommitdiffstats
path: root/office/zathura/synctex_fix.diff
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2018-09-09 17:13:52 -0400
committer David Spencer <idlemoor@slackbuilds.org>2018-09-15 19:23:40 +0100
commit76e58af907b06aa2ae45c638391eb3814cd3dcd9 (patch)
treeb51be83975b8da2b3d96b33ee7e61579edba57dd /office/zathura/synctex_fix.diff
parentaa991108b1b77cfecc77f69a1812c66266678eb5 (diff)
downloadslackbuilds-76e58af907b06aa2ae45c638391eb3814cd3dcd9.tar.gz
slackbuilds-76e58af907b06aa2ae45c638391eb3814cd3dcd9.tar.xz
office/zathura: Re-enable synctex.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'office/zathura/synctex_fix.diff')
-rw-r--r--office/zathura/synctex_fix.diff59
1 files changed, 59 insertions, 0 deletions
diff --git a/office/zathura/synctex_fix.diff b/office/zathura/synctex_fix.diff
new file mode 100644
index 0000000000..904bd663fe
--- /dev/null
+++ b/office/zathura/synctex_fix.diff
@@ -0,0 +1,59 @@
+diff -Naur zathura-0.3.8/zathura/synctex.c zathura-0.3.8.patched/zathura/synctex.c
+--- zathura-0.3.8/zathura/synctex.c 2017-12-20 08:40:45.000000000 -0500
++++ zathura-0.3.8.patched/zathura/synctex.c 2018-09-09 13:56:54.489287021 -0400
+@@ -24,13 +24,13 @@
+ return false;
+ }
+
+- synctex_scanner_t scanner = synctex_scanner_new_with_output_file(filename, NULL, 1);
++ synctex_scanner_p scanner = synctex_scanner_new_with_output_file(filename, NULL, 1);
+ if (scanner == NULL) {
+ girara_debug("Failed to create synctex scanner.");
+ return false;
+ }
+
+- synctex_scanner_t temp = synctex_scanner_parse(scanner);
++ synctex_scanner_p temp = synctex_scanner_parse(scanner);
+ if (temp == NULL) {
+ girara_debug("Failed to parse synctex file.");
+ synctex_scanner_free(scanner);
+@@ -41,7 +41,7 @@
+
+ if (synctex_edit_query(scanner, page + 1u, x, y) > 0) {
+ /* Assume that a backward search returns at most one result. */
+- synctex_node_t node = synctex_next_result(scanner);
++ synctex_node_p node = synctex_scanner_next_result(scanner);
+ if (node != NULL) {
+ if (input_file != NULL) {
+ *input_file = g_strdup(synctex_scanner_get_name(scanner, synctex_node_tag(node)));
+@@ -127,13 +127,13 @@
+ ++line;
+ ++column;
+
+- synctex_scanner_t scanner = synctex_scanner_new_with_output_file(filename, NULL, 1);
++ synctex_scanner_p scanner = synctex_scanner_new_with_output_file(filename, NULL, 1);
+ if (scanner == NULL) {
+ girara_debug("Failed to create synctex scanner.");
+ return NULL;
+ }
+
+- synctex_scanner_t temp = synctex_scanner_parse(scanner);
++ synctex_scanner_p temp = synctex_scanner_parse(scanner);
+ if (temp == NULL) {
+ girara_debug("Failed to parse synctex file.");
+ synctex_scanner_free(scanner);
+@@ -143,11 +143,11 @@
+ girara_list_t* hitlist = girara_list_new2(g_free);
+ girara_list_t* other_rects = girara_list_new2(g_free);
+
+- if (synctex_display_query(scanner, input_file, line, column) > 0) {
+- synctex_node_t node = NULL;
++ if (synctex_display_query(scanner, input_file, line, column, -1) > 0) {
++ synctex_node_p node = NULL;
+ bool got_page = false;
+
+- while ((node = synctex_next_result (scanner)) != NULL) {
++ while ((node = synctex_scanner_next_result (scanner)) != NULL) {
+ const unsigned int current_page = synctex_node_page(node) - 1;
+ if (got_page == false) {
+ got_page = true;