diff -cbBwp -N -r texinfo3.6-orig/config.h texinfo3.6/config.h
*** texinfo3.6-orig/config.h	Thu Jan  1 00:00:00 1970
--- texinfo3.6/config.h	Fri Aug 11 15:01:40 1995
***************
*** 0 ****
--- 1 ----
+ #include <config.h>
diff -cbBwp -N -r texinfo3.6-orig/configur.bat texinfo3.6/configur.bat
*** texinfo3.6-orig/configur.bat	Thu Jan  1 00:00:00 1970
--- texinfo3.6/configur.bat	Mon Sep  4 19:46:40 1995
***************
*** 0 ****
--- 1,3 ----
+ @echo off
+ echo Configuring Texinfo for MS-DOS/DJGPP...
+ copy Makefile.djg Makefile > nul
diff -cbBwp -N -r texinfo3.6-orig/emacs/makefile.djg texinfo3.6/emacs/makefile.djg
*** texinfo3.6-orig/emacs/makefile.djg	Thu Jan  1 00:00:00 1970
--- texinfo3.6/emacs/makefile.djg	Mon Sep  4 12:13:06 1995
***************
*** 0 ****
--- 1,59 ----
+ # Makefile for Texinfo/emacs.	-*- Indented-Text -*-
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+ 
+ # This Makefile is for DJGPP v2.x
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ #
+ # Author: Brian J. Fox (bfox@ai.mit.edu)
+ #
+ #### Start of system configuration section. ####
+ 
+ srcdir= .
+ VPATH = $(srcdir)
+ 
+ #### End of system configuration section. ####
+ 
+ ELISP_SRCS = info.el makeinfo.el texinfo.el texnfo-upd.el \
+ 	      texnfo-tex.el texinfmt.el informat.el detexinfo.el
+ ELISP_OBJS = info.elc makeinfo.elc texinfo.elc texnfo-upd.elc \
+ 	      texnfo-tex.elc texinfmt.elc informat.elc detexinfo.elc
+ 
+ .SUFFIXES: .el .elc
+ 
+ .el.elc:
+ 	@echo (setq load-path (cons nil load-path)) > elc.tmp
+ 	$(EMACS) -batch -l elc.tmp -f batch-byte-compile $<
+ 	del elc.tmp
+ 
+ all: $(ELISP_OBJS)
+ sub-all: all
+ 
+ informat.elc: info.elc
+ makeinfo.elc: texinfo.elc
+ texinfmt.elc: texinfo.elc
+ texinfmt.elc: texnfo-upd.elc
+ 
+ Makefile: Makefile.djg
+ 	copy $< $@
+ 
+ realclean distclean: clean
+ 	$(RM) Makefile *.log
+ 
+ clean: FORCE
+ 	$(RM) *.elc
+ 
+ FORCE:
+ 
diff -cbBwp -N -r texinfo3.6-orig/info/dribble.c texinfo3.6/info/dribble.c
*** texinfo3.6-orig/info/dribble.c	Fri Jun 16 13:59:30 1995
--- texinfo3.6/info/dribble.c	Thu Jul 13 18:58:36 1995
*************** open_dribble_file (name)
*** 37,43 ****
--- 37,47 ----
    /* Perhaps close existing dribble file. */
    close_dribble_file ();
  
+ #if defined (__MSDOS__)
+   info_dribble_file = fopen (name, "wb");
+ #else   /* ! __MSDOS__ */
    info_dribble_file = fopen (name, "w");
+ #endif  /* ! __MSDOS__ */
  
  #if defined (HAVE_SETVBUF)
    if (info_dribble_file)
diff -cbBwp -N -r texinfo3.6-orig/info/filesys.c texinfo3.6/info/filesys.c
*** texinfo3.6-orig/info/filesys.c	Fri Jun 16 13:59:40 1995
--- texinfo3.6/info/filesys.c	Sat Aug 12 18:38:32 1995
*************** info_find_fullpath (partial)
*** 121,126 ****
--- 121,141 ----
  	 after all. */
        if (initial_character == '/')
  	temp = info_file_in_path (partial + 1, "/");
+ #if defined (__MSDOS__)
+       /* Must handle the MS-DOS "d:/path" and "d:path" cases.  Sigh.  */
+       else if (partial[1] == ':')
+         {
+           char drive[4];
+           int  driv_idx = 0;
+ 
+           drive[driv_idx++] = initial_character;
+           drive[driv_idx++] = ':';
+           if (partial[2] == '/')
+             drive[driv_idx++] = '/';
+           drive[driv_idx] = '\0';
+           temp = info_file_in_path (partial + driv_idx, drive);
+         }
+ #endif
        else if (initial_character == '~')
  	{
  	  expansion = tilde_expand_word (partial);
*************** info_find_fullpath (partial)
*** 129,134 ****
--- 144,163 ----
  	      temp = info_file_in_path (expansion + 1, "/");
  	      free (expansion);
  	    }
+ #if defined (__MSDOS__)
+           else if (expansion[1] == ':')
+             {
+               char drive[4];
+               int driv_idx = 0;
+ 
+               drive[driv_idx++] = *expansion;
+               drive[driv_idx++] = ':';
+               if (expansion[2] == '/')
+                 drive[driv_idx++] = '/';
+               drive[driv_idx] = '\0';
+               temp = info_file_in_path (expansion + driv_idx, drive);
+             }
+ #endif
  	  else
  	    temp = expansion;
  	}
*************** info_file_in_path (filename, path)
*** 255,260 ****
--- 284,319 ----
  		  if (statable && (S_ISREG (finfo.st_mode)))
  		    return (temp);
  		}
+ #if defined (__MSDOS__)
+ 	      /* Under MS-DOS's 8.3 filename restriction, it is customary
+ 		 to just make "z" or "gz" the last character(s) of the
+                  extension.  Allow any extension which ends with "z" or
+                  "gz" to be handled by GZIP. */
+               temp [pre_compress_suffix_length] = '\0';
+ 
+               {
+                 char *dot = strrchr (temp, '.');
+ 
+                 if (dot)
+                   for (j = 3; j > 1; j--)
+                     {
+                       strcpy (dot + j, "z");
+                       statable = (stat (temp, &finfo) == 0);
+                       if (statable && (S_ISREG (finfo.st_mode)))
+                         return (temp);
+ 
+                       /* Don't try "gz" unless we only leave 1 character
+                          from the original extension.  */
+                       if (j < 3)
+                         {
+                           strcpy (dot + j, "gz");
+                           statable = (stat (temp, &finfo) == 0);
+                           if (statable && (S_ISREG (finfo.st_mode)))
+                             return (temp);
+                         }
+                     }
+               }
+ #endif
  	    }
  	}
        free (temp);
*************** extract_colon_unit (string, idx)
*** 276,282 ****
    if ((i >= strlen (string)) || !string)
      return ((char *) NULL);
  
!   while (string[i] && string[i] != ':')
      i++;
    if (i == start)
      {
--- 335,341 ----
    if ((i >= strlen (string)) || !string)
      return ((char *) NULL);
  
!   while (string[i] && string[i] != PATH_SEPARATOR_CHAR)
      i++;
    if (i == start)
      {
*************** info_add_path (path, where)
*** 387,400 ****
      strcpy (infopath, path);
    else if (where == INFOPATH_APPEND)
      {
!       strcat (infopath, ":");
        strcat (infopath, path);
      }
    else if (where == INFOPATH_PREPEND)
      {
        char *temp = strdup (infopath);
        strcpy (infopath, path);
!       strcat (infopath, ":");
        strcat (infopath, temp);
        free (temp);
      }
--- 446,459 ----
      strcpy (infopath, path);
    else if (where == INFOPATH_APPEND)
      {
!       strcat (infopath, PATH_SEPARATOR_STR);
        strcat (infopath, path);
      }
    else if (where == INFOPATH_PREPEND)
      {
        char *temp = strdup (infopath);
        strcpy (infopath, path);
!       strcat (infopath, PATH_SEPARATOR_STR);
        strcat (infopath, temp);
        free (temp);
      }
*************** filesys_read_info_file (pathname, filesi
*** 444,450 ****
--- 503,513 ----
        /* Try to read the contents of this file. */
        st_size = (long) finfo->st_size;
        contents = (char *)xmalloc (1 + st_size);
+ #ifdef __MSDOS__
+       if ((finfo->st_size = read (descriptor, contents, finfo->st_size)) < 0)
+ #else
        if ((read (descriptor, contents, st_size)) != st_size)
+ #endif
  	{
  	  filesys_error_number = errno;
  	  close (descriptor);
*************** filesys_read_info_file (pathname, filesi
*** 454,460 ****
  
        close (descriptor);
  
!       *filesize = st_size;
        return (contents);
      }
  }
--- 517,523 ----
  
        close (descriptor);
  
!       *filesize = finfo->st_size;
        return (contents);
      }
  }
*************** filesys_decompressor_for_file (filename)
*** 582,587 ****
--- 645,657 ----
    for (i = 0; compress_suffixes[i].suffix; i++)
      if (strcmp (extension, compress_suffixes[i].suffix) == 0)
        return (compress_suffixes[i].decompressor);
+ 
+ #if defined (__MSDOS__)
+   /* Allow any extension which ends with `z' to be decompressed by
+      GUNZip.  */
+   if (extension[strlen (extension) - 1] == 'z')
+     return "gunzip";
+ #endif
  
    return ((char *)NULL);
  }
