- 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/matrix/F_write_M.c
r16139 r27838 11 11 if (f == NULL) return (FALSE); 12 12 13 fseek (f, 0, SEEK_END); /* write matrix to end of file! */13 fseeko (f, 0LL, SEEK_END); /* write matrix to end of file! */ 14 14 15 15 status = gfits_fwrite_matrix (f, matrix); … … 21 21 int gfits_fwrite_matrix (FILE *f, Matrix *matrix) { 22 22 23 int status, nbytes, Nbytes; 23 int status; 24 off_t nbytes, Nbytes; 24 25 25 26 status = TRUE; … … 27 28 /* this is a bit dangerous: we are not realloc'ing the matrix. 28 29 if the size is wrong, it probably should simply pad the fwrite statement. 29 better policy should be defined (ie, matrix. size always correct blocking?)30 better policy should be defined (ie, matrix.datasize always correct blocking?) 30 31 */ 31 32 32 if (matrix[0]. size % FT_RECORD_SIZE)33 nbytes = FT_RECORD_SIZE * (( int) (matrix[0].size / FT_RECORD_SIZE) + 1);33 if (matrix[0].datasize % FT_RECORD_SIZE) 34 nbytes = FT_RECORD_SIZE * ((off_t) (matrix[0].datasize / FT_RECORD_SIZE) + 1); 34 35 else 35 nbytes = FT_RECORD_SIZE * (( int) (matrix[0].size / FT_RECORD_SIZE));36 nbytes = FT_RECORD_SIZE * ((off_t) (matrix[0].datasize / FT_RECORD_SIZE)); 36 37 37 38 /* this is a bit cumbersome: swap all words, write out file, then swap back... */ 38 39 # ifdef BYTE_SWAP 39 40 { 40 int i;41 off_t i; 41 42 unsigned char *byte0, *byte1, *byte2, *byte3, *byte4, *byte5, *byte6, *byte7, tmp; 42 43 int perpix; … … 96 97 # ifdef BYTE_SWAP 97 98 { 98 int i;99 off_t i; 99 100 unsigned char *byte0, *byte1, *byte2, *byte3, *byte4, *byte5, *byte6, *byte7, tmp; 100 101 int perpix;
Note:
See TracChangeset
for help on using the changeset viewer.
