[tex-k] TeX and IPC

Peter Breitenlohner peb at mppmu.mpg.de
Mon Aug 22 10:55:05 CEST 2011


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>


More information about the tex-k mailing list