The following change log was first introduced into an old derivate of
``texindex'' called ``texidx''. (texidx is the index sort program included
in the Beebe DVI driver distribution.)
When I later came into contact with GNU texindex, these changes were
incorporated into its source to enable compiling on MSDOS systems.

/**************************************************************************
[11-Apr-91]   TH Darmstadt, Institut fuer Kernphysik, Chr. Spieler:
	      Major revision of this program.
	      -	completed conditional compilation switches according to
		the way done in machdefs.h for the dvi drivers.
	      - added support for ANSI type checking (complete list of
		function prototypes etc.)
	      - changed the relative adjustment of a pointer into a buffer
		after a realloc to "pointer = newbuff + (pointer-oldbuf)";
		the original code "pointer += newbuff - oldbuff" did not
		work with the far pointers used on segmented machines.
	      - for OS_PCDOS, the tempfile counter is put into the file
		extension.
	      - for Turbo C 2.0 a special adaption in the creation of the
		base for tempfile names was nessecary.
	      - for VAXVMS, the default tempdir has been changed to
		"sys$scratch" and the '/' in front of tempbase is removed.
	      - complete revision of the offline sort for large input files!!
		(The original code did not work at all):
		For OFFLINE sort, the filtering of the index entries is done
		during the final step of file merging.
		+ added a switch to the parameters of sort_in_core() that
		  controlles the processing of the sorted lines. When called
		  from sort_offline(), this switch is FALSE and the output
		  file is left unfiltered.
		+ added a new function writetemp(). This function is called
		  by sort_in_core() instead of writelines() when sorting
		  intermediate tempfiles and writes the sorted lines to
		  the new tempfile without calling indexify().
		+ the parameter list of merge_direct contains a new switch
		  final, that is used to control the filtering of the lines
		  written to the output file. Filtering is done during the
		  last merge only!!
		+ in sort_offline(), the actual length of the tempfiles
		  produced is inquired and used in the calls to sort_in_core().
		  On some non-UNIX systems, translation of record delimiters
		  is done during access to text files, so the actual length
		  of the file exceeded the length count maintained by the
		  program. Then the read of the files done by sort_in_core
		  lost some data at the end of the file.
		  (This was the case especially on the IBM PC).
[21-Apr-91]   TH Darmstadt, Institut fuer Kernphysik, Chr. Spieler:
	      - In function find_braced_pos(), reorganized code to eliminate
		alias in skip-words-loop. This allows to use full optimization
		with Microsoft C 5.1 !
[13-May-91]   TH Darmstadt, Institut fuer Kernphysik, Chr. Spieler:
	      -	added a define of an alias name for the qsort function, used
		only under VAXVMS. This allows linking this alternative qsort
		function into texidx while using the shared runtime library.
[27-Jul-91]   TH Darmstadt, Institut fuer Kernphysik, Chr. Spieler:
	      - simplified the implementation of the conditional application
		of ANSI-Prototypes and ANSI-Library-conformant declarations
		by using preprocessor-defined macros and strings (for the
		tokens "void *", "const" and "size_t").
	      - generation of temporary filenames:
		moved delimiter between path and filename to the end of the
		path string. This allowed a more portable definition of the
		base name for the tempfiles.
	      - added some additional type casts to avoid compiler warnings.
[25-Jan-92]   TH Darmstadt, Institut fuer Kernphysik, Chr. Spieler:
	      -	use return instead of exit() function to end main() routine.
		(VMS change)
[03-Apr-92]  TH Darmstadt, Institut fuer Kernphysik, Chr. Spieler:
	     -	All structure definitions are now placed in front of the
		function prototype declarations
		(had to move struct linebuffer).
	     -	added a type cast to the compare function argument in the
		two calls to qsort(). This was necessary to get the program
		compiled with strict ANSI compilers like Turbo C++.
[12-Jun-93]   TH Darmstadt, Institut fuer Kernphysik, Chr. Spieler:
	      -	removed a MSDOS specific bug in maketempname(): The suffix
		containing the temp file count is now appended as a file
		extension, to get unique MSDOS names for different temporary
		files.
	      -	Under MSDOS, additionally check the environment variables TEMP
		and TMP (in that order) to get a directory for temporary files.
		If nothing is found, use the current directory as default.
	      -	Under MSDOS, the tempbase template is shortened to 8 chars.
	      -	Added a workaround for the "different" (brain damaged)
		mktemp() function of Borland/Turbo C.
**************************************************************************/

Additional changes introduced into texindex.c:
	      - some unused code has been commented out by enclosing it
		into #if 0 ... #endif constructs.
	      - tried to improve formatting of source text (but did it
		incompatible to GNU coding standard...)
	      - corrected a possible typo bug:
		in function compare_field() a reference to global
		structure keyfields is changed to argument structure
		keyfield (without ``s'').
---- old ------------------------------------------------
	     long length2;
	     long pos2;
	{
!	  if (keyfields->positional)
	    {
	      if (pos1 > pos2)
		return 1;
---- new ------------------------------------------------
	     long length2;
	     long pos2;
	{
!	  if (keyfield->positional)
	    {
	      if (pos1 > pos2)
		return 1;
---------------------------------------------------------

In GNU getopt, I introduced some additional configuration conditionals
for automatic compilation under MSDOS.
As a getaround for the lacking Turbo C(++) alloca(), I included a
patch specific for Turbo C, were alloca() is replaced by a pair of
malloc() and free(). This seems to work...
