From 94a7851539a1d302abc492dc1ed2e9aea2249a54 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 11 Jan 2007 21:53:18 +0000 Subject: [PATCH] git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@344 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- wfile3.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 wfile3.c 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); +}