Changeset 15733
- Timestamp:
- Dec 5, 2007, 11:26:34 AM (18 years ago)
- Location:
- branches/eam_branch_20071130/Ohana/src/libfits
- Files:
-
- 7 edited
-
header/F_read_H.c (modified) (1 diff)
-
include/gfitsio.h (modified) (1 diff)
-
matrix/F_load_M.c (modified) (1 diff)
-
matrix/F_read_portion.c (modified) (1 diff)
-
matrix/F_read_segment.c (modified) (1 diff)
-
table/F_read_T.c (modified) (4 diffs)
-
table/F_read_TH.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20071130/Ohana/src/libfits/header/F_read_H.c
r15487 r15733 34 34 Nbytes = fread (&header[0].buffer[i*FT_RECORD_SIZE], 35 35 sizeof(char), FT_RECORD_SIZE, f); 36 if (Nbytes != FT_RECORD_SIZE) { 37 perror ("fits read error"); 38 } 39 36 40 header[0].size += Nbytes; 37 41 if (Nbytes != FT_RECORD_SIZE) { -
branches/eam_branch_20071130/Ohana/src/libfits/include/gfitsio.h
r15732 r15733 2 2 3 3 # include <assert.h> 4 # include <errno.h> 4 5 5 6 # ifndef GFITSIO -
branches/eam_branch_20071130/Ohana/src/libfits/matrix/F_load_M.c
r15487 r15733 30 30 31 31 nbytes = fread (matrix[0].buffer, sizeof(char), Nbytes, f); 32 if (nbytes != Nbytes) { 33 perror ("fits matrix read error"); 34 } 32 35 33 36 # ifdef BYTE_SWAP -
branches/eam_branch_20071130/Ohana/src/libfits/matrix/F_read_portion.c
r7054 r15733 47 47 fseek (f, header.size + Nskip, SEEK_SET); 48 48 nbytes = fread (matrix[0].buffer, sizeof(char), Nbytes, f); 49 if (nbytes != Nbytes) { 50 perror ("fits matrix read error"); 51 } 52 49 53 fclose (f); 50 54 -
branches/eam_branch_20071130/Ohana/src/libfits/matrix/F_read_segment.c
r13039 r15733 90 90 fseek (f, Nskip, SEEK_CUR); 91 91 nbytes = fread (matrix[0].buffer, sizeof(char), Nbytes, f); 92 if (nbytes != Nbytes) { 93 perror ("fits matrix read error"); 94 } 95 92 96 matrix[0].size = Nbytes; 93 97 -
branches/eam_branch_20071130/Ohana/src/libfits/table/F_read_T.c
r15732 r15733 59 59 Nread = fread (table[0].buffer, sizeof (char), Nbytes, f); 60 60 if (Nread != Nbytes) { 61 perror ("fits read error"); 61 62 gfits_free_table (table); 62 63 return (FALSE); … … 84 85 85 86 fseek (f, Nskip, SEEK_CUR); 87 fprintf (stderr, "file is at %ld\n", ftell(f)); 88 86 89 Nread = fread (buffer, sizeof (char), Nbytes, f); 87 90 if (Nread != Nbytes) { 91 perror ("fits read error"); 88 92 free (buffer); 89 93 return (FALSE); … … 120 124 Nread = fread (buffer, sizeof (char), Nbytes, f); 121 125 if (Nread != Nbytes) { 126 perror ("fits read error"); 122 127 free (buffer); 123 128 return (FALSE); … … 178 183 fseek (f, offset, SEEK_SET); 179 184 Nread = fread (table[0].buffer[i], sizeof (char), Nx, f); 180 if (Nread != Nx) { return (FALSE); } 185 if (Nread != Nx) { 186 perror ("fits read error"); 187 return (FALSE); 188 } 181 189 } 182 190 -
branches/eam_branch_20071130/Ohana/src/libfits/table/F_read_TH.c
r15487 r15733 46 46 Nbytes = fread (&Theader[0].buffer[i*FT_RECORD_SIZE], 47 47 sizeof(char), FT_RECORD_SIZE, f); 48 if (Nbytes != FT_RECORD_SIZE) { 49 perror ("fits matrix read error"); 50 } 51 48 52 Theader[0].size += Nbytes; 49 53 if (Nbytes != FT_RECORD_SIZE)
Note:
See TracChangeset
for help on using the changeset viewer.