diff -cbBwp -N -r texinfo3.6-orig/info/general.h texinfo3.6/info/general.h
*** texinfo3.6-orig/info/general.h	Fri Jun 16 14:01:50 1995
--- texinfo3.6/info/general.h	Thu Jul 13 19:20:38 1995
*************** typedef char *CFunction ();
*** 90,94 ****
--- 90,102 ----
  	  place[zi] = 0;		\
        } while (0)
  #endif /* !zero_mem */
+   
+ #ifdef  __MSDOS__
+ #define PATH_SEPARATOR_CHAR ';'
+ #define PATH_SEPARATOR_STR ";"
+ #else   /* ! __MSDOS__ */
+ #define PATH_SEPARATOR_CHAR ':'
+ #define PATH_SEPARATOR_STR ":"
+ #endif  /* __MSDOS__ */
  
  #endif /* !_GENERAL_H_ */
diff -cbBwp -N -r texinfo3.6-orig/info/info-uti.c texinfo3.6/info/info-uti.c
*** texinfo3.6-orig/info/info-uti.c	Fri Jun 16 13:59:58 1995
--- texinfo3.6/info/info-uti.c	Fri Aug 11 18:51:12 1995
***************
*** 36,42 ****
--- 36,46 ----
  
  /* When non-zero, various display and input functions handle ISO Latin
     character sets correctly. */
+ #if defined (__DJGPP__)
+ int ISO_Latin_p = 1;
+ #else   /* ! __DJGPP__ */
  int ISO_Latin_p = 0;
+ #endif  /* __DJGPP__ */
  
  /* Variable which holds the most recent filename parsed as a result of
     calling info_parse_xxx (). */
*************** filename_non_directory (pathname)
*** 617,622 ****
--- 621,631 ----
  
    if (filename)
      filename++;
+ #if defined (__MSDOS__)
+   /* Handle cases of "d:filename"  */
+   else if (pathname[1] == ':')
+     filename = pathname + 2;
+ #endif
    else
      filename = pathname;
  
diff -cbBwp -N -r texinfo3.6-orig/info/makedoc.c texinfo3.6/info/makedoc.c
*** texinfo3.6-orig/info/makedoc.c	Fri Jun 16 14:00:26 1995
--- texinfo3.6/info/makedoc.c	Thu Jul 13 19:48:58 1995
*************** main (argc, argv)
*** 120,127 ****
--- 120,132 ----
  
    if (tags_only)
      {
+ #if defined (__MSDOS__)
+       funs_filename = "nul";
+       doc_filename = "nul";
+ #else   /* ! __MSDOS__ */
        funs_filename = "/dev/null";
        doc_filename = "/dev/null";
+ #endif  /* __MSDOS__ */
      }
    
    funs_stream = must_fopen (funs_filename, "w");
