mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-03 16:01:18 -05:00
20 lines
323 B
C
20 lines
323 B
C
|
#include <stdio.h>
|
||
|
|
||
|
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);
|
||
|
}
|