Changeset 38986 for trunk/Ohana/src/libfits/table/F_read_T.c
- Timestamp:
- Oct 27, 2015, 4:49:06 PM (11 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/libfits/table/F_read_T.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
Property svn:mergeinfo
set to
/branches/eam_branches/ipp-20150625/Ohana merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/libfits/table/F_read_T.c
r38441 r38986 62 62 63 63 /*********************** fits read ftable data ***********************************/ 64 int gfits_fread_ftable_range (FILE *f, int padIfShort, FTable *table, off_t start, off_t Nrows) {64 int gfits_fread_ftable_range (FILE *f, int padIfShort, int noSeek, FTable *table, off_t start, off_t Nrows) { 65 65 66 66 off_t Nbytes, Nread, Nskip, Nx, Ny; … … 79 79 Nskip = start * Nx; 80 80 Nbytes = Nrows * Nx; 81 ALLOCATE (table[0].buffer, char, MAX (Nbytes, 1)); 82 83 fseeko (f, Nskip, SEEK_CUR); 81 82 if (table[0].buffer) { 83 if (table[0].datasize < Nbytes) { 84 REALLOCATE (table[0].buffer, char, MAX (Nbytes, 1)); 85 } 86 } else { 87 ALLOCATE (table[0].buffer, char, MAX (Nbytes, 1)); 88 } 89 90 if (!noSeek) { 91 fseeko (f, Nskip, SEEK_CUR); 92 } 84 93 85 94 Nread = fread (table[0].buffer, sizeof (char), Nbytes, f);
Note:
See TracChangeset
for help on using the changeset viewer.
