daf34cc
--- texinfo-4.9/util/texindex.c_old	2007-06-27 19:11:08.000000000 +0200
daf34cc
+++ texinfo-4.9/util/texindex.c	2007-07-31 08:49:25.000000000 +0200
daf34cc
@@ -37,16 +37,12 @@
daf34cc
 #define memset(ptr, ignore, count) bzero (ptr, count)
daf34cc
 #endif
daf34cc
 
daf34cc
-char *mktemp (char *);
daf34cc
-
daf34cc
 #if !defined (SEEK_SET)
daf34cc
 #  define SEEK_SET 0
daf34cc
 #  define SEEK_CUR 1
daf34cc
 #  define SEEK_END 2
daf34cc
 #endif /* !SEEK_SET */
daf34cc
 
daf34cc
-struct linebuffer;
daf34cc
-
daf34cc
 /* When sorting in core, this structure describes one line
daf34cc
    and the position and length of its first keyfield.  */
daf34cc
 struct lineinfo
daf34cc
@@ -96,16 +92,6 @@
daf34cc
 /* The allocated length of `linearray'. */
daf34cc
 long nlines;
daf34cc
 
daf34cc
-/* Directory to use for temporary files.  On Unix, it ends with a slash.  */
daf34cc
-char *tempdir;
daf34cc
-
daf34cc
-/* Number of last temporary file.  */
daf34cc
-int tempcount;
daf34cc
-
daf34cc
-/* Number of last temporary file already deleted.
daf34cc
-   Temporary files are deleted by `flush_tempfiles' in order of creation.  */
daf34cc
-int last_deleted_tempcount;
daf34cc
-
daf34cc
 /* During in-core sort, this points to the base of the data block
daf34cc
    which contains all the lines of data.  */
daf34cc
 char *text_base;
daf34cc
@@ -117,15 +103,9 @@
daf34cc
    determine whether we need initials in the sorted form.  */
daf34cc
 char first_initial;
daf34cc
 
daf34cc
-/* Additional command switches .*/
daf34cc
-
daf34cc
-/* Nonzero means do not delete tempfiles -- for debugging. */
daf34cc
-int keep_tempfiles;
daf34cc
-
daf34cc
 /* Forward declarations of functions in this file. */
daf34cc
 void decode_command (int argc, char **argv);
daf34cc
 void sort_in_core (char *infile, int total, char *outfile);
daf34cc
-void sort_offline (char *infile, off_t total, char *outfile);
daf34cc
 char **parsefile (char *filename, char **nextline, char *data, long int size);
daf34cc
 char *find_field (struct keyfield *keyfield, char *str, long int *lengthptr);
daf34cc
 char *find_pos (char *str, int words, int chars, int ignore_blanks);
daf34cc
@@ -137,26 +117,17 @@
daf34cc
                    long int length1, long int pos1, char *start2,
daf34cc
                    long int length2, long int pos2);
daf34cc
 int compare_full (const void *, const void *);
daf34cc
-long readline (struct linebuffer *linebuffer, FILE *stream);
daf34cc
-int merge_files (char **infiles, int nfiles, char *outfile);
daf34cc
-int merge_direct (char **infiles, int nfiles, char *outfile);
daf34cc
 void pfatal_with_name (const char *name);
daf34cc
 void fatal (const char *format, const char *arg);
daf34cc
 void error (const char *format, const char *arg);
daf34cc
 void *xmalloc (), *xrealloc ();
daf34cc
 char *concat (char *s1, char *s2);
daf34cc
-void flush_tempfiles (int to_count);
daf34cc
 
daf34cc
-#define MAX_IN_CORE_SORT 500000
daf34cc
-
daf34cc
 int
daf34cc
 main (int argc, char **argv)
daf34cc
 {
daf34cc
   int i;
daf34cc
 
daf34cc
-  tempcount = 0;
daf34cc
-  last_deleted_tempcount = 0;
daf34cc
-
daf34cc
 #ifdef HAVE_SETLOCALE
daf34cc
   /* Set locale via LC_ALL.  */
daf34cc
   setlocale (LC_ALL, "");
daf34cc
@@ -225,14 +196,15 @@
daf34cc
       need_initials = 0;
daf34cc
       first_initial = '\0';
daf34cc
 
daf34cc
-      if (ptr < MAX_IN_CORE_SORT)
daf34cc
-        /* Sort a small amount of data. */
daf34cc
-        sort_in_core (infiles[i], (int)ptr, outfile);
daf34cc
-      else
daf34cc
-        sort_offline (infiles[i], ptr, outfile);
daf34cc
+      if (ptr != (int)ptr)
daf34cc
+        {
daf34cc
+	  fprintf (stderr, "%s: %s: file too large\n", program_name,
daf34cc
+	  	infiles[i]);
daf34cc
+	  xexit (1);
daf34cc
+	}
daf34cc
+      sort_in_core (infiles[i], (int)ptr, outfile);
daf34cc
     }
