Changeset 12555 for trunk/psLib/src/fits/psFits.c
- Timestamp:
- Mar 22, 2007, 2:34:52 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/fits/psFits.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFits.c
r12549 r12555 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.6 3$ $Name: not supported by cvs2svn $10 * @date $Date: 2007-03-2 2 21:40:47$9 * @version $Revision: 1.64 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2007-03-23 00:34:52 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 65 65 return false; 66 66 } 67 } 68 67 fits->fd = NULL; 68 } 69 69 return true; 70 70 } … … 72 72 static void fitsFree(psFits* fits) 73 73 { 74 (void)fitsClose(fits); 74 if (!fits) return; 75 if (fits->fd) { 76 fitsClose(fits); 77 } 78 psFree (fits->extword); 75 79 } 76 80 … … 84 88 85 89 bool status = fitsClose(fits); 86 psMemSetDeallocator(fits,NULL);87 90 psFree(fits); 88 91 … … 205 208 PS_ASSERT_PTR_NON_NULL(extword, false); 206 209 207 int status = 0;208 210 int hdutype = 0; 209 211 char name[MAX_STRING_LENGTH]; … … 212 214 for (int i = 1; true; i++) { 213 215 // are we able to read the next HDU? 216 217 int status = 0; 214 218 if (fits_movabs_hdu(fits->fd, i, &hdutype, &status)) { 215 219 char fitsErr[MAX_STRING_LENGTH]; … … 220 224 return false; 221 225 } 222 // is there a keyword called 'extword'? 223 if (fits_read_key_str(fits->fd, (char *)extword, name, NULL, &status)) { 226 // is there a keyword called 'extword'? (read as string regardless of type) 227 status = 0; 228 if (fits_read_keyword(fits->fd, (char *)extword, name, NULL, &status)) { 224 229 continue; 225 230 }
Note:
See TracChangeset
for help on using the changeset viewer.
