Loading src/fits/fitsutil.c +9 −10 Original line number Original line Diff line number Diff line Loading @@ -181,7 +181,7 @@ OUTPUT RETURN_OK if something was found, RETURN_ERROR otherwise. NOTES -. NOTES -. AUTHOR E. Bertin (IAP), AUTHOR E. Bertin (IAP), E.R. Deul - Handling of NaN E.R. Deul - Handling of NaN VERSION 04/06/2007 VERSION 18/05/2009 ***/ ***/ int fitspick(char *fitsline, char *keyword, void *ptr, h_type *htype, int fitspick(char *fitsline, char *keyword, void *ptr, h_type *htype, t_type *ttype, char *comment) t_type *ttype, char *comment) Loading Loading @@ -252,20 +252,20 @@ int fitspick(char *fitsline, char *keyword, void *ptr, h_type *htype, { { for (i=j; i<80 && fitsline[i]!=(char)'/' && fitsline[i]!=(char)'.'; i++); for (i=j; i<80 && fitsline[i]!=(char)'/' && fitsline[i]!=(char)'.'; i++); /*-- Handle floats*/ /*-- Handle floats*/ if (fitsline[i]==(char)'.') if (i==80 || fitsline[i]!=(char)'.') { fixexponent(fitsline); *((double *)ptr) = atof(fitsline+j); *htype = H_EXPO; *ttype = T_DOUBLE; } else /*---- Handle ints*/ /*---- Handle ints*/ { { *((int *)ptr) = atoi(fitsline+j); *((int *)ptr) = atoi(fitsline+j); *htype = H_INT; *htype = H_INT; *ttype = T_LONG; *ttype = T_LONG; } } else { fixexponent(fitsline); *((double *)ptr) = atof(fitsline+j); *htype = H_EXPO; *ttype = T_DOUBLE; } } } /*Store comment if it is found*/ /*Store comment if it is found*/ Loading Loading @@ -340,7 +340,6 @@ int fitsread(char *fitsbuf, char *keyword, void *ptr, h_type htype, sscanf(str+10, " %lf", (double *)ptr); sscanf(str+10, " %lf", (double *)ptr); else else sscanf(str+10, " %f", (float *)ptr); sscanf(str+10, " %f", (float *)ptr); printf("%80s\n", str); break; break; case H_BOOL: sscanf(str+10, "%1s", s); case H_BOOL: sscanf(str+10, "%1s", s); Loading Loading
src/fits/fitsutil.c +9 −10 Original line number Original line Diff line number Diff line Loading @@ -181,7 +181,7 @@ OUTPUT RETURN_OK if something was found, RETURN_ERROR otherwise. NOTES -. NOTES -. AUTHOR E. Bertin (IAP), AUTHOR E. Bertin (IAP), E.R. Deul - Handling of NaN E.R. Deul - Handling of NaN VERSION 04/06/2007 VERSION 18/05/2009 ***/ ***/ int fitspick(char *fitsline, char *keyword, void *ptr, h_type *htype, int fitspick(char *fitsline, char *keyword, void *ptr, h_type *htype, t_type *ttype, char *comment) t_type *ttype, char *comment) Loading Loading @@ -252,20 +252,20 @@ int fitspick(char *fitsline, char *keyword, void *ptr, h_type *htype, { { for (i=j; i<80 && fitsline[i]!=(char)'/' && fitsline[i]!=(char)'.'; i++); for (i=j; i<80 && fitsline[i]!=(char)'/' && fitsline[i]!=(char)'.'; i++); /*-- Handle floats*/ /*-- Handle floats*/ if (fitsline[i]==(char)'.') if (i==80 || fitsline[i]!=(char)'.') { fixexponent(fitsline); *((double *)ptr) = atof(fitsline+j); *htype = H_EXPO; *ttype = T_DOUBLE; } else /*---- Handle ints*/ /*---- Handle ints*/ { { *((int *)ptr) = atoi(fitsline+j); *((int *)ptr) = atoi(fitsline+j); *htype = H_INT; *htype = H_INT; *ttype = T_LONG; *ttype = T_LONG; } } else { fixexponent(fitsline); *((double *)ptr) = atof(fitsline+j); *htype = H_EXPO; *ttype = T_DOUBLE; } } } /*Store comment if it is found*/ /*Store comment if it is found*/ Loading Loading @@ -340,7 +340,6 @@ int fitsread(char *fitsbuf, char *keyword, void *ptr, h_type htype, sscanf(str+10, " %lf", (double *)ptr); sscanf(str+10, " %lf", (double *)ptr); else else sscanf(str+10, " %f", (float *)ptr); sscanf(str+10, " %f", (float *)ptr); printf("%80s\n", str); break; break; case H_BOOL: sscanf(str+10, "%1s", s); case H_BOOL: sscanf(str+10, "%1s", s); Loading