daf34cc
 
daf34cc
-  flush_tempfiles (tempcount);
daf34cc
   xexit (0);
daf34cc
   return 0; /* Avoid bogus warnings.  */
daf34cc
 }
daf34cc
@@ -250,10 +222,6 @@
daf34cc
 TEXINDEX_OPTION texindex_options[] = {
daf34cc
   { "--help", "-h", (int *)NULL, 0, (char *)NULL,
daf34cc
       N_("display this help and exit") },
daf34cc
-  { "--keep", "-k", &keep_tempfiles, 1, (char *)NULL,
daf34cc
-      N_("keep temporary files around after processing") },
daf34cc
-  { "--no-keep", 0, &keep_tempfiles, 0, (char *)NULL,
daf34cc
-      N_("do not keep temporary files around after processing (default)") },
daf34cc
   { "--output", "-o", (int *)NULL, 0, "FILE",
daf34cc
       N_("send output to FILE") },
daf34cc
   { "--version", (char *)NULL, (int *)NULL, 0, (char *)NULL,
daf34cc
@@ -308,20 +276,6 @@
daf34cc
   char **ip;
daf34cc
   char **op;
daf34cc
 
daf34cc
-  /* Store default values into parameter variables. */
daf34cc
-
daf34cc
-  tempdir = getenv ("TMPDIR");
daf34cc
-  if (tempdir == NULL)
daf34cc
-    tempdir = getenv ("TEMP");
daf34cc
-  if (tempdir == NULL)
daf34cc
-    tempdir = getenv ("TMP");
daf34cc
-  if (tempdir == NULL)
daf34cc
-    tempdir = DEFAULT_TMPDIR;
daf34cc
-  else
daf34cc
-    tempdir = concat (tempdir, "/");
daf34cc
-
daf34cc
-  keep_tempfiles = 0;
daf34cc
-
daf34cc
   /* Allocate ARGC input files, which must be enough.  */
daf34cc
 
daf34cc
   infiles = (char **) xmalloc (argc * sizeof (char *));
daf34cc
@@ -349,7 +303,7 @@
daf34cc
           else if ((strcmp (arg, "--keep") == 0) ||
daf34cc
                    (strcmp (arg, "-k") == 0))
daf34cc
             {
daf34cc
-              keep_tempfiles = 1;
daf34cc
+	      /* Ignore, for backward compatibility */
daf34cc
             }
daf34cc
           else if ((strcmp (arg, "--help") == 0) ||
daf34cc
                    (strcmp (arg, "-h") == 0))
daf34cc
@@ -385,41 +339,6 @@
daf34cc
     usage (1);
daf34cc
 }
daf34cc
 
daf34cc
-/* Return a name for temporary file COUNT. */
daf34cc
-
daf34cc
-static char *
daf34cc
-maketempname (int count)
daf34cc
-{
daf34cc
-  static char *tempbase = NULL;
daf34cc
-  char tempsuffix[10];
daf34cc
-
daf34cc
-  if (!tempbase)
daf34cc
-    {
daf34cc
-      int fd;
daf34cc
-      tempbase = concat (tempdir, "txidxXXXXXX");
daf34cc
-
daf34cc
-      fd = mkstemp (tempbase);
daf34cc
-      if (fd == -1)
daf34cc
-        pfatal_with_name (tempbase);
daf34cc
-    }
daf34cc
-
daf34cc
-  sprintf (tempsuffix, ".%d", count);
daf34cc
-  return concat (tempbase, tempsuffix);
daf34cc
-}
daf34cc
-
daf34cc
-
daf34cc
-/* Delete all temporary files up to TO_COUNT. */
daf34cc
-
daf34cc
-void
daf34cc
-flush_tempfiles (int to_count)
daf34cc
-{
daf34cc
-  if (keep_tempfiles)
daf34cc
-    return;
daf34cc
-  while (last_deleted_tempcount < to_count)
daf34cc
-    unlink (maketempname (++last_deleted_tempcount));
daf34cc
-}
daf34cc
-
daf34cc
-
daf34cc
 /* Compare LINE1 and LINE2 according to the specified set of keyfields. */
daf34cc
 
daf34cc
 int
daf34cc
@@ -802,150 +721,6 @@
daf34cc
     }
