Skip to content

Commit 64dbb30

Browse files
committed
tectonic/synctex.c: eliminate some one-time-use macros
These macros were just used once so they're not really very useful. If I am understanding this correctly it is possible that one might want to produce a Synctex file for XDV output rather than PDF output, in which case we would have to make these values changeable at runtime again. But this seems like a very niche use case so I am OK with simplifying things now and potentially having to do a bit of legwork to re-complicate them later.
1 parent 6672da9 commit 64dbb30

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tectonic/synctex.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
/* formerly synctex-xetex.h */
1919

20-
#define SYNCTEX_OFFSET_IS_PDF 1
21-
#define SYNCTEX_OUTPUT "pdf"
2220
#define SYNCTEX_CURH (cur_h + 4736287)
2321
#define SYNCTEX_CURV (cur_v + 4736287)
2422
#define synchronization_field_size 1
@@ -706,12 +704,9 @@ synctex_record_settings(void)
706704
if (NULL == synctex_ctxt.file)
707705
return 0;
708706

709-
len = ttstub_fprintf(synctex_ctxt.file, "Output:%s\nMagnification:%i\nUnit:%i\nX Offset:%i\nY Offset:%i\n",
710-
SYNCTEX_OUTPUT,
707+
len = ttstub_fprintf(synctex_ctxt.file, "Output:pdf\nMagnification:%i\nUnit:%i\nX Offset:0\nY Offset:0\n",
711708
synctex_ctxt.magnification,
712-
synctex_ctxt.unit,
713-
(SYNCTEX_OFFSET_IS_PDF != 0) ? 0 : 4736287 / synctex_ctxt.unit, /* magic pt/in conversion */
714-
(SYNCTEX_OFFSET_IS_PDF != 0) ? 0 : 4736287 / synctex_ctxt.unit); /* magic pt/in conversion */
709+
synctex_ctxt.unit); /* magic pt/in conversion */
715710

716711
if (len > 0) {
717712
synctex_ctxt.total_length += len;

0 commit comments

Comments
 (0)