Changes for TEX-MAKE.C by Andreas Scherer, April 4, 1995.

@x l.25
#include <kpathsea/tex-make.h>
@y
#include <kpathsea/andytex-make.h>
@z

@x l.49
  /* kpse_mf_format */		{ false, "MakeTeXMF", NULL },
@y
  /* kpse_mf_format */		{ false, "MakeTeXMF", NULL },
  /* kpse_mp_format */		{ false, NULL, NULL },
@z

There is no `pipe' mechanism for Amiga.  :-(
But there is `CallMF 2.0' for automatic font generation.  :-)

@x l.68
      FILE *f;
@y
#ifndef _AMIGA
      FILE *f;
#endif /* _AMIGA */
@z

@x l.86
      /* Run the script and prepare to read the output.  */
      f = popen (cmd, FOPEN_R_MODE);
      
      free (PROG);
      free (cmd);
      if (strlen (args) > 0)
        free (args);
      
      if (f)
        {
          int c;
          string fn;             /* The final filename.  */
          unsigned len;          /* And its length.  */
          fn_type output;
          output = fn_init ();   /* Collect the script output.  */
          
          /* Read all the output and terminate with a null.  */
          while ((c = getc (f)) != EOF)
            fn_1grow (&output, c);
          fn_1grow (&output, 0);
          
          /* Maybe should check for `EXIT_SUCCESS' status before even
             looking at the output?  */
          if (pclose (f) == -1)
            FATAL_PERROR (cmd);
          
          len = FN_LENGTH (output);
          fn = FN_STRING (output);
          
          /* Remove trailing newlines and returns.  */
          while (len > 1 && (fn[len - 2] == '\n' || fn[len - 2] == '\r'))
            {
              fn[len - 2] = 0;
              len--;
            }

          /* If no output from script, return NULL.  Otherwise check
             what it output.  */
          ret = len == 1 ? NULL : kpse_readable_file (fn);
          
          /* Free the name if we're not returning it.  */
          if (fn != ret)
            free (fn);
        }
      else
@y
#ifndef _AMIGA
      /* Run the script and prepare to read the output.  */
      f = popen (cmd, FOPEN_R_MODE);
      
      free (PROG);
      free (cmd);
      if (strlen (args) > 0)
        free (args);
      
      if (f)
        {
          int c;
          string fn;             /* The final filename.  */
          unsigned len;          /* And its length.  */
          fn_type output;
          output = fn_init ();   /* Collect the script output.  */
          
          /* Read all the output and terminate with a null.  */
          while ((c = getc (f)) != EOF)
            fn_1grow (&output, c);
          fn_1grow (&output, 0);
          
          /* Maybe should check for `EXIT_SUCCESS' status before even
             looking at the output?  */
          if (pclose (f) == -1)
            FATAL_PERROR (cmd);
          
          len = FN_LENGTH (output);
          fn = FN_STRING (output);
          
          /* Remove trailing newlines and returns.  */
          while (len > 1 && (fn[len - 2] == '\n' || fn[len - 2] == '\r'))
            {
              fn[len - 2] = 0;
              len--;
            }

          /* If no output from script, return NULL.  Otherwise check
             what it output.  */
          ret = len == 1 ? NULL : kpse_readable_file (fn);
          
          /* Free the name if we're not returning it.  */
          if (fn != ret)
            free (fn);
        }
      else
#endif /* _AMIGA */
@z
