home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / sercom / fstart.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-09-04  |  407 b   |  26 lines

  1. #include "stdio.h";
  2.  
  3. FILE * fstart(argc, argv)
  4. int argc;
  5. char *argv[];
  6. {
  7. FILE *f;
  8.  
  9.     if (argc < 2) {
  10.         printf("%s \n", "Must give file name");
  11.         return(NULL);
  12.     }
  13.     
  14.     f = fopen(argv[1], "w");    /* Open file for writing */
  15.  
  16.     if (f == NULL) { 
  17.         printf("%s \n", "Cannot open file");
  18.         return(NULL);
  19.     }
  20.  
  21.     return(f);
  22. }
  23.  
  24.  
  25. /* Figure 16.7: FSTART.C: to be linked with DOWNL1 through DOWNL3 */
  26.