- Timestamp:
- Oct 27, 2015, 8:39:54 PM (11 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 7 edited
-
libfits (modified) (1 prop)
-
libfits/header/F_read_H.c (modified) (1 diff)
-
libfits/include/gfitsio.h (modified) (1 diff)
-
libfits/matrix/F_uncompress_M.c (modified) (2 diffs)
-
libfits/table/F_create_TH.c (modified) (1 diff)
-
opihi/cmd.astro (modified) (1 prop)
-
opihi/cmd.data/read_vectors.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits
-
Property svn:mergeinfo
set to
/branches/eam_branches/ipp-20150625/Ohana/src/libfits merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/libfits/header/F_read_H.c
r28278 r38989 85 85 gfits_scan (header, "NAXIS10", OFF_T_FMT, 1, &header[0].Naxis[9]); 86 86 87 if (!gfits_scan (header, "PCOUNT", "%d", 1, &header[0].pcount)) {87 if (!gfits_scan (header, "PCOUNT", OFF_T_FMT, 1, &header[0].pcount)) { 88 88 header[0].pcount = 0; 89 89 } -
trunk/Ohana/src/libfits/include/gfitsio.h
r38986 r38989 46 46 off_t Naxis[FT_MAX_NAXES]; 47 47 off_t datasize; 48 intpcount;48 off_t pcount; 49 49 int gcount; 50 50 double bzero; -
trunk/Ohana/src/libfits/matrix/F_uncompress_M.c
r38441 r38989 161 161 162 162 // we may have an uncompressed PCOUNT / GCOUNT value, otherwise set to 0,1 163 if (gfits_scan (header, "ZPCOUNT", "%d", 1, &header->pcount)) {163 if (gfits_scan (header, "ZPCOUNT", OFF_T_FMT, 1, &header->pcount)) { 164 164 gfits_delete (header, "ZPCOUNT", 1); 165 gfits_modify (header, "PCOUNT", "%d", 1, header->pcount);165 gfits_modify (header, "PCOUNT", OFF_T_FMT, 1, header->pcount); 166 166 } else { 167 167 header->pcount = 0; 168 gfits_modify (header, "PCOUNT", "%d", 1, header->pcount);168 gfits_modify (header, "PCOUNT", OFF_T_FMT, 1, header->pcount); 169 169 } 170 170 if (gfits_scan (header, "ZGCOUNT", "%d", 1, &header->gcount)) { … … 178 178 header->pcount = 0; 179 179 header->gcount = 1; 180 gfits_modify (header, "PCOUNT", "%d", 1, header->pcount);180 gfits_modify (header, "PCOUNT", OFF_T_FMT, 1, header->pcount); 181 181 gfits_modify (header, "GCOUNT", "%d", 1, header->gcount); 182 182 } -
trunk/Ohana/src/libfits/table/F_create_TH.c
r38553 r38989 31 31 } 32 32 33 gfits_modify (header, "PCOUNT", "%d", 1, header[0].pcount);33 gfits_modify (header, "PCOUNT", OFF_T_FMT, 1, header[0].pcount); 34 34 gfits_modify (header, "GCOUNT", "%d", 1, header[0].gcount); 35 35 if (!strcmp (type, "IMAGE")) { -
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo set to
-
trunk/Ohana/src/opihi/cmd.data/read_vectors.c
r38986 r38989 190 190 ALLOCATE (buffer, char, 0x10001); 191 191 bzero (buffer, 0x10001); 192 193 /* 192 194 for (i = 0; i < Nskip; i++) { 193 195 if (scan_line_maxlen (f, buffer, 0x10000) == EOF) { … … 197 199 } 198 200 } 201 */ 202 203 int Nline_read = 0; // track number of lines read so far (use to skip lines as well) 199 204 200 205 // we have a working buffer read from the file. we parse the lines in the working buffer 201 206 // until we reach the last chunk without an EOL char. at that point, we shift the start 202 207 // of the last (partial) line to the start of the buffer and re-fill. 208 209 // we treat \n\r pair as a single EOL char to handle mac files: 203 210 204 211 Nstart = 0; // location of the last valid byte in the buffer (start filling here) … … 218 225 c0 = buffer; // c0 always marks the start of a line 219 226 while (bufferStatus) { 220 c1 = strchr (c0, '\n'); // find the end of this current line 227 c1 = strchr (c0, '\n'); // find the end of this current line (also valid for a Mac: \r\n) 221 228 if (!c1) { 222 c1 = strchr (c0, '\r'); // try \r for non-UNIX files (what do we do about a Mac? \n\r?)229 c1 = strchr (c0, '\r'); // try \r for non-UNIX files 223 230 } 224 231 if (c1 == (char *) NULL) { … … 229 236 } 230 237 *c1 = 0; // mark the end of the line 238 Nline_read ++; 239 240 if (Nline_read <= Nskip) { c0 = c1 + 1; continue; } 231 241 232 242 if (*c0 == '#') { c0 = c1 + 1; continue; }
Note:
See TracChangeset
for help on using the changeset viewer.
