/* This program takes a long argument list, such as can be
passed by the dgjpp version of gnu make, and writes it out
to a file "arglist.tmp", one argument per line.

To compile:

   gcc -o arglist.exe arglist.c

Note: this is djgpp-specific; it is intended for use with a
perl script, djgpp make, and a program like tlink that can
use response files, to get around the MSDOS 128-character
command line limit.

*/
#include <stdio.h>


int main(int argc, char **argv)
{
   FILE *fp;
   int i;

   fp = fopen("arglist.tmp", "w");
   if (fp == NULL)
   {
      printf("Error: can't open arglist.tmp\n");
      exit(-1);
   }

   for (i = 1; i < argc; i++)
   {
      fputs(argv[i], fp);
      fputs("\n", fp);
   }
   fclose(fp);
   return(0);
}