daf34cc
 }
daf34cc
 
daf34cc
-/* A `struct linebuffer' is a structure which holds a line of text.
daf34cc
-   `readline' reads a line from a stream into a linebuffer
daf34cc
-   and works regardless of the length of the line.  */
daf34cc
-
daf34cc
-struct linebuffer
daf34cc
-{
daf34cc
-  long size;
daf34cc
-  char *buffer;
daf34cc
-};
daf34cc
-
daf34cc
-/* Initialize LINEBUFFER for use. */
daf34cc
-
daf34cc
-void
daf34cc
-initbuffer (struct linebuffer *linebuffer)
daf34cc
-{
daf34cc
-  linebuffer->size = 200;
daf34cc
-  linebuffer->buffer = (char *) xmalloc (200);
daf34cc
-}
daf34cc
-
daf34cc
-/* Read a line of text from STREAM into LINEBUFFER.
daf34cc
-   Return the length of the line.  */
daf34cc
-
daf34cc
-long
daf34cc
-readline (struct linebuffer *linebuffer, FILE *stream)
daf34cc
-{
daf34cc
-  char *buffer = linebuffer->buffer;
daf34cc
-  char *p = linebuffer->buffer;
daf34cc
-  char *end = p + linebuffer->size;
daf34cc
-
daf34cc
-  while (1)
daf34cc
-    {
daf34cc
-      int c = getc (stream);
daf34cc
-      if (p == end)
daf34cc
-        {
daf34cc
-          buffer = (char *) xrealloc (buffer, linebuffer->size *= 2);
daf34cc
-          p += buffer - linebuffer->buffer;
daf34cc
-          end += buffer - linebuffer->buffer;
daf34cc
-          linebuffer->buffer = buffer;
daf34cc
-        }
daf34cc
-      if (c < 0 || c == '\n')
daf34cc
-        {
daf34cc
-          *p = 0;
daf34cc
-          break;
daf34cc
-        }
daf34cc
-      *p++ = c;
daf34cc
-    }
daf34cc
-
daf34cc
-  return p - buffer;
daf34cc
-}
daf34cc
-
daf34cc
-/* Sort an input file too big to sort in core.  */
daf34cc
-
daf34cc
-void
daf34cc
-sort_offline (char *infile, off_t total, char *outfile)
daf34cc
-{
daf34cc
-  /* More than enough. */
daf34cc
-  int ntemps = 2 * (total + MAX_IN_CORE_SORT - 1) / MAX_IN_CORE_SORT;
daf34cc
-  char **tempfiles = (char **) xmalloc (ntemps * sizeof (char *));
daf34cc
-  FILE *istream = fopen (infile, "r");
daf34cc
-  int i;
daf34cc
-  struct linebuffer lb;
daf34cc
-  long linelength;
daf34cc
-  int failure = 0;
daf34cc
-
daf34cc
-  initbuffer (&lb);
daf34cc
-
daf34cc
-  /* Read in one line of input data.  */
daf34cc
-
daf34cc
-  linelength = readline (&lb, istream);
daf34cc
-
daf34cc
-  if (lb.buffer[0] != '\\' && lb.buffer[0] != '@')
daf34cc
-    {
daf34cc
-      error (_("%s: not a texinfo index file"), infile);
daf34cc
-      return;
daf34cc
-    }
daf34cc
-
daf34cc
-  /* Split up the input into `ntemps' temporary files, or maybe fewer,
daf34cc
-     and put the new files' names into `tempfiles' */
daf34cc
-
daf34cc
-  for (i = 0; i < ntemps; i++)
daf34cc
-    {
daf34cc
-      char *outname = maketempname (++tempcount);
daf34cc
-      FILE *ostream = fopen (outname, "w");
daf34cc
-      long tempsize = 0;
daf34cc
-
daf34cc
-      if (!ostream)
daf34cc
-        pfatal_with_name (outname);
daf34cc
-      tempfiles[i] = outname;
daf34cc
-
daf34cc
-      /* Copy lines into this temp file as long as it does not make file
daf34cc
-         "too big" or until there are no more lines.  */
daf34cc
-
daf34cc
-      while (tempsize + linelength + 1 <= MAX_IN_CORE_SORT)
daf34cc
-        {
daf34cc
-          tempsize += linelength + 1;
daf34cc
-          fputs (lb.buffer, ostream);
daf34cc
-          putc ('\n', ostream);
daf34cc
-
daf34cc
-          /* Read another line of input data.  */
daf34cc
-
daf34cc
-          linelength = readline (&lb, istream);
daf34cc
-          if (!linelength && feof (istream))
daf34cc
-            break;
daf34cc
-
daf34cc
-          if (lb.buffer[0] != '\\' && lb.buffer[0] != '@')
daf34cc
-            {
daf34cc
-              error (_("%s: not a texinfo index file"), infile);
daf34cc
-              failure = 1;
daf34cc
-              goto fail;
daf34cc
-            }
daf34cc
-        }
daf34cc
-      fclose (ostream);
daf34cc
-      if (feof (istream))
daf34cc
-        break;
daf34cc
-    }
daf34cc
-
daf34cc
-  free (lb.buffer);
daf34cc
-
daf34cc
-fail:
daf34cc
-  /* Record number of temp files we actually needed.  */
daf34cc
-
daf34cc
-  ntemps = i;
daf34cc
-
daf34cc
-  /* Sort each tempfile into another tempfile.
daf34cc
-    Delete the first set of tempfiles and put the names of the second
daf34cc
-    into `tempfiles'. */
daf34cc
-
daf34cc
-  for (i = 0; i < ntemps; i++)
daf34cc
-    {
daf34cc
-      char *newtemp = maketempname (++tempcount);
daf34cc
-      sort_in_core (tempfiles[i], MAX_IN_CORE_SORT, newtemp);
daf34cc
-      if (!keep_tempfiles)
daf34cc
-        unlink (tempfiles[i]);
daf34cc
-      tempfiles[i] = newtemp;
daf34cc
-    }
daf34cc
-
daf34cc
-  if (failure)
daf34cc
-    return;
daf34cc
-
daf34cc
-  /* Merge the tempfiles together and indexify. */
daf34cc
-
daf34cc
-  merge_files (tempfiles, ntemps, outfile);
daf34cc
-}
daf34cc
-
daf34cc
 /* Sort INFILE, whose size is TOTAL,
daf34cc
    assuming that is small enough to be done in-core,
daf34cc
    then indexify it and send the output to OUTFILE (or to stdout).  */
