From 59509153ec8de1dc8ce126798f734bc91ce535ee Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 11 Jan 2007 21:52:54 +0000 Subject: [PATCH] git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@343 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- rfile3.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 rfile3.c diff --git a/rfile3.c b/rfile3.c new file mode 100644 index 000000000..0233cd664 --- /dev/null +++ b/rfile3.c @@ -0,0 +1,22 @@ +#include + +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); +}