diff --git a/wfile3.c b/wfile3.c new file mode 100644 index 000000000..2c32fa803 --- /dev/null +++ b/wfile3.c @@ -0,0 +1,19 @@ +#include + +void wfile3_(char *outfile, char buf[], int *nbytes0) +{ + int n,nbytes; + static int first=1; + static FILE *fp=NULL; + + nbytes=*nbytes0; + fp = fopen(outfile,"wb"); + if(fp == NULL) { + printf("Cannot create %s\n",outfile); + exit(0); + } + + n=fwrite(buf,1,nbytes,fp); + fclose(fp); + return(n); +}