Changeset 2418
- Timestamp:
- Nov 23, 2004, 6:52:51 PM (22 years ago)
- Location:
- trunk/Ohana/src/libfits
- Files:
-
- 3 edited
-
include/fitsio.h (modified) (1 diff)
-
table/F_create_T.c (modified) (1 diff)
-
table/F_read_T.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/include/fitsio.h
r2415 r2418 81 81 int fits_fread_ftable PROTO((FILE *, FTable *, char *)); 82 82 int fits_fread_vtable PROTO((FILE *f, VTable *table, char *extname, int Nrow, int *row)); 83 int fits_fread_ftable_data PROTO((FILE *f, FTable *table)); 83 84 int fits_fwrite_header PROTO((FILE *, Header *)); 84 85 int fits_fwrite_Theader PROTO((FILE *, Header *)); -
trunk/Ohana/src/libfits/table/F_create_T.c
r2415 r2418 28 28 int fits_create_vtable (Header *header, VTable *table, int Nrow) { 29 29 30 int Nbytes;30 int i, Nx, Ny; 31 31 char type[80]; 32 32 -
trunk/Ohana/src/libfits/table/F_read_T.c
r2415 r2418 18 18 int fits_fread_ftable (FILE *f, FTable *table, char *extname) { 19 19 20 int j, found, Nbytes , Nread;20 int j, found, Nbytes; 21 21 Header *header; 22 22 char tname[80]; … … 51 51 52 52 int Nbytes, Nread; 53 char tname[80];54 53 55 54 /* find buffer size */ … … 69 68 int fits_fread_vtable_range (FILE *f, VTable *table, int start, int Nrows) { 70 69 71 int Nbytes, Nread, Nskip, Nx, Ny;72 char tname[80],*buffer;70 int i, Nbytes, Nread, Nskip, Nx, Ny; 71 char *buffer; 73 72 74 73 /* find buffer size */ … … 85 84 ALLOCATE (buffer, char, MAX (Nbytes, 1)); 86 85 87 Fseek (f, Nskip, SEEK_CUR);86 fseek (f, Nskip, SEEK_CUR); 88 87 Nread = fread (buffer, sizeof (char), Nbytes, f); 89 88 if (Nread != Nbytes) { … … 215 214 int fits_fread_header_extname (FILE *f, Header *header, char *extname) { 216 215 216 int Nbytes; 217 217 char current[80]; 218 218 … … 225 225 fseek (f, Nbytes, SEEK_CUR); 226 226 227 while (fits_fread_header (f, &header)) {228 fits_scan ( &header, "EXTNAME", "%s", 1, current);227 while (fits_fread_header (f, header)) { 228 fits_scan (header, "EXTNAME", "%s", 1, current); 229 229 if (!strcmp (current, extname)) return (TRUE); 230 Nbytes = fits_matrix_size ( &header);230 Nbytes = fits_matrix_size (header); 231 231 fseek (f, Nbytes, SEEK_CUR); 232 232 }
Note:
See TracChangeset
for help on using the changeset viewer.