*************** process_one_file (filename, doc_stream, 
*** 276,281 ****
--- 281,289 ----
  
    file_size = (long) finfo.st_size;
    buffer = (char *)xmalloc (1 + file_size);
+ #if defined (__MSDOS__)
+   file_size = finfo.st_size =
+ #endif
    read (descriptor, buffer, file_size);
    close (descriptor);
  
diff -cbBwp -N -r texinfo3.6-orig/info/makefile.djg texinfo3.6/info/makefile.djg
*** texinfo3.6-orig/info/makefile.djg	Thu Jan  1 00:00:00 1970
--- texinfo3.6/info/makefile.djg	Mon Sep  4 16:41:44 1995
***************
*** 0 ****
--- 1,195 ----
+ # Makefile for texinfo/info.	-*- Indented-Text -*-
+ # Copyright (C) 1993 Free Software Foundation, Inc.
+ 
+ # This Makefile is for DJGPP v2.x
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ 
+ #### Start of system configuration section. ####
+ 
+ srcdir = .
+ common = ../libtxi
+ util   = ../util
+ 
+ VPATH  = $(srcdir);$(common)
+ 
+ LDEFS = -DHANDLE_MAN_PAGES -DNAMED_FUNCTIONS=1 -DDEFAULT_INFOPATH='"$(DEFAULT_INFOPATH)"'
+ 
+ 
+ #### End of system configuration section. ####
+ 
+ SRCS =	dir.c		display.c	echo_area.c	filesys.c \
+ 	info-utils.c	info.c		infodoc.c	infomap.c \
+ 	m-x.c		nodes.c		search.c	session.c \
+ 	signals.c	terminal.c	tilde.c		window.c \
+ 	xmalloc.c	indices.c	makedoc.c	nodemenu.c \
+ 	footnotes.c	dribble.c	variables.c	gc.c man.c \
+ 	clib.c		pc_term.c
+ 
+ HDRS =	display.h	doc.h		echo_area.h	filesys.h \
+ 	general.h	getopt.h	info-utils.h	info.h \
+ 	infomap.h	nodes.h		search.h 	session.h \
+ 	signals.h	termdep.h	terminal.h	tilde.h \
+ 	indices.h	window.h	footnotes.h	dribble.h \
+ 	variables.h	gc.h		clib.h		pc_term.h
+ 
+ OBJS =	dir.o display.o doc.o echo_area.o filesys.o info-utils.o info.o \
+ 	infodoc.o infomap.o m-x.o nodes.o search.o session.o signals.o \
+ 	terminal.o tilde.o window.o indices.o xmalloc.o nodemenu.o \
+ 	footnotes.o dribble.o variables.o gc.o man.o clib.o pc_term.o
+ 
+ # The names of files which declare info commands.
+ CMDFILES = $(srcdir)/session.c $(srcdir)/echo_area.c $(srcdir)/infodoc.c \
+ 	   $(srcdir)/m-x.c $(srcdir)/indices.c $(srcdir)/nodemenu.c \
+ 	   $(srcdir)/footnotes.c $(srcdir)/variables.c
+ 
+ # The name of the program which builds documentation structure from CMDFILES.
+ MAKEDOC_OBJECTS = makedoc.o clib.o xmalloc.o
+ MAKEDOC_SOURCE = makedoc.c clib.c xmalloc.c
+ 
+ .c.o:
+ 	$(CC) -c $(CPPFLAGS) $(LDEFS) $(DEFS) -I. -I$(srcdir) -I$(common) $(CFLAGS) $<
+ 
+ all: info info.info info-stnd.info
+ sub-all: all
+ 
+ info: $(OBJS) ../libtxi/libtxi.a
+ 	$(CC) $(LDFLAGS) -o info $(OBJS) $(LOADLIBES)
+ 
+ all-info: info.info info-stnd.info
+ 
+ info.info: info.texi
+ 	$(MAKEINFO) --no-split -I$(srcdir) info.texi
+ 
+ info-stnd.info: info-stnd.texi
+ 	$(MAKEINFO) --no-split -I$(srcdir) info-stnd.texi
+ 
+ all-dvi: info.dvi info-stnd.dvi
+ info.dvi: info.texi
+ 	$(TEX) info.texi
+ 	$(TEXINDEX) info.??
+ 	$(TEX) info.texi
+ 
+ info-stnd.dvi: info-stnd.texi
+ 	$(TEX) info-stnd.texi
+ 	$(TEXINDEX) info-stnd.??
+ 	$(TEX) info-stnd.texi
+ 
+ makedoc.exe: $(MAKEDOC_OBJECTS) ../libtxi/libtxi.a
+ 	$(CC) $(LDFLAGS) -o makedoc $(MAKEDOC_OBJECTS) $(LOADLIBES)
+ 
+ Makefile: Makefile.djg
+ 	copy $< $@
+ 
+ clean:
+ 	$(RM) info info.exe funs.h doc.c makedoc makedoc.exe *.o
+ 
+ distclean: clean texclean
+ 	$(RM) Makefile *~
+ 	$(RM) *.BAK makedoc-TAGS TAGS
+ 
+ mostlyclean: clean
+ 
+ realclean: distclean
+ 	$(RM) info.info info-stnd.info
+ 
+ TAGS: $(SRCS) makedoc-TAGS
+ 	etags $(SRCS)
+ 	cat makedoc-TAGS >>TAGS
+ 	$(RM) makedoc-TAGS
+ 
+ makedoc-TAGS: $(CMDFILES)
+ 	./makedoc -tags $(CMDFILES) >makedoc-TAGS
+ 
+ texclean:
+ 	$(RM) *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky *.cps
+ 	$(RM) *.tps *.fns *.kys *.pgs *.vrs
+ 
+ check: info
+ 
+ # The files `doc.c' and `funs.h' are created by ./makedoc run over the source
+ # files which contain DECLARE_INFO_COMMAND.  `funs.h' is a header file
+ # listing the functions found.  `doc.c' is a structure containing pointers
+ # to those functions along with completable names and documentation strings.
+ funs.h: makedoc.exe $(CMDFILES)
+ 	@echo @echo off > mkdoc.bat
+ 	@echo if exist old-funs.h del old-funs.h >> mkdoc.bat
+ 	@echo if exist funs.h ren funs.h old-funs.h >> mkdoc.bat
+ 	@echo if exist old-doc.c del old-doc.c >> mkdoc.bat
+ 	@echo if exist doc.c ren doc.c old-doc.c >> mkdoc.bat
+ 	-@mkdoc
+ 	makedoc $(CMDFILES)
+ 	@echo @echo off > mkdoc.bat
+ 	@echo cmp -s old-funs.h funs.h >> mkdoc.bat
+ 	@echo if not errorlevel 1 del funs.h >> mkdoc.bat
+ 	@echo if not errorlevel 1 ren old-funs.h funs.h >> mkdoc.bat
+ 	@echo if errorlevel 1 del old-funs.h >> mkdoc.bat
+ 	@echo cmp -s old-doc.c doc.c >> mkdoc.bat
+ 	@echo if not errorlevel 1 del doc.c >> mkdoc.bat
+ 	@echo if not errorlevel 1 ren old-doc.c doc.c >> mkdoc.bat
+ 	@echo if errorlevel 1 del old-doc.c >> mkdoc.bat
+ 	-@mkdoc
+ 	del mkdoc.bat
+ 
+ doc.c: 		funs.h
+ dribble.o:	dribble.c dribble.h
+ display.o:	display.c
+ echo_area.o:	echo_area.c
+ filesys.o:	filesys.c
+ info-utils.o:	info-utils.c
+ info.o:		info.c filesys.h
+ infodoc.o:	infodoc.c
+ infomap.o:	infomap.c
+ m-x.o:		m-x.c
+ nodes.o:	nodes.c
+ search.o:	search.c
+ session.o:	session.c pc_getc.c
+ signals.o:	signals.c
+ terminal.o:	terminal.c
+ tilde.o:	tilde.c
+ window.o:	window.c
+ xmalloc.o:	xmalloc.c
+ indices.o:	indices.c
+ makedoc.o:	makedoc.c
+ 
+ dir.o: 		dir.c
+ display.o: 	nodes.h info-utils.h search.h
+ display.o: 	terminal.h window.h display.h
+ echo_area.o: 	info.h
+ filesys.o: 	general.h tilde.h filesys.h
+ footnotes.o: 	footnotes.h
+ info-utils.o: 	info-utils.h nodes.h search.h
+ info.o: 	info.h $(common)/getopt.h
+ infodoc.o: 	info.h doc.h
+ infomap.o: 	infomap.h funs.h
+ gc.o:		info.h
+ m-x.o: 		info.h
+ nodes.o: 	search.h filesys.h
+ nodes.o: 	nodes.h info-utils.h
+ search.o: 	general.h search.h nodes.h
+ session.o: 	info.h
+ signals.o: 	info.h signals.h
+ terminal.o: 	terminal.h termdep.h
+ tilde.o: 	tilde.h
+ variables.c: 	variables.h
+ window.o: 	nodes.h window.h display.h
+ window.o: 	info-utils.h search.h infomap.h
+ 
+ pc_term.o:	pc_term.c pc_term.h
+ 
+ # Prevent GNU make v3 from overflowing arg limit on SysV.
+ .NOEXPORT:
+ 
+ # eof
diff -cbBwp -N -r texinfo3.6-orig/info/man.c texinfo3.6/info/man.c
*** texinfo3.6-orig/info/man.c	Fri Jun 16 14:00:30 1995
--- texinfo3.6/info/man.c	Mon Sep  4 19:34:56 1995
***************
*** 22,28 ****
--- 22,33 ----
     Written by Brian Fox Thu May  4 09:17:52 1995 (bfox@ai.mit.edu). */
  
  #include "info.h"
+ #if defined(__DJGPP__)
+ #include <process.h>
+ #include "info-utils.h"
+ #else
  #include <sys/ioctl.h>
+ #endif
  #include <sys/file.h>
  #include "signals.h"
  #if defined (HAVE_SYS_TIME_H)
*************** executable_file_in_path (filename, path)
*** 176,182 ****
--- 181,192 ----
  static char *
  find_man_formatter ()
  {
+ #if defined (__MSDOS__)
+   /* We'll let spawnvp() find it (so it can be .com, .bat or .exe).  */
+   return "man";
+ #else
    return (executable_file_in_path ("man", (char *)getenv ("PATH")));
+ #endif
  }
  
  static char *manpage_pagename = (char *)NULL;
*************** get_manpage_contents (pagename)
*** 236,241 ****
--- 246,256 ----
    char *section = (char *)NULL;
    int arg_index = 1;
  
+ #if defined(__MSDOS__)
+   char *formatter_output;
+   int   formatter_status;
+ #endif
+ 
    if (formatter_args[0] == (char *)NULL)
      formatter_args[0] = find_man_formatter ();
  
*************** get_manpage_contents (pagename)
*** 253,258 ****
--- 268,313 ----
    /* Open a pipe to this program, read the output, and save it away
       in FORMATTED_PAGE.  The reader end of the pipe is pipes[0]; the
       writer end is pipes[1]. */
+ #if defined(__MSDOS__)
+ 
+   /* Set up the pipe. */
+   pipes[1] = dup (fileno (stdout)); /* save old stdout handle */
+   if (pipes[1] == -1)
+     return ((char *)0);
+   formatter_output = tmpnam ((char *)0);
+   if (formatter_output == (char *)0)
+     return ((char *)0);
+   pipes[0] = open (formatter_output, O_RDWR | O_CREAT | O_EXCL, 0666);
+   if (pipes[0] == -1)
+     return ((char *)0);
+   if (dup2 (pipes[0], 1) == -1)     /* redirect formatter stdout */
+     {
+       close (pipes[0]);
+       remove (formatter_output);
+       return ((char *)0);
+     }
+ 
+   /* Spawn the formatter. */
+   if ((formatter_status =
+        spawnvp (P_WAIT, formatter_args[0], formatter_args)) == -1)
+     {
+       close (pipes[0]);
+       remove (formatter_output);
+       dup2 (pipes[1], 1);   /* somebody might use stdout in atexit() etc. */
+       exit (0);
+     }
+ 
+   /* Read from the pipe.  */
+   lseek (pipes[0], 0, SEEK_SET);
+   formatted_page = read_from_fd (pipes[0]);
+ 
+   /* Restore stdout.  */
+   close (pipes[0]);
+   remove (formatter_output);
+   dup2 (pipes[1], 1);
+ 
+ #else   /* !__MSDOS__ */
+ 
    pipe (pipes);
  
    signal (SIGCHLD, reap_children);
*************** get_manpage_contents (pagename)
*** 286,291 ****
--- 341,347 ----
        close (pipes[1]);
        exit (0);
      }
+ #endif  /* __MSDOS__ */
  
    /* If we have the page, then clean it up. */
    if (formatted_page)
*************** clean_manpage (manpage)
*** 319,324 ****
--- 375,384 ----
  
        if (manpage[i] == '\b')
  	j -= 2;
+ #if defined (__DJGPP__)
+       if (manpage[i] == INFO_FF)
+         j--;
+ #endif
      }
  
    newpage[j++] = '\0';
*************** read_from_fd (fd)
*** 371,377 ****
    int bsize = 0;
    int bindex = 0;
    int select_result;
! #if defined (FD_SET)
    fd_set read_fds;
  
    timeout.tv_sec = 15;
--- 431,437 ----
    int bsize = 0;
    int bindex = 0;
    int select_result;
! #if defined (FD_SET) /* && !defined (__DJGPP__) */
    fd_set read_fds;
  
    timeout.tv_sec = 15;
