- Timestamp:
- Jun 4, 2015, 8:49:25 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/opihi/cmd.data/rd.c
r38340 r38363 8 8 char region[512]; 9 9 Buffer *buf; 10 11 int VERBOSE = FALSE; 12 if ((N = get_argument (argc, argv, "-v"))) { 13 remove_argument (N, &argc, argv); 14 VERBOSE = TRUE; 15 } 10 16 11 17 int JustHead = FALSE; … … 193 199 gfits_copy_header (&buf[0].header, ftable.header); 194 200 195 if (!gfits_fread_ftable_data (f, &ftable, FALSE)) { fprintf (stderr, "problem reading compressed image table data\n"); fclose (f); return FALSE; }196 if (!gfits_byteswap_varlength_column (&ftable, 1)) { fprintf (stderr, "problem doing byteswap on compressed image metadata column\n"); fclose (f); gfits_free_table (&ftable); return FALSE; }197 if (!gfits_uncompress_image (&buf[0].header, &buf[0].matrix, &ftable)) { fprintf (stderr, "problem uncompressing the image data\n"); fclose (f); gfits_free_table (&ftable); return FALSE; }201 if (!gfits_fread_ftable_data (f, &ftable, FALSE)) { gprint (GP_ERR, "problem reading compressed image table data\n"); fclose (f); return FALSE; } 202 if (!gfits_byteswap_varlength_column (&ftable, 1)) { gprint (GP_ERR, "problem doing byteswap on compressed image metadata column\n"); fclose (f); gfits_free_table (&ftable); return FALSE; } 203 if (!gfits_uncompress_image (&buf[0].header, &buf[0].matrix, &ftable)) { gprint (GP_ERR, "problem uncompressing the image data\n"); fclose (f); gfits_free_table (&ftable); return FALSE; } 198 204 199 205 // uncompressing the image leaves the format as an extension … … 238 244 buf[0].unsign = buf[0].header.unsign; 239 245 240 gprint (GP_LOG, "read "OFF_T_FMT" bytes from %s into buffer %s\n", 241 buf[0].header.datasize + buf[0].matrix.datasize, argv[2], argv[1]); 246 if (VERBOSE) gprint (GP_LOG, "read "OFF_T_FMT" bytes from %s into buffer %s\n", buf[0].header.datasize + buf[0].matrix.datasize, argv[2], argv[1]); 242 247 243 248 blank = 0xffff;
Note:
See TracChangeset
for help on using the changeset viewer.
