Changeset 7054 for trunk/Ohana/src/libfits/table/F_table_row.c
- Timestamp:
- May 3, 2006, 12:01:09 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libfits/table/F_table_row.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/table/F_table_row.c
r7039 r7054 3 3 4 4 /*********************** fits table column ****************************/ 5 int fits_add_rows (FTable *table, char *data, int Nrow, int Nbytes) {5 int gfits_add_rows (FTable *table, char *data, int Nrow, int Nbytes) { 6 6 7 7 int Nx, Ny; … … 11 11 header = table[0].header; 12 12 13 fits_scan (header, "NAXIS1", "%d", 1, &Nx);14 fits_scan (header, "NAXIS2", "%d", 1, &Ny);13 gfits_scan (header, "NAXIS1", "%d", 1, &Nx); 14 gfits_scan (header, "NAXIS2", "%d", 1, &Ny); 15 15 16 16 if (header[0].Naxis[1] != Ny) return (FALSE); … … 23 23 Ny += Nrow; 24 24 header[0].Naxis[1] = Ny; 25 fits_modify (header, "NAXIS2", "%d", 1, Ny);25 gfits_modify (header, "NAXIS2", "%d", 1, Ny); 26 26 27 nbytes = fits_matrix_size (header);27 nbytes = gfits_matrix_size (header); 28 28 REALLOCATE (table[0].buffer, char, MAX (nbytes, 1)); 29 29 table[0].size = nbytes; … … 35 35 36 36 /*********************** fits add (real) rows to virtual table ****************************/ 37 int fits_vadd_rows (VTable *table, char *data, int Nrow, int Nbytes) {37 int gfits_vadd_rows (VTable *table, char *data, int Nrow, int Nbytes) { 38 38 39 39 int i, Nx, Ny; … … 43 43 header = table[0].header; 44 44 45 fits_scan (header, "NAXIS1", "%d", 1, &Nx);46 fits_scan (header, "NAXIS2", "%d", 1, &Ny);45 gfits_scan (header, "NAXIS1", "%d", 1, &Nx); 46 gfits_scan (header, "NAXIS2", "%d", 1, &Ny); 47 47 48 48 if (header[0].Naxis[1] != Ny) return (FALSE); … … 64 64 Ny += Nrow; 65 65 header[0].Naxis[1] = Ny; 66 fits_modify (header, "NAXIS2", "%d", 1, Ny);66 gfits_modify (header, "NAXIS2", "%d", 1, Ny); 67 67 68 table[0].size = fits_matrix_size (table[0].header);68 table[0].size = gfits_matrix_size (table[0].header); 69 69 table[0].pad = table[0].size - Nx*Ny; 70 70 … … 73 73 74 74 /*********************** fits table column ****************************/ 75 int fits_delete_rows (FTable *table, int Nstart, int Nrow) {75 int gfits_delete_rows (FTable *table, int Nstart, int Nrow) { 76 76 77 77 int Nx, Ny, N0, N1, N2; … … 81 81 header = table[0].header; 82 82 83 fits_scan (header, "NAXIS1", "%d", 1, &Nx);84 fits_scan (header, "NAXIS2", "%d", 1, &Ny);83 gfits_scan (header, "NAXIS1", "%d", 1, &Nx); 84 gfits_scan (header, "NAXIS2", "%d", 1, &Ny); 85 85 86 86 if (header[0].Naxis[1] != Ny) return (FALSE); … … 97 97 Ny -= Nrow; 98 98 header[0].Naxis[1] = Ny; 99 fits_modify (header, "NAXIS2", "%d", 1, Ny);99 gfits_modify (header, "NAXIS2", "%d", 1, Ny); 100 100 101 nbytes = fits_matrix_size (header);101 nbytes = gfits_matrix_size (header); 102 102 REALLOCATE (table[0].buffer, char, MAX (nbytes, 1)); 103 103 table[0].size = nbytes;
Note:
See TracChangeset
for help on using the changeset viewer.
