home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / toolpack.000 / toolpack / toolpack1.2 / util / mkipf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-04  |  747 b   |  39 lines

  1. #include <stdio.h>
  2.  
  3. main(argc, argv)
  4.  
  5. /* The executable for this program is called mkipf. */
  6. /* mkipf creates the interprocess file IST.CMD used by TIE-conforming */
  7. /* Toolpack tools and fills the tool argument slots in IST.CMD with the */
  8. /* arguments on the script command line.  */
  9. /* Invocation: */
  10.  
  11. /*             mkipf <toolarg1> <toolarg2> ... <toolargn> */
  12.  
  13. /* TIE permits up to 10 toolargs. */
  14.  
  15. int argc;
  16. char *argv[];
  17.  
  18. {
  19.     FILE *fp, *fopen();
  20.     int blanks = 10;
  21.  
  22.     fp = fopen("IST.CMD", "w");
  23.  
  24.     fprintf(fp, "    -2\n");
  25.     fprintf(fp, "dummy\n");
  26.     fprintf(fp, "_.TOOLPACK\n");
  27.     fprintf(fp, "dummy\n");
  28.  
  29.     while(--argc > 0)
  30.         {
  31.         blanks = blanks-1;
  32.           fprintf(fp, "%s\n", *++argv);
  33.         }
  34.  
  35.     while(blanks-- > 0)
  36.           fprintf(fp, "%c\n", ' ');
  37.  
  38. }
  39.