Skip to content

Commit

Permalink
Put in default value for read_f variable to make the -times file work!
Browse files Browse the repository at this point in the history
  • Loading branch information
ghobbs committed Sep 7, 2011
1 parent a8b6a54 commit 4afdf15
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions plugin/fake_plug.C
Expand Up @@ -61,7 +61,7 @@ extern "C" int graphicalInterface(int argc,char *argv[],pulsar *psr,int *npsr)
char str[MAX_FILELEN],str2[MAX_FILELEN];
double hamax =-1.0;
char random[100];
char read_f;
char read_f=0;
FILE *fout,*fin;
char addCubic[100]="n",temp[100];
char formstr[50]="tempo2";
Expand Down Expand Up @@ -287,22 +287,22 @@ extern "C" int graphicalInterface(int argc,char *argv[],pulsar *psr,int *npsr)
{
if (timesFile==1)
{
if (read_f){
if (fscanf(fin,"%s %Lf %Lf\n",fake_fname,&freq,&mjd)==3)
{
printf("Read %g %f\n",(double)mjd, (double)freq);
endit=0;
}
else
endit=1;
} else{
if (fscanf(fin,"%Lf",&mjd)==1)
{
printf("Read %g\n",(double)mjd);
endit=0;
}
else
endit=1;
if (read_f){
if (fscanf(fin,"%s %Lf %Lf\n",fake_fname,&freq,&mjd)==3)
{
printf("Read %g %f\n",(double)mjd, (double)freq);
endit=0;
}
else
endit=1;
} else{
if (fscanf(fin,"%Lf",&mjd)==1)
{
printf("Read %g\n",(double)mjd);
endit=0;
}
else
endit=1;
}
}
else
Expand Down

0 comments on commit 4afdf15

Please sign in to comment.