diff --git a/frequencies.txt b/frequencies.txt index 819f5ea..984ac3b 100644 --- a/frequencies.txt +++ b/frequencies.txt @@ -311,3 +311,6 @@ 39765 2279.406 36037 2235.009 25544 143.050 +35938 2279.671 +39497 2276.036 +26958 2223.014 diff --git a/rfinfo.c b/rfinfo.c index d572406..e2b6fbe 100644 --- a/rfinfo.c +++ b/rfinfo.c @@ -6,14 +6,21 @@ int main(int argc,char *argv[]) { int i,firstfile=1,status; FILE *file; - char header[256],filename[128],nfd[32]; + char header[256],filename[128],nfd[32],fileroot[128]; double freq,samp_rate; float length; int nchan; + if (strchr(argv[1],'_')!=NULL) { + strncpy(fileroot,argv[1],strlen(argv[1])-11); + fileroot[strlen(argv[1])-11]='\0'; + } else { + strcpy(fileroot,argv[1]); + } + // Open first file for (i=0;;i++) { - sprintf(filename,"%s_%06d.bin",argv[1],i); + sprintf(filename,"%s_%06d.bin",fileroot,i); file=fopen(filename,"r"); // Break if file does not exist