/*--------------------------*/ /* user initialization code */ /* (may be empty..........) */ /*--------------------------*/ /* get the generic file name */ ubfp = fopen("SKIMFILENAME", "r"); if (ubfp!=NULL) { fgets(skimFileName, 132,ubfp); fclose(ubfp); } else { printf("the skim file name is determined\n"); printf("from the content of \"SKIMFILENAME\"\n"); printf("so this file must be in the directory\n"); printf("\n"); exit(1); }; /* open output file */ ubChunck = 1; strcpy(outfn,skimFileName); outfn[strlen(outfn)-1]=95; /*underscore*/ outfn[strlen(outfn)]=0; /*term*/ sprintf(str, "%2.2i.sda", ubChunck); strcat(outfn,str); fpDisk = open(outfn, O_WRONLY | O_CREAT, 0644); if (fpDisk == -1) { printf("could not open skim file [%s]\n", outfn); return (-1); } else { printf("skim file open [%s]\n", outfn); fflush(stdout); }; i = MAXSKIMFILESIZE; printf("each skimmed file will be ~%i bytes\n", i);