Changeset 34692
- Timestamp:
- Nov 24, 2012, 4:07:15 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120905/Ohana/src/libdvo/src
- Files:
-
- 2 edited
-
dvo_catalog_split.c (modified) (3 diffs)
-
fits_db.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905/Ohana/src/libdvo/src/dvo_catalog_split.c
r33963 r34692 83 83 return (FALSE); 84 84 } 85 off_t fullsize = catalog->header.datasize; 85 86 86 87 // write the PHU matrix; this is probably a NOP, do I have to keep it in? … … 91 92 return (FALSE); 92 93 } 94 fullsize += matrix.datasize; 93 95 gfits_free_matrix (&matrix); 94 96 … … 98 100 return (FALSE); 99 101 } 102 fullsize += ftable->datasize + ftable->header->datasize; 103 104 // if the output file will be completely re-written, truncate to total datasize 105 if ((start == 0) && (Nrows == Ntotal)) { 106 int fd = fileno (catalog->f); 107 if (ftruncate (fd, fullsize)) { 108 perror ("dvo_catalog_save_subset: "); 109 return (FALSE); 110 } 111 } 112 100 113 return (TRUE); 101 114 } -
branches/eam_branches/ipp-20120905/Ohana/src/libdvo/src/fits_db.c
r29938 r34692 159 159 make_backup (db[0].filename); 160 160 Fseek (db[0].f, 0, SEEK_SET); 161 162 int fd = fileno (db->f); 163 if (ftruncate (fd, 0)) { 164 perror ("gfits_db_save: "); 165 return (FALSE); 166 } 161 167 162 168 if (!gfits_fwrite_header (db[0].f, &db[0].header)) {
Note:
See TracChangeset
for help on using the changeset viewer.
