mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 20:28:42 -05:00
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@343 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
ad6ea36de7
commit
9286818715
22
rfile3.c
Normal file
22
rfile3.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void rfile3_(char *infile, char buf[], int *nbytes0)
|
||||
{
|
||||
int n,nbytes;
|
||||
static int first=1;
|
||||
static FILE *fd=NULL;
|
||||
|
||||
nbytes=*nbytes0;
|
||||
if(first) {
|
||||
fd = fopen(infile,"rb");
|
||||
if(fd == NULL) {
|
||||
printf("Cannot open %s\n",infile);
|
||||
exit(0);
|
||||
}
|
||||
first=0;
|
||||
}
|
||||
|
||||
n=fread(buf,1,nbytes,fd);
|
||||
printf("b: %d %d\n",nbytes,n);
|
||||
return(n);
|
||||
}
|
Loading…
Reference in New Issue
Block a user