diff -cbBwp -N -r texinfo3.6-orig/info/nodes.c texinfo3.6/info/nodes.c
*** texinfo3.6-orig/info/nodes.c	Fri Jun 16 14:00:40 1995
--- texinfo3.6/info/nodes.c	Fri Aug 11 19:21:44 1995
*************** info_find_file_internal (filename, get_t
*** 267,272 ****
--- 267,275 ----
  	if ((strcmp (filename, file_buffer->filename) == 0) ||
  	    (strcmp (filename, file_buffer->fullpath) == 0) ||
  	    ((*filename != '/') &&
+ #if defined (__MSDOS__)
+              (filename[1] != ':') &&
+ #endif
  	     strcmp (filename,
  		     filename_non_directory (file_buffer->fullpath)) == 0))
  	  {
*************** info_find_file_internal (filename, get_t
*** 294,301 ****
--- 297,310 ----
  
  	    old_info = &file_buffer->finfo;
  
+ #if defined (__MSDOS__)
+             /* Under MS-DOS, we might have changed old_info->st_size
+                to reflect the file size after weeding out CR characters. */
+ 	    if (new_info.st_mtime != old_info->st_mtime)
+ #else
  	    if ((new_info.st_size != old_info->st_size) ||
  		(new_info.st_mtime != old_info->st_mtime))
+ #endif
  	      {
  		/* The file has changed.  Forget that we ever had loaded it
  		   in the first place. */
*************** info_load_file_internal (filename, get_t
*** 369,374 ****
--- 378,388 ----
  
        if (basename)
  	basename++;
+ #if defined (__MSDOS__)
+       /* Handle cases of "d:filename"  */
+       else if (lowered_name[1] == ':')
+         basename = lowered_name + 2;
+ #endif
        else
  	basename = lowered_name;
  
diff -cbBwp -N -r texinfo3.6-orig/info/pc_getc.c texinfo3.6/info/pc_getc.c
*** texinfo3.6-orig/info/pc_getc.c	Thu Jan  1 00:00:00 1970
--- texinfo3.6/info/pc_getc.c	Fri Sep  1 17:55:28 1995
***************
*** 0 ****
--- 1,63 ----
+ /*
+  * A code fragment to allow using PC-specific keys.  It's here on a
+  * separate file to minimize clutter of the original source files.
+  */
+       if (info_input_stream == stdin) {
+         char i;
+         static struct
+         {
+           int inkey;
+           unsigned char outkey1, outkey2;
+         } DJGPP_keytab[] = {
+           K_Control_PageDown,  'n', 0,  /*these are for moving between nodes*/
+           K_Control_PageUp,    'p', 0,
+           K_Control_Up,        'u', 0,
+           K_Control_Down,      'm', 0,
+           K_Control_Center,    'l', 0,
+ 
+           K_Home,      K_Control_A, 0, /* .. and these for moving IN a node */
+           K_End,       K_Control_E, 0, /* they're Numeric-Keypad-Keys, so */
+           K_Left,      K_Control_B, 0, /* NUMLOCK should be off !! */
+           K_Right,     K_Control_F, 0,
+           K_Down,      K_Control_N, 0,
+           K_Up,        K_Control_P, 0,
+           K_PageDown,  SPC, 0,
+           K_PageUp,    K_Control_Backspace, 0,
+           K_Control_Left,  ESC, 'b',
+           K_Control_Right, ESC, 'f',
+           K_Control_Home,  'B', 0,
+           K_Control_End,   'E', 0,
+ 
+           K_EHome,      K_Control_A, 0, /* also for moving IN a node */
+           K_EEnd,       K_Control_E, 0, /* they're the 'extended' keys */
+           K_ELeft,      K_Control_B, 0,
+           K_ERight,     K_Control_F, 0,
+           K_EDown,      K_Control_N, 0,
+           K_EUp,        K_Control_P, 0,
+           K_EPageDown,  SPC, 0,
+           K_EPageUp,    K_Control_Backspace, 0,
+           K_Control_ELeft,  ESC, 'b',
+           K_Control_ERight, ESC, 'f',
+           K_Control_EHome,  'B', 0,
+           K_Control_EEnd,   'E', 0,
+ 
+           K_BackTab, ESC, TAB,
+           K_Alt_X, ESC, 'X', /* the most/only important M-???-key */
+           K_F1, K_Control_H, 0, /* YEAH, gimme that goodold F-one-thing */
+           K_Delete, K_Control_Backspace, 0, /* to make Delete be DEL (0x7f) */
+           0, 0, 0
+         };
+ 
+         do {
+           rawkey=getxkey();
+           if (rawkey & 0x300) {
+             for (i = 0; DJGPP_keytab[i].inkey; i++) {
+               if (rawkey == DJGPP_keytab[i].inkey) {
+                 rawkey = DJGPP_keytab[i].outkey1;
+                 pending_input_character = DJGPP_keytab[i].outkey2;
+                 break;
+               }
+             }
+           }
+         } while (rawkey & 0x300);
+       } else
diff -cbBwp -N -r texinfo3.6-orig/info/pc_term.c texinfo3.6/info/pc_term.c
*** texinfo3.6-orig/info/pc_term.c	Thu Jan  1 00:00:00 1970
--- texinfo3.6/info/pc_term.c	Mon Sep  4 16:55:28 1995
***************
*** 0 ****
--- 1,260 ----
+ /* pc_term.c */
+ 
+ /* This file is part of the MSDOS-DJGPP-port of the GNU standalone
+    Info-reader
+ 
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2, or (at your option)
+    any later version.
+ 
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+ 
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ 
+  */
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <limits.h>
+ #include <pc.h>
+ #include <conio.h>
+ #include "pc_term.h"
+ #include "terminal.h"
+ #include "termdep.h"
+ 
+ #define max(x,y) ((x)>(y) ? (x) : (y))
+ #define min(x,y) ((x)<(y) ? (x) : (y))
+ #define keywait  do {char dummy=0;\
+                      fflush(stdout);\
+                      while (!kbhit()) ;\
+                      dummy=getkey();\
+                  } while (0);
+ 
+ static struct text_info pc_info;    /* struct to hold the conio-status */
+ static struct text_info norm_info;  /* holds screen params outside Info */
+ void _set_screen_lines(int);
+ static unsigned char    norm_attr, inv_attr;
+ 
+ /* Put the screen in the video mode and colors which Info will use.  */
+ void pc_prep_terminal()
+ {
+   textattr(norm_attr);
+ 
+   /* Do not set screen height if we already have it, because
+      doing so erases the screen.  */
+   if (screenheight != ScreenRows())
+     _set_screen_lines(screenheight);
+ }
+ 
+ void pc_unprep_terminal()
+ {
+   /* Do not set screen height if we already have it, because
+      doing so erases the screen.  */
+   if (norm_info.screenheight != ScreenRows())
+     _set_screen_lines(norm_info.screenheight);
+   textmode(LASTMODE);
+   textattr(norm_info.normattr);
+   ScreenClear(); /* to leave behind a clean screen */
+ }
+ 
+ void pc_begin_inverse()
+ {
+   textattr(inv_attr);
+ }
+ 
+ void pc_end_inverse()
+ {
+   textattr(norm_attr);
+ }
+ 
+ void pc_up_line()
+ {
+   int x, y;
+   ScreenGetCursor(&y, &x);
+   ScreenSetCursor(max(y-1, 0), x);
+ }
+ 
+ void pc_down_line()
+ {
+   int x, y;
+   ScreenGetCursor(&y, &x);
+   ScreenSetCursor(min(screenheight-1, y+1), x);
+ }
+ 
+ void pc_clear_screen()
+ {
+   ScreenClear();
+ }
+ 
+ void pc_clear_to_eol()
+ {
+   clreol(); /* perhaps to be replaced by a loop */
+ }
+ 
+ void pc_get_screen_size()
+ {
+   screenwidth  = ScreenCols();
+   screenheight = ScreenRows();
+ }
+ 
+ void pc_goto_xy(x, y)
+ int x, y;
+ {
+   ScreenSetCursor(y, x); /* yes, pc.h says ...(row, column) !! */
+ }
+ 
+ void pc_initialize_terminal(term_name)
+     char *term_name;
+ {
+   char *info_colors;
+ 
+   /* Get current video information, to be restored later.  */
+   if (norm_info.screenwidth == 0)
+     {
+       gppconio_init();
+       gettextinfo(&norm_info);
+     }
+ 
+   /* Current screen dimensions and colors are the default.  */
+   screenwidth  = norm_info.screenwidth;
+   screenheight = norm_info.screenheight;
+   norm_attr    = norm_info.normattr;
+   inv_attr     = (((norm_info.normattr &    7) << 4) |
+                   ((norm_info.normattr & 0x7f) >> 4));
+ 
+   /* Environment variables "LINES" overrides the default.  */
+   if (getenv("LINES") != NULL)
+     screenheight = atoi(getenv("LINES"));
+ 
+   /* Environment variable "INFO_LINES" overrides "LINES".  */
+   if (getenv("INFO_LINES") != NULL)
+       screenheight = atoi(getenv("INFO_LINES"));
+ 
+   if (screenheight != norm_info.screenheight)
+     {
+       _set_screen_lines(screenheight);
+       screenwidth  = ScreenCols();
+       screenheight = ScreenRows();
+     }
+ 
+   /* Does the user want non-default colors?  */
+   info_colors = getenv("INFO_COLORS");
+   if (info_colors != (char *)0)
+     {
+       char *next;
+       unsigned long coldesc = strtoul(info_colors, &next, 0);
+ 
+       if (next == info_colors || coldesc > UCHAR_MAX)
+         info_colors = (char *)0;
+       else
+         {
+           char *endp;
+           norm_attr = (unsigned char)coldesc;
+           coldesc = strtoul(next + 1, &endp, 0);
+           if (endp == next + 1 || coldesc > UCHAR_MAX)
+             info_colors = (char *)0;
+           else
+             inv_attr = (unsigned char)coldesc;
+         }
+     }
+ 
+   /* Try setting the colors user asked for.  */
+   textattr(norm_attr);
+   ScreenClear();
+ 
+   /* We know how to produce a visible bell.  */
+   terminal_has_visible_bell_p = 1;
+ 
+   /* Set all the hooks to our PC-specific functions.  */
+   terminal_begin_inverse_hook       = pc_begin_inverse;
+   terminal_end_inverse_hook         = pc_end_inverse;
+   terminal_prep_terminal_hook       = pc_prep_terminal;
+   terminal_unprep_terminal_hook     = pc_unprep_terminal;
+   terminal_up_line_hook             = pc_up_line;
+   terminal_down_line_hook           = pc_down_line;
+   terminal_clear_screen_hook        = pc_clear_screen;
+   terminal_clear_to_eol_hook        = pc_clear_to_eol;
+   terminal_get_screen_size_hook     = pc_get_screen_size;
+   terminal_goto_xy_hook             = pc_goto_xy;
+   terminal_new_terminal_hook        = pc_new_terminal;
+   terminal_put_text_hook            = pc_put_text;
+   terminal_ring_bell_hook           = pc_ring_bell;
+   terminal_write_chars_hook         = pc_write_chars;
+   terminal_scroll_terminal_hook     = pc_scroll_terminal;
+ }
+ 
+ void pc_new_terminal(term_name)
+     char *term_name;
+ {
+   pc_initialize_terminal(term_name);
+ }
+ 
+ void pc_put_text(string)
+ char *string;
+ {
+   cputs(string);
+ }
+ 
+ void pc_ring_bell()
+ {
+   if (terminal_has_visible_bell_p && terminal_use_visible_bell_p)
+     ScreenVisualBell();
+   else
+     printf("%c",'\a');
+ }
+ 
+ void pc_write_chars(string, nchars)
+     char *string;
+     int nchars;
+ {
+   cprintf("%.*s",nchars, string);
+ }
+ 
+ void pc_scroll_terminal(start, end, amount)
+     int start, end, amount;
+ {
+   movetext(pc_info.winleft, start, pc_info.winright, end,
+            pc_info.winleft, start+amount);
+ }
+ 
+ int       tputs(char *a, int b, int (*c)())
+ {
+   perror("tputs");
+ }
+ 
+ char*     tgoto(char*a, int b, int c)
+ {
+   perror("tgoto");
+ }
+ 
+ int       tgetnum(char*a)
+ {
+   perror("tgetnum");
+ }
+ 
+ int       tgetflag(char*a)
+ {
+   perror("tgetflag");
+ }
+ 
+ char*     tgetstr(char *a, char **b)
+ {
+   perror("tgetstr");
+ }
+ 
+ int       tgetent(char*a, char*b)
+ {
+   perror("tgetent");
+ }
+ 
+ int       sigblock(int a)
+ {
+   return 0;
+ }
+ 
diff -cbBwp -N -r texinfo3.6-orig/info/pc_term.h texinfo3.6/info/pc_term.h
*** texinfo3.6-orig/info/pc_term.h	Thu Jan  1 00:00:00 1970
--- texinfo3.6/info/pc_term.h	Sun Feb 26 17:09:52 1995
***************
*** 0 ****
--- 1,43 ----
+ /* pc_term.h */
+ 
+ /* This file is part of the MSDOS-DJGPP-port of the GNU standalone
+    Info-reader
+ 
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2, or (at your option)
+    any later version.
+ 
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+ 
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ 
+ */
+ 
+ #ifndef PC_TERM_H
+ #define PC_TERM_H
+ 
+ void pc_begin_inverse();
+ void pc_end_inverse();
+ void pc_prep_terminal();
+ void pc_unprep_terminal();
+ void pc_up_line();
+ void pc_down_line();
+ void pc_clear_screen();
+ void pc_clear_to_eol();
+ void pc_get_screen_size();
+ void pc_goto_xy();
+ void pc_initialize_terminal();
+ void pc_new_terminal();
+ void pc_put_text();
+ void pc_ring_bell();
+ void pc_write_chars();
+ void pc_scroll_terminal();
+ 
+ #endif /* PC_TERM_H */
+  
diff -cbBwp -N -r texinfo3.6-orig/info/session.c texinfo3.6/info/session.c
*** texinfo3.6-orig/info/session.c	Fri Jun 16 14:00:52 1995
--- texinfo3.6/info/session.c	Mon Sep  4 15:21:40 1995
***************
*** 22,31 ****
--- 22,37 ----
     Written by Brian Fox (bfox@ai.mit.edu). */
  
  #include "info.h"
+ #if defined (__DJGPP__)
+ #include <pc.h>     /* to allow read of single keys by getkey */
+ #include <keys.h>   /* the definitions of the special characters */
+ #endif  /* __DJGPP__ */
  #if defined (HAVE_SYS_FILE_H)
  #include <sys/file.h>
  #endif /* HAVE_SYS_FILE_H */
+ #if !defined(__DJGPP__)
  #include <sys/ioctl.h>
+ #endif
  #include <fcntl.h>
  
  #if defined (HAVE_SYS_TIME_H)
*************** info_get_input_char ()
*** 4234,4239 ****
--- 4240,4248 ----
      {
        int rawkey;
  
+ #if defined (__DJGPP__)
+ #include "pc_getc.c"
+ #endif /* __DJGPP__ */
        rawkey = getc (info_input_stream);
        keystroke = rawkey;
  
diff -cbBwp -N -r texinfo3.6-orig/info/termdep.h texinfo3.6/info/termdep.h
*** texinfo3.6-orig/info/termdep.h	Fri Jun 16 14:02:28 1995
--- texinfo3.6/info/termdep.h	Thu Jul 20 18:18:40 1995
***************
*** 46,52 ****
--- 46,56 ----
  #  if defined (HAVE_SYS_FILE_H)
  #    include <sys/file.h>
  #  endif /* HAVE_SYS_FILE_H */
+ #  ifdef   __DJGPP__
+ #    include <termios.h>
+ #  else    /* not __DJGPP__ */
  #    include <sgtty.h>
+ #  endif    /* __DJGPP__ */
  #  include <strings.h>
  #endif /* !HAVE_TERMIO_H */
  
diff -cbBwp -N -r texinfo3.6-orig/info/terminal.c texinfo3.6/info/terminal.c
*** texinfo3.6-orig/info/terminal.c	Fri Jun 16 14:01:00 1995
--- texinfo3.6/info/terminal.c	Thu Jul 20 18:23:30 1995
*************** VFunction *terminal_clear_screen_hook = 
*** 53,59 ****
--- 53,66 ----
  VFunction *terminal_clear_to_eol_hook = (VFunction *)NULL;
  VFunction *terminal_get_screen_size_hook = (VFunction *)NULL;
  VFunction *terminal_goto_xy_hook = (VFunction *)NULL;
+ #ifdef  __DJGPP__
+ /* This is the only hook which needs to be set here.  All the others
+    are set by this initialization hook.  */
+ void pc_initialize_terminal(char *);
+ VFunction *terminal_initialize_terminal_hook = pc_initialize_terminal;
+ #else   /* not __DJGPP__ */
  VFunction *terminal_initialize_terminal_hook = (VFunction *)NULL;
+ #endif  /* __DJGPP__ */
  VFunction *terminal_new_terminal_hook = (VFunction *)NULL;
  VFunction *terminal_put_text_hook = (VFunction *)NULL;
  VFunction *terminal_ring_bell_hook = (VFunction *)NULL;
*************** struct ltchars original_ltchars;
*** 599,608 ****
--- 606,617 ----
  /* A buffer containing the terminal mode flags upon entry to info. */
  struct termio original_termio, ttybuff;
  #else /* !HAVE_TERMIO_H */
+ #ifndef __MSDOS__
  /* Buffers containing the terminal mode flags upon entry to info. */
  int original_tty_flags = 0;
  int original_lmode;
  struct sgttyb ttybuff;
+ #endif  /* __MSDOS__ */
  #endif /* !HAVE_TERMIO_H */
  
  /* Prepare to start using the terminal to read characters singly. */
*************** terminal_prep_terminal ()
*** 639,644 ****
--- 648,655 ----
  
  #else /* !HAVE_TERMIO_H */
  
+ #if !defined(__MSDOS__)
+ 
    ioctl (tty, TIOCGETP, &ttybuff);
  
    if (!original_tty_flags)
*************** terminal_prep_terminal ()
*** 702,707 ****
--- 713,719 ----
    ttybuff.sg_flags &= ~ECHO;
    ttybuff.sg_flags |= CBREAK;
    ioctl (tty, TIOCSETN, &ttybuff);
+ #endif  /* !__MSDOS__ */
  #endif /* !HAVE_TERMIO_H */
  }
  
*************** terminal_unprep_terminal ()
*** 723,728 ****
--- 735,741 ----
  #if defined (HAVE_TERMIO_H)
    ioctl (tty, TCSETA, &original_termio);
  #else /* !HAVE_TERMIO_H */
+ #if !defined (__MSDOS__)
    ioctl (tty, TIOCGETP, &ttybuff);
    ttybuff.sg_flags = original_tty_flags;
    ioctl (tty, TIOCSETN, &ttybuff);
*************** terminal_unprep_terminal ()
*** 739,744 ****
--- 752,758 ----
    ioctl (tty, TIOCLSET, &original_lmode);
  #endif /* TIOCLGET && LPASS8 */
  
+ #endif  /* !__MSDOS__ */
  #endif /* !HAVE_TERMIO_H */
    terminal_end_using_terminal ();
  }
*** texinfo3.6-orig/libtxi/makefile.djg	Thu Jan  1 00:00:00 1970
--- texinfo3.6/libtxi/makefile.djg	Mon Sep  4 12:13:06 1995
***************
*** 0 ****
--- 1,80 ----
+ # Makefile for GNU texinfo/libtxi.  -*- Indented-Text -*-
+ # Copyright (C) 1993 Free Software Foundation, Inc.
+ 
+ # This Makefile is for DJGPP v2.x
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ 
+ #### Start of system configuration section. ####
+ 
+ srcdir = .
+ VPATH = $(srcdir)
+ 
+ RANLIB  = ranlib
+ 
+ DEFS =
+ LIBS =
+ LOADLIBES = $(LIBS)
+ 
+ # Inherited from parent make.
+ #ALLOCA =
+ 
+ # SHELL = /bin/sh
+ 
+ #### End of system configuration section. ####
+ 
+ SRCS =  getopt.c getopt.h getopt1.c 
+ OBJS =  getopt.o getopt1.o $(ALLOCA)
+ 
+ PROGS = libtxi.a
+ 
+ all: $(PROGS)
+ sub-all: all
+ 
+ .c.o:
+ 	$(CC) -c $(CPPFLAGS) -I. -I$(srcdir) $(DEFS) $(CFLAGS) $<
+ 
+ libtxi.a: $(OBJS)
+ 	ar qcv libtxi.a $(OBJS)
+ 	$(RANLIB) libtxi.a
+ 
+ getopt.o: getopt.c getopt.h
+ getopt1.o: getopt1.c getopt.h
+ alloca.o: alloca.c
+ 
+ install:
+ uninstall:
+ 
+ TAGS: $(SRCS)
+ 	etags $(SRCS)
+ 
+ clean:
+ 	$(RM) *.o a.out $(PROGS)
+ 
+ mostlyclean: clean
+ 
+ distclean: clean
+ 	$(RM) Makefile
+ 
+ realclean: distclean
+ 	$(RM) TAGS
+ 
+ Makefile: Makefile.djg
+ 	copy $< $@
+ 
+ # Prevent GNU make v3 from overflowing arg limit on SysV.
+ .NOEXPORT:
+ 
+ # eof
diff -cbBwp -N -r texinfo3.6-orig/makefile.djg texinfo3.6/makefile.djg
*** texinfo3.6-orig/makefile.djg	Thu Jan  1 00:00:00 1970
--- texinfo3.6/makefile.djg	Mon Sep  4 20:59:36 1995
***************
*** 0 ****
--- 1,170 ----
+ # Makefile for Texinfo distribution.	-*- Indented-Text -*-
+ # Copyright (C) 1993 Free Software Foundation, Inc.
+ 
+ # This Makefile is for DJGPP v2.x
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ 
+ #### Start of system configuration section. ####
+ 
+ # *** Things you might want to change ***
+ 
+ PWD     = cd
+ 
+ RM	= -rm -f
+ 
+ # If you use emTeX, leave the following line alone; otherwise change
+ TEX     = htex386 &plain
+ 
+ EMACS   = /bin/emacs
+ 
+ CFLAGS  = -O2 -g
+ LDFLAGS = -g
+ 
+ # For info program. 
+ DEFAULT_INFOPATH= .;c:/djgpp/info
+ 
+ # *** Things you should change only if you have a VERY good reason ***
+ 
+ # The following generates a full pathname of the main Texinfo directory.
+ # It is required because current directory is a global notion in DOS,
+ # so we must use a full pathname in the variables which are used in
+ # sub-Makes.
+ srcdir := $(subst \,/,$(shell $(PWD)))
+ 
+ common  = $(srcdir)/libtxi
+ VPATH   = $(srcdir);$(common)
+ 
+ CC      = gcc
+ 
+ # The following is necessary to avoid the loooong list of -DSOMETHING
+ # in $DEFS where we already have everything set up in the system-wide
+ # <config.h> (#include'd by ../config.h)
+ DEFS    = -imacros $(srcdir)/config.h
+ TERMLIBS=
+ LIBS    = $(TERMLIBS) -L$(srcdir)/libtxi -ltxi
+ LOADLIBES= $(LIBS)
+ 
+ MAKEINFO= $(srcdir)/makeinfo/makeinfo
+ TEXINDEX= $(srcdir)/util/texindex
+ 
+ # SHELL = /bin/sh
+ 
+ ALLOCA  =
+ 
+ #### End of system configuration section. ####
+ 
+ VERSION = 3.6
+ 
+ # Subdirectories that have makefiles
+ SUBDIRS = libtxi makeinfo info util emacs
+ 
+ MDEFINES= CC='$(CC)' \
+ 	DEFS='$(DEFS)' CFLAGS='$(CFLAGS)' ALLOCA='$(ALLOCA)' \
+ 	LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)' \
+ 	DEFAULT_INFOPATH='$(DEFAULT_INFOPATH)' RM='$(RM)' \
+ 	EMACS='$(EMACS)' MAKEINFO='$(MAKEINFO)' TEXINDEX='$(TEXINDEX)'
+ 
+ all: sub-all texinfo
+ 
+ sub-all: $(addsuffix /Makefile,$(SUBDIRS))
+ 	cd libtxi
+ 	@echo making sub-all in libtxi
+ 	$(MAKE) $(MDEFINES) sub-all
+ 	cd ..\makeinfo
+ 	@echo making sub-all in makeinfo
+ 	$(MAKE) $(MDEFINES) sub-all
+ 	cd ..\info
+ 	@echo making sub-all in info
+ 	$(MAKE) $(MDEFINES) sub-all
+ 	cd ..\util
+ 	@echo making sub-all in util
+ 	$(MAKE) $(MDEFINES) sub-all
+ 	cd ..\emacs
+ 	@echo making sub-all in emacs
+ 	$(MAKE) $(MDEFINES) sub-all
+ 	cd ..
+ 
+ libtxi/Makefile: libtxi/Makefile.djg
+ 	copy libtxi\Makefile.djg libtxi\Makefile
+ 
+ makeinfo/Makefile: makeinfo/Makefile.djg
+ 	copy makeinfo\Makefile.djg makeinfo\Makefile
+ 
+ info/Makefile: info/Makefile.djg
+ 	copy info\Makefile.djg info\Makefile
+ 
+ util/Makefile: util/Makefile.djg
+ 	copy util\Makefile.djg util\Makefile
+ 
+ emacs/Makefile: emacs/Makefile.djg
+ 	copy emacs\Makefile.djg emacs\Makefile
+ 
+ clean mostlyclean: $(addsuffix /Makefile,$(SUBDIRS))
+ 	cd libtxi
+ 	@echo making $@ in libtxi
+ 	$(MAKE) $(MDEFINES) $@
+ 	cd ..\makeinfo
+ 	@echo making $@ in makeinfo
+ 	$(MAKE) $(MDEFINES) $@
+ 	cd ..\info
+ 	@echo making $@ in info
+ 	$(MAKE) $(MDEFINES) $@
+ 	cd ..\util
+ 	@echo making $@ in util
+ 	$(MAKE) $(MDEFINES) $@
+ 	cd ..\emacs
+ 	@echo making $@ in emacs
+ 	$(MAKE) $(MDEFINES) $@
+ 	cd ..
+ 
+ distclean: clean texclean $(addsuffix /Makefile,$(SUBDIRS))
+ 	cd libtxi
+ 	@echo making $@ in libtxi
+ 	$(MAKE) $(MDEFINES) $@
+ 	cd ..\makeinfo
+ 	@echo making $@ in makeinfo
+ 	$(MAKE) $(MDEFINES) $@
+ 	cd ..\info
+ 	@echo making $@ in info
+ 	$(MAKE)  $(MDEFINES) $@
+ 	cd ..\util
+ 	@echo making $@ in util
+ 	$(MAKE)  $(MDEFINES) $@
+ 	cd ..\emacs
+ 	@echo making $@ in emacs
+ 	$(MAKE)  $(MDEFINES) $@
+ 	cd ..
+ 	$(RM) *.log texinfo texinfo.i? texinfo.i??
+ 	$(RM) Makefile
+ 
+ texclean:
+ 	$(RM) *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
+ 	$(RM) *.toc *.tp *.tps *.vr *.vrs
+ 
+ realclean: distclean
+ 
+ texinfo: $(srcdir)/texinfo.txi
+ 	./makeinfo/makeinfo -I$(srcdir) texinfo.txi
+ 
+ texinfo.dvi: $(srcdir)/texinfo.txi
+ 	$(TEX) texinfo.txi
+ 	$(TEXINDEX) texinfo.??
+ 	$(TEX) texinfo.txi
+ 
+ force:
+ 
+ # Prevent GNU make v3 from overflowing arg limit on SysV.
+ .NOEXPORT:
diff -cbBwp -N -r texinfo3.6-orig/makeinfo/makefile.djg texinfo3.6/makeinfo/makefile.djg
*** texinfo3.6-orig/makeinfo/makefile.djg	Thu Jan  1 00:00:00 1970
--- texinfo3.6/makeinfo/makefile.djg	Mon Sep  4 16:09:34 1995
***************
*** 0 ****
--- 1,77 ----
+ # Makefile for GNU makeinfo.  -*- Indented-Text -*-
+ # Copyright (C) 1993 Free Software Foundation, Inc.
+ 
+ # This Makefile is for DJGPP v2.x
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ 
+ #### Start of system configuration section. ####
+ 
+ srcdir = .
+ common = ../libtxi
+ VPATH = $(srcdir);$(common)
+ 
+ CPPFLAGS = -DREMOVE_OUTPUT_EXTENSIONS
+ 
+ # SHELL = /bin/sh
+ 
+ #### End of system configuration section. ####
+ 
+ SRCS =  makeinfo.c
+ OBJS =  makeinfo.o
+ 
+ PROGS = makeinfo
+ 
+ all: $(PROGS) makeinfo.info
+ sub-all: all
+ 
+ .c.o:
+ 	$(CC) -c $(CPPFLAGS) -I. -I$(srcdir) -I$(common) $(DEFS) $(CFLAGS) $<
+ 
+ makeinfo: $(OBJS) ../libtxi/libtxi.a
+ 	$(CC) $(LDFLAGS) -o makeinfo $(OBJS) $(LOADLIBES)
+ 
+ ../libtxi/libtxi.a:
+ 	cd ..\libtxi
+ 	$(MAKE) $(MFLAGS) libtxi.a
+ 
+ makeinfo.o: makeinfo.c $(common)/getopt.h
+ 
+ makeinfo.info: ./makeinfo makeinfo.texi macro.texi
+ 	./makeinfo --no-split -I$(srcdir) makeinfo.texi
+ 
+ # makeinfo.texi: ./makeinfo makeinfo.mki
+ # 	./makeinfo -E makeinfo.texi -I$(srcdir) makeinfo.mki
+ 
+ TAGS: $(SRCS)
+ 	etags $(SRCS)
+ 
+ clean:
+ 	$(RM) *.o a.out *.exe $(PROGS)
+ 
+ mostlyclean: clean
+ 
+ distclean: clean
+ 	$(RM) TAGS Makefile *.info */*.info
+ 
+ realclean: distclean
+ 
+ Makefile: Makefile.djg
+ 	cp $< $@
+ 
+ # Prevent GNU make v3 from overflowing arg limit on SysV.
+ .NOEXPORT:
+ 
+ # eof
diff -cbBwp -N -r texinfo3.6-orig/makeinfo/makeinfo.c texinfo3.6/makeinfo/makeinfo.c
*** texinfo3.6-orig/makeinfo/makeinfo.c	Wed Jun 21 12:00:54 1995
--- texinfo3.6/makeinfo/makeinfo.c	Mon Sep  4 16:09:34 1995
*************** void *xmalloc (), *xrealloc ();
*** 130,135 ****
--- 130,141 ----
  extern void *malloc (), *realloc ();
  #endif /* __osf__ */
  
+ #if defined(__MSDOS__)
+ #define PATH_SEPARATOR_CHAR ';'
+ #else   /* !__MSDOS__ */
+ #define PATH_SEPARATOR_CHAR ':'
+ #endif  /* __MSDOS__ */
+ 
  char **get_brace_args ();
  int array_len ();
  void free_array ();
*************** main (argc, argv)
*** 968,974 ****
--- 974,984 ----
  	  include_files_path = (char *)
  	    xrealloc (include_files_path,
  		      2 + strlen (include_files_path) + strlen (optarg));
+ #ifdef  __MSDOS__
+ 	  strcat (include_files_path, ";");
+ #else   /* ! __MSDOS__ */
  	  strcat (include_files_path, ":");
+ #endif  /* __MSDOS__ */
  	  strcat (include_files_path, optarg);
  	  break;
  
*************** find_and_load (filename)
*** 1255,1268 ****
       readable bytes is always less than this value.  The arcane
       mysteries of VMS/RMS are too much to probe, so this hack
      suffices to make things work. */
! #if defined (VMS)
    while ((n = read (file, result + count, file_size)) > 0)
      count += n;
    if (n == -1)
! #else /* !VMS */
      count = file_size;
      if (read (file, result, file_size) != file_size)
! #endif /* !VMS */
    error_exit:
      {
        if (result)
--- 1265,1278 ----
       readable bytes is always less than this value.  The arcane
       mysteries of VMS/RMS are too much to probe, so this hack
      suffices to make things work. */
! #if defined (VMS) || defined (__MSDOS__)
    while ((n = read (file, result + count, file_size)) > 0)
      count += n;
    if (n == -1)
! #else /* !VMS || __MSDOS__ */
      count = file_size;
      if (read (file, result, file_size) != file_size)
! #endif /* !VMS || __MSDOS__ */
    error_exit:
      {
        if (result)
*************** pathname_part (filename)
*** 1436,1441 ****
--- 1446,1457 ----
    if (filename[i] == '/')
      i++;
  
+ #if defined(__MSDOS__)
+   /* We can have "d:file" */
+   if (!i && filename[1] == ':')
+     i = 2;
+ #endif  /* __MSDOS__ */
+ 
    if (i)
      {
        result = (char *)xmalloc (1 + i);
*************** filename_non_directory (name)
*** 1453,1459 ****
--- 1469,1479 ----
    register int i;
  
    for (i = strlen (name) - 1; i; i--)
+ #if defined(__MSDOS__)
+     if (name[i] == '/' || name[i] == ':')
+ #else
      if (name[i] == '/')
+ #endif
        return (strdup (name + i + 1));
  
    return (strdup (name));
*************** expand_filename (filename, input_name)
*** 1495,1501 ****
--- 1515,1530 ----
    if (filename[0] == '.' || filename[0] == '/')
      return (filename);
  
+ #if defined(__MSDOS__)
+   /* We can have filename like "d:file" which are also non-relative. */
+   if (filename[1] == ':')
+     return (filename);
+ 
+   if (filename[0] != '/' && input_name[0] == '/' ||
+       filename[0] != '/' && filename[1] != ':' && input_name[1] == ':')
+ #else   /* !__MSDOS__ */
    if (filename[0] != '/' && input_name[0] == '/')
+ #endif  /* __MSDOS__ */
      {
        /* Make it so that relative names work. */
        char *result;
*************** expand_filename (filename, input_name)
*** 1511,1516 ****
--- 1540,1550 ----
        if (result[i] == '/')
  	i++;
  
+ #if defined(__MSDOS__)
+       if (!i && result[1] == ':')
+         i = 2;
+ #endif
+ 
        strcpy (&result[i], filename);
        free (filename);
        return (result);
*************** full_pathname (filename)
*** 1532,1537 ****
--- 1566,1574 ----
    
    /* Already absolute? */
    if ((initial_character == '/') ||
+ #if defined(__MSDOS__)
+       (filename[1] == ':') ||
+ #endif
        ((strncmp (filename, "./", 2) == 0) ||
         (strncmp (filename, "../", 3) == 0)))
      return (strdup (filename));
*************** read_token ()
*** 1764,1769 ****
--- 1801,1808 ----
    if (self_delimiting (character))
      {
        input_text_offset++;
+       if (character == '\n')    /* a case of "@" on a line by itself */
+         line_number++;
        result = strdup (" ");
        *result = character;
        return (result);
*************** get_until_in_braces (match, string)
*** 2001,2009 ****
     named as the argument to the @setfilename command. */
  static char *suffixes[] = {
    "",
    ".texinfo",
    ".texi",
-   ".txinfo",
    (char *)NULL
  };
  
--- 2040,2048 ----
     named as the argument to the @setfilename command. */
  static char *suffixes[] = {
    "",
+   ".txinfo",    /* checked first, so .tex isn't treated as .texinfo */
    ".texinfo",
    ".texi",
    (char *)NULL
  };
  
*************** convert_from_file (name)
*** 2108,2114 ****
  
    input_filename = filename;
  
!   convert_from_loaded_file (name);
  }
    
  void
--- 2147,2154 ----
  
    input_filename = filename;
  
!   convert_from_loaded_file (filename);
!   free (filename);
  }
    
  void
*************** discard_insertions ()
*** 3803,3810 ****
      {
        if (insertion_stack->insertion == ifinfo ||
  	  insertion_stack->insertion == ifset ||
! 	  insertion_stack->insertion == ifclear ||
! 	  insertion_stack->insertion == cartouche)
  	break;
        else
  	{
--- 3843,3849 ----
      {
        if (insertion_stack->insertion == ifinfo ||
  	  insertion_stack->insertion == ifset ||
! 	  insertion_stack->insertion == ifclear)
  	break;
        else
  	{
*************** cm_copyright (arg)
*** 3885,3891 ****
      add_word ("(C)");
  }
  
! #if defined (__osf__)
  #define LOCALTIME_CAST(x) (time_t *)(x)
  #else
  #define LOCALTIME_CAST(x) (x)
--- 3924,3930 ----
      add_word ("(C)");
  }
  
! #if defined (__osf__) || defined (__MSDOS__)
  #define LOCALTIME_CAST(x) (time_t *)(x)
  #else
  #define LOCALTIME_CAST(x) (x)
*************** split_file (filename, size)
*** 5348,5354 ****
  		    (10 + strlen (root_pathname) + strlen (root_filename));
  		  sprintf
  		    (split_filename,
! 		     "%s%s-%d", root_pathname, root_filename, which_file);
  
  		  fd = open
  		    (split_filename, O_WRONLY | O_TRUNC | O_CREAT, 0666);
--- 5387,5398 ----
  		    (10 + strlen (root_pathname) + strlen (root_filename));
  		  sprintf
  		    (split_filename,
! #if defined(__MSDOS__)
! 		     "%s%s.i%d", root_pathname, root_filename, which_file
! #else   /* !__MSDOS__ */
! 		     "%s%s-%d", root_pathname, root_filename, which_file
! #endif  /* __MSDOS__ */
!                      );
  
  		  fd = open
  		    (split_filename, O_WRONLY | O_TRUNC | O_CREAT, 0666);
*************** split_file (filename, size)
*** 5372,5379 ****
--- 5416,5428 ----
  		      indirect_info += strlen (indirect_info);
  		    }
  
+ #if defined(__MSDOS__)
+ 		  sprintf (indirect_info, "%s.i%d: %d\n",
+ 			   root_filename, which_file, file_top);
+ #else   /* !__MSDOS__ */
  		  sprintf (indirect_info, "%s-%d: %d\n",
  			   root_filename, which_file, file_top);
+ #endif  /* __MSDOS__ */
  
  		  free (split_filename);
  		  indirect_info += strlen (indirect_info);
*************** cm_center ()
*** 7146,7152 ****
    start = output_paragraph_offset;
    inhibit_output_flushing ();
    get_rest_of_line ((char **)&line);
!   execute_string ((char *)line);
    free (line);
    uninhibit_output_flushing ();
  
--- 7195,7201 ----
    start = output_paragraph_offset;
    inhibit_output_flushing ();
    get_rest_of_line ((char **)&line);
!   execute_string ("%s", (char *)line);
    free (line);
    uninhibit_output_flushing ();
  
*************** delete_macro (name)
*** 8438,8444 ****
    for (i = 0; macro_list && (def = macro_list[i]); i++)
      if (strcmp (def->name, name) == 0)
        {
! 	memcpy (macro_list + i, macro_list + i + 1,
  	       ((macro_list_len + 1) - i) * sizeof (MACRO_DEF *));
  	break;
        }
--- 8487,8493 ----
    for (i = 0; macro_list && (def = macro_list[i]); i++)
      if (strcmp (def->name, name) == 0)
        {
! 	memmove (macro_list + i, macro_list + i + 1,
  	       ((macro_list_len + 1) - i) * sizeof (MACRO_DEF *));
  	break;
        }
*************** get_macro_args (def)
*** 8478,8485 ****
  	      char **arglist;
  
  	      get_rest_of_line (&word);
! 	      input_text_offset--;
  	      canon_white (word);
  	      arglist = (char **)xmalloc (2 * sizeof (char *));
  	      arglist[0] = word;
  	      arglist[1] = (char *)NULL;
--- 8527,8538 ----
  	      char **arglist;
  
  	      get_rest_of_line (&word);
!               add_char ('\n');
! #if 0
!               if (input_text[input_text_offset - 1] == '\n')
!                 backup_input_pointer ();
  	      canon_white (word);
+ #endif
  	      arglist = (char **)xmalloc (2 * sizeof (char *));
  	      arglist[0] = word;
  	      arglist[1] = (char *)NULL;
*************** execute_macro (def)
*** 8621,8627 ****
  	  me_execute_string (execution_string);
  	}
        else
! 	execute_string (execution_string);
  
        free (execution_string);
      }
--- 8674,8680 ----
  	  me_execute_string (execution_string);
  	}
        else
! 	execute_string ("%s", execution_string);
  
        free (execution_string);
      }
*************** cm_macro ()
*** 8713,8720 ****
--- 8766,8788 ----
  		  while ((character = curchar ())
  			 && character != ','
  			 && character != '}')
+                     {
                        input_text_offset++;
  
+                       /* Treat the weird (but legal) cases like this:
+ 
+                          @macro xyzzy{a  |
+                                      , b}|
+                          <macro body>|
+                          @end macro|
+ 
+                          The `|' characters show where the lines end.
+                          The significant whitespace is after the `a'
+                          argument but before the Newline.  */
+                       if (character == '\n')
+                         line_number++;
+                     }
+ 
  		  /* Add the word to our list of words. */
  		  if ((arglist_index + 2) >= arglist_size)
  		    arglist = (char **)xrealloc
*************** cm_macro ()
*** 8778,8784 ****
  	  (strncmp (line + 1, "quote-arg", 9) == 0) &&
  	  (line[10] == '\0' || whitespace (line[10])))
  	{
! 	  for (i = 16; whitespace (line[i]); i++);
  	  strcpy (line, line + i);
  
  	  if (arglist && arglist[0] && !arglist[1])
--- 8846,8852 ----
  	  (strncmp (line + 1, "quote-arg", 9) == 0) &&
  	  (line[10] == '\0' || whitespace (line[10])))
  	{
! 	  for (i = 10; whitespace (line[i]); i++);
  	  strcpy (line, line + i);
  
  	  if (arglist && arglist[0] && !arglist[1])
*************** get_brace_args (quote_single)
*** 9123,9129 ****
  
  		  for (i = 0; word[i]; i++)
  		    if (word[i] == '\\')
! 		      memcpy (word + i, word + i + 1, strlen (word + i + 1));
  		}
  
  	      if (arglist_index + 2 >= arglist_size)
--- 9191,9198 ----
  
  		  for (i = 0; word[i]; i++)
  		    if (word[i] == '\\')
! 		      memmove (word + i,
!                                word + i + 1, strlen (word + i + 1) + 1);
  		}
  
  	      if (arglist_index + 2 >= arglist_size)
