summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/epdfinfo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/epdfinfo.c b/server/epdfinfo.c
index 86d9200..c07740d 100644
--- a/server/epdfinfo.c
+++ b/server/epdfinfo.c
@@ -2977,7 +2977,9 @@ cmd_synctex_forward_search (const epdfinfo_t *ctx, const command_arg_t *args)
PopplerPage *page = NULL;
double width, height;
int pn;
+ int fd;
+ DISCARD_STDOUT (fd);
scanner = synctex_scanner_new_with_output_file (doc->filename, NULL, 1);
perror_if_not (scanner, "Unable to create synctex scanner,\
did you run latex with `--synctex=1' ?");
@@ -3001,6 +3003,7 @@ cmd_synctex_forward_search (const epdfinfo_t *ctx, const command_arg_t *args)
x2 /= width;
y2 /= height;
+ UNDISCARD_STDOUT (fd);
OK_BEGIN ();
printf("%d:%f:%f:%f:%f\n", pn, x1, y1, x2, y2);
OK_END ();
@@ -3032,7 +3035,9 @@ cmd_synctex_backward_search (const epdfinfo_t *ctx, const command_arg_t *args)
synctex_node_t node;
double width, height;
int line, column;
+ int fd;
+ DISCARD_STDOUT (fd);
scanner = synctex_scanner_new_with_output_file (doc->filename, NULL, 1);
perror_if_not (scanner, "Unable to create synctex scanner,\
did you run latex with `--synctex=1' ?");
@@ -3048,6 +3053,7 @@ cmd_synctex_backward_search (const epdfinfo_t *ctx, const command_arg_t *args)
|| ! (filename =
synctex_scanner_get_name (scanner, synctex_node_tag (node))))
{
+ UNDISCARD_STDOUT (fd);
printf_error_response ("Destination not found");
goto error;
}
@@ -3055,6 +3061,7 @@ cmd_synctex_backward_search (const epdfinfo_t *ctx, const command_arg_t *args)
line = synctex_node_line (node);
column = synctex_node_column (node);
+ UNDISCARD_STDOUT (fd);
OK_BEGIN ();
print_response_string (filename, COLON);
printf("%d:%d\n", line, column);