Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
msc
sextractor
Commits
ad67010b
Commit
ad67010b
authored
May 22, 2009
by
Emmanuel Bertin
Browse files
Included Chiara's MissFITS fix in fitspick().
parent
2e1330bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/fits/fitsutil.c
View file @
ad67010b
...
@@ -181,7 +181,7 @@ OUTPUT RETURN_OK if something was found, RETURN_ERROR otherwise.
...
@@ -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
/0
6
/200
7
VERSION
18
/0
5
/200
9
***/
***/
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
)
...
@@ -252,20 +252,20 @@ int fitspick(char *fitsline, char *keyword, void *ptr, h_type *htype,
...
@@ -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*/
...
@@ -340,7 +340,6 @@ int fitsread(char *fitsbuf, char *keyword, void *ptr, h_type htype,
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment