- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/tap_branches/Ohana/src/libfits/header/F_read_H.c
r15904 r27838 23 23 int gfits_load_header (FILE *f, Header *header) { 24 24 25 int i, done, Nbytes, t1, t2; 25 off_t i, Nbytes; 26 int done, t1, t2; 26 27 char *p; 27 28 28 header[0]. size = 0;29 header[0].datasize = 0; 29 30 done = FALSE; 30 31 ALLOCATE (header[0].buffer, char, 1); … … 32 33 for (i = 0; !done; i++) { 33 34 REALLOCATE (header[0].buffer, char, (i + 1)*FT_RECORD_SIZE); 34 Nbytes = fread (&header[0].buffer[i*FT_RECORD_SIZE], 35 sizeof(char), FT_RECORD_SIZE, f); 35 Nbytes = fread (&header[0].buffer[i*FT_RECORD_SIZE], sizeof(char), FT_RECORD_SIZE, f); 36 36 if (Nbytes != FT_RECORD_SIZE) { 37 37 if (feof(f)) return (FALSE); … … 40 40 } 41 41 42 header[0]. size += Nbytes;42 header[0].datasize += Nbytes; 43 43 44 44 if (i == 0) { … … 60 60 header[0].Naxis[i] = 0; 61 61 62 gfits_scan (header, "SIMPLE", "%t", 1, &header[0].simple);62 gfits_scan_alt (header, "SIMPLE", "%t", 1, &header[0].simple); 63 63 gfits_scan (header, "BITPIX", "%d", 1, &header[0].bitpix); 64 64 gfits_scan (header, "NAXIS", "%d", 1, &header[0].Naxes); 65 65 66 gfits_scan (header, "EXTEND", "%t", 1, &header[0].extend);67 gfits_scan (header, "UNSIGN", "%t", 1, &header[0].unsign);66 gfits_scan_alt (header, "EXTEND", "%t", 1, &header[0].extend); 67 gfits_scan_alt (header, "UNSIGN", "%t", 1, &header[0].unsign); 68 68 gfits_scan (header, "BSCALE", "%lf", 1, &header[0].bscale); 69 69 gfits_scan (header, "BZERO", "%lf", 1, &header[0].bzero); 70 70 71 gfits_scan (header, "NAXIS1", "% d", 1,&header[0].Naxis[0]);72 gfits_scan (header, "NAXIS2", "% d", 1,&header[0].Naxis[1]);73 gfits_scan (header, "NAXIS3", "% d", 1,&header[0].Naxis[2]);74 gfits_scan (header, "NAXIS4", "% d", 1,&header[0].Naxis[3]);75 gfits_scan (header, "NAXIS5", "% d", 1,&header[0].Naxis[4]);76 gfits_scan (header, "NAXIS6", "% d", 1,&header[0].Naxis[5]);77 gfits_scan (header, "NAXIS7", "% d", 1,&header[0].Naxis[6]);78 gfits_scan (header, "NAXIS8", "% d", 1,&header[0].Naxis[7]);79 gfits_scan (header, "NAXIS9", "% d", 1,&header[0].Naxis[8]);80 gfits_scan (header, "NAXIS10", "% d", 1,&header[0].Naxis[9]);71 gfits_scan (header, "NAXIS1", "%lld", 1, (long long *) &header[0].Naxis[0]); 72 gfits_scan (header, "NAXIS2", "%lld", 1, (long long *) &header[0].Naxis[1]); 73 gfits_scan (header, "NAXIS3", "%lld", 1, (long long *) &header[0].Naxis[2]); 74 gfits_scan (header, "NAXIS4", "%lld", 1, (long long *) &header[0].Naxis[3]); 75 gfits_scan (header, "NAXIS5", "%lld", 1, (long long *) &header[0].Naxis[4]); 76 gfits_scan (header, "NAXIS6", "%lld", 1, (long long *) &header[0].Naxis[5]); 77 gfits_scan (header, "NAXIS7", "%lld", 1, (long long *) &header[0].Naxis[6]); 78 gfits_scan (header, "NAXIS8", "%lld", 1, (long long *) &header[0].Naxis[7]); 79 gfits_scan (header, "NAXIS9", "%lld", 1, (long long *) &header[0].Naxis[8]); 80 gfits_scan (header, "NAXIS10", "%lld", 1, (long long *) &header[0].Naxis[9]); 81 81 82 82 if (!gfits_scan (header, "PCOUNT", "%d", 1, &header[0].pcount)) {
Note:
See TracChangeset
for help on using the changeset viewer.
