Discussion:
[tex-k] TeX and IPC
Peter Breitenlohner
2011-08-22 08:55:05 UTC
Permalink
Hi everybody,

in the process of reducing (and ideally eliminating) the differences between
the sources used for TeX Live on Unix and Akira's W32TeX I encountered this
difference in the structure defining IPC messages:

TL:
struct msg
{
short namelength; /* length of auxiliary data */
int eof; /* new eof for dvi file */
#if 0 /* see usage of struct msg below */
char more_data[0]; /* where the rest of the stuff goes */
#endif
};
W32TeX:
struct msg
{
int namelength; /* length of auxiliary data */
int eof; /* new eof for dvi file */
#if 0 /* see usage of struct msg below */
char more_data[0]; /* where the rest of the stuff goes */
#endif
};

I have a suspicion that the short+int for TL comes from times when int was
16Bit. With most modern modern compilers the TL struct will probably be
padded such that offsetof(struct msg,eof)==4. This might, however, not be
true for all compilers and I would very much like to either make such
padding explicit or change namelength from short => int.

This all depends, of course, on the definitions in the program reading the
IPC messages. I know that Akira's texview.exe for WIN32 defines namelength
as short.

Question: which Unix programs use TeX's IPC communication and what is their
definition of the IPC messages?

Regards
Peter Breitenlohner <peb at mppmu.mpg.de>
Peter Breitenlohner
2011-08-22 09:02:26 UTC
Permalink
I know that Akira's texview.exe for WIN32 defines namelength as short.
Sorry, that should be

I know that Akira's texview.exe for WIN32 defines namelength as int.

Regards
Peter
Karl Berry
2011-08-22 22:39:57 UTC
Permalink
Question: which Unix programs use TeX's IPC communication

PyTeX is the only one I know of.
http://www.pytex.org/texd/

what is their definition of the IPC messages?

No idea.


For the record ... Tom Rokicki wrote the IPC stuff for the NeXT and his
TeXView.app there, which tells you its age. For a "recent" message from
Tom on the subject:
http://www.tug.org/pipermail/texhax/2007-September/008988.html

karl

Loading...