*************** get_brace_args (quote_single)
*** 9146,9152 ****
--- 9215,9225 ----
  	  input_text_offset++;
  	}
        else
+         {
            input_text_offset++;
+           if (character == '\n')
+             line_number++;
+         }
      }
    return (arglist);
  }
*************** extract_colon_unit (string, index)
*** 9177,9188 ****
       `:'.  If I is 0, then the path has a leading colon.  Trailing colons
       are handled OK by the `else' part of the if statement; an empty
       string is returned in that case. */
!   if (i && string[i] == ':')
      i++;
  
    start = i;
  
!   while (string[i] && string[i] != ':') i++;
  
    *index = i;
  
--- 9250,9261 ----
       `:'.  If I is 0, then the path has a leading colon.  Trailing colons
       are handled OK by the `else' part of the if statement; an empty
       string is returned in that case. */
!   if (i && string[i] == PATH_SEPARATOR_CHAR)
      i++;
  
    start = i;
  
!   while (string[i] && string[i] != PATH_SEPARATOR_CHAR) i++;
  
    *index = i;
  
*************** get_file_info_in_path (filename, path, f
*** 9223,9228 ****
--- 9296,9305 ----
  
    /* Handle absolute pathnames. "./foo", "/foo", "../foo". */
    if (*filename == '/' ||
+ #ifdef  __MSDOS__
+       /* "d:something" is also treated as absolute pathname. */
+       filename[1] == ':' ||
+ #endif
        (*filename == '.' &&
         (filename[1] == '/' ||
  	(filename[1] == '.' && filename[2] == '/'))))
diff -cbBwp -N -r texinfo3.6-orig/util/makefile.djg texinfo3.6/util/makefile.djg
*** texinfo3.6-orig/util/makefile.djg	Thu Jan  1 00:00:00 1970
--- texinfo3.6/util/makefile.djg	Mon Sep  4 15:05:42 1995
***************
*** 0 ****
--- 1,78 ----
+ # Makefile for GNU Texindex.
+ # Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+ 
+ # This Makefile is for DJGPP v2.x
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ 
+ #### Start of system configuration section. ####
+ 
+ srcdir = .
+ VPATH  = $(srcdir);$(common)
+ 
+ common = $(srcdir)/../libtxi
+ 
+ CC = gcc
+ 
+ LN	= ln
+ RM	= -rm -f
+ TAR	= tar
+ MKDIR	= mkdir
+ 
+ # The following is necessary to avoid the loooong list of -DSOMETHING
+ # in $DEFS where we already have everything set up in the system-wide
+ # <config.h> (#include'd by ../config.h)
+ DEFS = -imacros ../config.h
+ 
+ LIBS = -L../libtxi -ltxi
+ LOADLIBES = $(LIBS)
+ 
+ # SHELL = /bin/sh
+ 
+ CFLAGS = -O2 -g
+ LDFLAGS = -g
+ 
+ #### End of system configuration section. ####
+ 
+ all: texindex
+ sub-all: all
+ 
+ .c.o:
+ 	$(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -I$(common) $(CFLAGS) $<
+ 
+ Makefile: Makefile.djg
+ 	cp $< $@
+ 
+ TAGS:
+ 	etags *.c *.h $(common)/getopt*.c $(common)/getopt.h
+ 
+ clean:
+ 	$(RM) *.o a.out *.exe texindex
+ 
+ mostlyclean: clean
+ 
+ distclean: clean
+ 	$(RM) Makefile
+ 
+ realclean: distclean
+ 	$(RM) TAGS
+ 
+ texindex: texindex.o ../libtxi/libtxi.a
+ 	$(CC) $(LDFLAGS) -o texindex texindex.o $(LOADLIBES)
+ 
+ texindex.o: texindex.c $(common)/getopt.h
+ 
+ # Prevent GNU make v3 from overflowing arg limit on SysV.
+ .NOEXPORT:
