Changeset 37412 for trunk/Ohana/src/libdvo
- Timestamp:
- Sep 19, 2014, 4:41:20 PM (12 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/libdvo/src/coordops.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
- Property svn:mergeinfo changed
-
trunk/Ohana/src/libdvo/src/coordops.c
r36490 r37412 595 595 596 596 if (status) { 597 if (!gfits_scan (header, "EQUINOX", "%lf", 1, &equinox)) { 598 if (!gfits_scan (header, "EPOCH", "%lf", 1, &equinox)) { 599 equinox = 2000.0; 597 char equinoxString[80]; 598 int haveEquinox = gfits_scan (header, "EQUINOX", "%s", 1, equinoxString); 599 if (haveEquinox) { 600 // is the string a valid number (it is bad to interpret an error message as year 0.0) 601 char *endptr; 602 equinox = strtod (equinoxString, &endptr); 603 if (endptr == equinoxString) haveEquinox = FALSE; 604 } 605 if (!haveEquinox) { 606 haveEquinox = gfits_scan (header, "EPOCH", "%s", 1, equinoxString); 607 if (haveEquinox) { 608 // is the string a valid number (it is bad to interpret an error message as year 0.0) 609 char *endptr; 610 equinox = strtod (equinoxString, &endptr); 611 if (endptr == equinoxString) haveEquinox = FALSE; 600 612 } 613 } 614 if (!haveEquinox) { 615 equinox = 2000.0; 601 616 } 602 617 if (fabs (equinox - 2000.0) > 0.1) {
Note:
See TracChangeset
for help on using the changeset viewer.
