Skip to content

Commit 03f81c0

Browse files
committed
engine_xetex: issue warnings for pipe input open attempts
1 parent 483d56a commit 03f81c0

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

crates/engine_xetex/xetex/xetex-io.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,21 @@ tt_xetex_open_input (int filefmt)
2424
{
2525
rust_input_handle_t handle;
2626

27-
if (filefmt == TTBC_FILE_FORMAT_TECTONIC_PRIMARY)
27+
if (filefmt == TTBC_FILE_FORMAT_TECTONIC_PRIMARY) {
2828
handle = ttstub_input_open_primary ();
29-
else
29+
} else if (name_of_file[0] == '|') {
30+
// Tectonic TODO: issue #859. In mainline XeTeX, a pipe symbol indicates
31+
// piped input from an external command via `popen()`. Now that we have
32+
// shell-escape support we could also support this, but we don't have a
33+
// real implementation yet. For now, issue a warning.
34+
print_nl_cstr("Warning: ");
35+
diagnostic_begin_capture_warning_here();
36+
print_cstr("piped inputs from external commands are not implemented in Tectonic");
37+
capture_to_diagnostic(NULL);
38+
return NULL;
39+
} else {
3040
handle = ttstub_input_open (name_of_file, (ttbc_file_format) filefmt, 0);
41+
}
3142

3243
if (handle == NULL)
3344
return NULL;

0 commit comments

Comments
 (0)