- 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/table/F_set_column.c
r16139 r27838 16 16 17 17 /***********************/ 18 int gfits_set_bintable_column (Header *header, FTable *table, char *label, void *data, int Nrow) { 19 20 int i, N, Nfields, Nval, Nbytes, Nx, Ny, nbytes, Nstart, Nv, Nb; 18 int gfits_set_bintable_column (Header *header, FTable *table, char *label, void *data, off_t Nrow) { 19 20 off_t Nx, Ny, nbytes; 21 int i, N, Nfields; 22 int Nval, Nbytes, Nstart, Nv, Nb; 21 23 char tlabel[80], field[80], format[80], type[16], tmpline[16]; 22 24 char *Pin, *Pout, *array; … … 47 49 48 50 /* check existing table dimensions */ 49 gfits_scan (header, "NAXIS1", "%d", 1,&Nx);50 gfits_scan (header, "NAXIS2", "%d", 1,&Ny);51 gfits_scan (header, "NAXIS1", "%lld", 1, (long long *) &Nx); 52 gfits_scan (header, "NAXIS2", "%lld", 1, (long long *) &Ny); 51 53 if (Ny == 0) { 52 54 Ny = Nrow; 53 55 header[0].Naxis[1] = Ny; 54 gfits_modify (header, "NAXIS2", "%d", 1,Ny);56 gfits_modify (header, "NAXIS2", "%lld", 1, (long long) Ny); 55 57 56 58 nbytes = gfits_data_size (header); 57 59 REALLOCATE (table[0].buffer, char, MAX (nbytes, 1)); 58 60 bzero (table[0].buffer, nbytes); 59 table[0]. size = nbytes;61 table[0].datasize = nbytes; 60 62 } 61 63 if (Ny != Nrow) return (FALSE); … … 151 153 152 154 /***********************/ 153 int gfits_set_table_column (Header *header, FTable *table, char *label, void *data, int Nrow) { 154 155 int i, N, Nfields, Nval, Nbytes, Nx, Ny, nbytes, Nstart, Nv, Nb; 155 int gfits_set_table_column (Header *header, FTable *table, char *label, void *data, off_t Nrow) { 156 157 off_t Nx, Ny, nbytes; 158 int i, N, Nfields, Nval, Nbytes, Nstart, Nv, Nb; 156 159 char tlabel[80], field[80], format[80], cformat[80], type[16], tmp[16]; 157 160 char *array, *Pin, *Pout, *line; … … 178 181 179 182 /* check existing table dimensions */ 180 gfits_scan (header, "NAXIS1", "%d", 1,&Nx);181 gfits_scan (header, "NAXIS2", "%d", 1,&Ny);183 gfits_scan (header, "NAXIS1", "%lld", 1, (long long *) &Nx); 184 gfits_scan (header, "NAXIS2", "%lld", 1, (long long *) &Ny); 182 185 if (Ny == 0) { 183 186 Ny = Nrow; 184 187 header[0].Naxis[1] = Ny; 185 gfits_modify (header, "NAXIS2", "%d", 1,Ny);188 gfits_modify (header, "NAXIS2", "%lld", 1, (long long) Ny); 186 189 187 190 nbytes = gfits_data_size (header); 188 191 REALLOCATE (table[0].buffer, char, MAX (nbytes, 1)); 189 192 bzero (table[0].buffer, nbytes); 190 table[0]. size = nbytes;193 table[0].datasize = nbytes; 191 194 } 192 195 if (Ny != Nrow) return (FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.