daf34cc
@@ -1349,8 +1124,7 @@
daf34cc
 
daf34cc
   for (next_line = linearray; next_line != stop_line; next_line++)
daf34cc
     {
daf34cc
-      /* If -u was specified, output the line only if distinct from
daf34cc
-         previous one.  */
daf34cc
+      /* Output the line only if distinct from previous one.  */
daf34cc
       if (next_line == linearray
daf34cc
       /* Compare previous line with this one, using only the
daf34cc
          explicitly specd keyfields. */
daf34cc
@@ -1370,215 +1144,6 @@
daf34cc
   finish_index (ostream);
daf34cc
 }
daf34cc
 
daf34cc
-/* Assume (and optionally verify) that each input file is sorted;
daf34cc
-   merge them and output the result.
daf34cc
-   Returns nonzero if any input file fails to be sorted.
daf34cc
-
daf34cc
-   This is the high-level interface that can handle an unlimited
daf34cc
-   number of files.  */
daf34cc
-
daf34cc
-#define MAX_DIRECT_MERGE 10
daf34cc
-
daf34cc
-int
daf34cc
-merge_files (char **infiles, int nfiles, char *outfile)
daf34cc
-{
daf34cc
-  char **tempfiles;
daf34cc
-  int ntemps;
daf34cc
-  int i;
daf34cc
-  int value = 0;
daf34cc
-  int start_tempcount = tempcount;
daf34cc
-
daf34cc
-  if (nfiles <= MAX_DIRECT_MERGE)
daf34cc
-    return merge_direct (infiles, nfiles, outfile);
daf34cc
-
daf34cc
-  /* Merge groups of MAX_DIRECT_MERGE input files at a time,
daf34cc
-     making a temporary file to hold each group's result.  */
daf34cc
-
daf34cc
-  ntemps = (nfiles + MAX_DIRECT_MERGE - 1) / MAX_DIRECT_MERGE;
daf34cc
-  tempfiles = (char **) xmalloc (ntemps * sizeof (char *));
daf34cc
-  for (i = 0; i < ntemps; i++)
daf34cc
-    {
daf34cc
-      int nf = MAX_DIRECT_MERGE;
daf34cc
-      if (i + 1 == ntemps)
daf34cc
-        nf = nfiles - i * MAX_DIRECT_MERGE;
daf34cc
-      tempfiles[i] = maketempname (++tempcount);
daf34cc
-      value |= merge_direct (&infiles[i * MAX_DIRECT_MERGE], nf, tempfiles[i]);
daf34cc
-    }
daf34cc
-
daf34cc
-  /* All temporary files that existed before are no longer needed
daf34cc
-     since their contents have been merged into our new tempfiles.
daf34cc
-     So delete them.  */
daf34cc
-  flush_tempfiles (start_tempcount);
daf34cc
-
daf34cc
-  /* Now merge the temporary files we created.  */
daf34cc
-
daf34cc
-  merge_files (tempfiles, ntemps, outfile);
daf34cc
-
daf34cc
-  free (tempfiles);
daf34cc
-
daf34cc
-  return value;
daf34cc
-}
daf34cc
-
daf34cc
-/* Assume (and optionally verify) that each input file is sorted;
daf34cc
-   merge them and output the result.
daf34cc
-   Returns nonzero if any input file fails to be sorted.
daf34cc
-
daf34cc
-   This version of merging will not work if the number of
daf34cc
-   input files gets too high.  Higher level functions
daf34cc
-   use it only with a bounded number of input files.  */
daf34cc
-
daf34cc
-int
daf34cc
-merge_direct (char **infiles, int nfiles, char *outfile)
daf34cc
-{
daf34cc
-  struct linebuffer *lb1, *lb2;
daf34cc
-  struct linebuffer **thisline, **prevline;
daf34cc
-  FILE **streams;
daf34cc
-  int i;
daf34cc
-  int nleft;
daf34cc
-  int lossage = 0;
daf34cc
-  int *file_lossage;
daf34cc
-  struct linebuffer *prev_out = 0;
daf34cc
-  FILE *ostream = stdout;
daf34cc
-
daf34cc
-  if (outfile)
daf34cc
-    {
daf34cc
-      ostream = fopen (outfile, "w");
daf34cc
-    }
daf34cc
-  if (!ostream)
daf34cc
-    pfatal_with_name (outfile);
daf34cc
-
daf34cc
-  init_index ();
daf34cc
-
daf34cc
-  if (nfiles == 0)
daf34cc
-    {
daf34cc
-      if (outfile)
daf34cc
-        fclose (ostream);
daf34cc
-      return 0;
daf34cc
-    }
daf34cc
-
daf34cc
-  /* For each file, make two line buffers.  Also, for each file, there
daf34cc
-     is an element of `thisline' which points at any time to one of the
daf34cc
-     file's two buffers, and an element of `prevline' which points to
daf34cc
-     the other buffer.  `thisline' is supposed to point to the next
daf34cc
-     available line from the file, while `prevline' holds the last file
daf34cc
-     line used, which is remembered so that we can verify that the file
daf34cc
-     is properly sorted. */
daf34cc
-
daf34cc
-  /* lb1 and lb2 contain one buffer each per file. */
daf34cc
-  lb1 = (struct linebuffer *) xmalloc (nfiles * sizeof (struct linebuffer));
daf34cc
-  lb2 = (struct linebuffer *) xmalloc (nfiles * sizeof (struct linebuffer));
daf34cc
-
daf34cc
-  /* thisline[i] points to the linebuffer holding the next available
daf34cc
-     line in file i, or is zero if there are no lines left in that file.  */
daf34cc
-  thisline = (struct linebuffer **)
daf34cc
-    xmalloc (nfiles * sizeof (struct linebuffer *));
daf34cc
-  /* prevline[i] points to the linebuffer holding the last used line
daf34cc
-     from file i.  This is just for verifying that file i is properly
daf34cc
-     sorted.  */
daf34cc
-  prevline = (struct linebuffer **)
daf34cc
-    xmalloc (nfiles * sizeof (struct linebuffer *));
daf34cc
-  /* streams[i] holds the input stream for file i.  */
daf34cc
-  streams = (FILE **) xmalloc (nfiles * sizeof (FILE *));
daf34cc
-  /* file_lossage[i] is nonzero if we already know file i is not
daf34cc
-     properly sorted.  */
daf34cc
-  file_lossage = (int *) xmalloc (nfiles * sizeof (int));
daf34cc
-
daf34cc
-  /* Allocate and initialize all that storage. */
daf34cc
-
daf34cc
-  for (i = 0; i < nfiles; i++)
daf34cc
-    {
daf34cc
-      initbuffer (&lb1[i]);
daf34cc
-      initbuffer (&lb2[i]);
daf34cc
-      thisline[i] = &lb1[i];
daf34cc
-      prevline[i] = &lb2[i];
daf34cc
-      file_lossage[i] = 0;
daf34cc
-      streams[i] = fopen (infiles[i], "r");
daf34cc
-      if (!streams[i])
daf34cc
-        pfatal_with_name (infiles[i]);
daf34cc
-
daf34cc
-      readline (thisline[i], streams[i]);
daf34cc
-    }
daf34cc
-
daf34cc
-  /* Keep count of number of files not at eof. */
daf34cc
-  nleft = nfiles;
daf34cc
-
daf34cc
-  while (nleft)
daf34cc
-    {
daf34cc
-      struct linebuffer *best = 0;
daf34cc
-      struct linebuffer *exch;
daf34cc
-      int bestfile = -1;
daf34cc
-      int i;
daf34cc
-
daf34cc
-      /* Look at the next avail line of each file; choose the least one.  */
daf34cc
-
daf34cc
-      for (i = 0; i < nfiles; i++)
daf34cc
-        {
daf34cc
-          if (thisline[i] &&
daf34cc
-              (!best ||
daf34cc
-               0 < compare_general (best->buffer, thisline[i]->buffer,
daf34cc
-                                 (long) bestfile, (long) i, num_keyfields)))
daf34cc
-            {
daf34cc
-              best = thisline[i];
daf34cc
-              bestfile = i;
daf34cc
-            }
daf34cc
-        }
daf34cc
-
daf34cc
-      /* Output that line, unless it matches the previous one and we
daf34cc
-         don't want duplicates. */
daf34cc
-
daf34cc
-      if (!(prev_out &&
daf34cc
-            !compare_general (prev_out->buffer,
daf34cc
-                              best->buffer, 0L, 1L, num_keyfields - 1)))
daf34cc
-        indexify (best->buffer, ostream);
daf34cc
-      prev_out = best;
daf34cc
-
daf34cc
-      /* Now make the line the previous of its file, and fetch a new
daf34cc
-         line from that file.  */
daf34cc
-
daf34cc
-      exch = prevline[bestfile];
daf34cc
-      prevline[bestfile] = thisline[bestfile];
daf34cc
-      thisline[bestfile] = exch;
daf34cc
-
daf34cc
-      while (1)
daf34cc
-        {
daf34cc
-          /* If the file has no more, mark it empty. */
daf34cc
-
daf34cc
-          if (feof (streams[bestfile]))
daf34cc
-            {
daf34cc
-              thisline[bestfile] = 0;
daf34cc
-              /* Update the number of files still not empty. */
daf34cc
-              nleft--;
daf34cc
-              break;
daf34cc
-            }
daf34cc
-          readline (thisline[bestfile], streams[bestfile]);
daf34cc
-          if (thisline[bestfile]->buffer[0] || !feof (streams[bestfile]))
daf34cc
-            break;
daf34cc
-        }
daf34cc
-    }
daf34cc
-
daf34cc
-  finish_index (ostream);
daf34cc
-
daf34cc
-  /* Free all storage and close all input streams. */
daf34cc
-
daf34cc
-  for (i = 0; i < nfiles; i++)
daf34cc
-    {
daf34cc
-      fclose (streams[i]);
daf34cc
-      free (lb1[i].buffer);
daf34cc
-      free (lb2[i].buffer);
daf34cc
-    }
daf34cc
-  free (file_lossage);
daf34cc
-  free (lb1);
daf34cc
-  free (lb2);
daf34cc
-  free (thisline);
daf34cc
-  free (prevline);
daf34cc
-  free (streams);
daf34cc
-
daf34cc
-  if (outfile)
daf34cc
-    fclose (ostream);
daf34cc
-
daf34cc
-  return lossage;
daf34cc
-}
daf34cc
-
daf34cc
 /* Print error message and exit.  */
daf34cc
 
daf34cc
 void