[tex-live] shell_escape extension patch

Taco Hoekwater taco at elvenkind.com
Mon Jun 12 15:31:28 CEST 2006


Hi,

A while back Ivo Welch asked for a pdftex extension such that it
could handle unidirectional pipes (either inbound or outbound).
He was even willing to donate money for such a feature.

The easiest place to add this functionality was in the web2c specific
openclose.c (and because of the inherent system dependancy it is also
the most logical place), so I have written a (test) patch for this
and uploaded it to sarovar (also attached to this email message, it
is really small).

I've already received word from Akira that he will be happy to add
this functionality to W32TEX, so: could this be considered for
addition in the next TeXLive as well?
(I know it would make Ivo really happy and it would also result
in him donating some funds to the TeX Development Fund @ TUG).

The patch makes open_input() and open_output() assume file names
that start with the pipe symbol (|) are actually requests for
read or write pipes, so it allows TeX code like this:

    \input "| perl -e 'print sqrt(\value{page})'"

or

   \immediate\openout1 = "|sort > sorted.tex"
   \immediate\write 1 {b}
   \immediate\write 1 {a}
   \immediate\write 1 {c}
   \immediate\closeout1
   \input sorted


Cheers, Taco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: popen.diff
Type: text/x-patch
Size: 4309 bytes
Desc: not available
Url : http://tug.org/pipermail/tex-live/attachments/20060612/168db9aa/attachment.bin 


More information about the tex-live mailing list