IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41433


Ignore:
Timestamp:
Nov 10, 2020, 1:26:09 PM (6 years ago)
Author:
eugene
Message:

small ascii table changes

Location:
trunk/Ohana/src/libfits
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/include/gfitsio.h

    r41422 r41433  
    256256void   *gfits_get_bintable_column_data_raw   PROTO((Header *header, FTable *table, char *label, char *type, off_t *Nrow, int *Ncol, char nativeOrder));
    257257int     gfits_get_table_column         PROTO((Header *header, FTable *table, char *label, void **data));
    258 int     gfits_get_table_column_type    PROTO((Header *header, char *label, char *type));
     258int     gfits_get_table_column_type    PROTO((Header *header, char *label, char *type, int *Nval));
    259259int     gfits_read_ftable              PROTO((char *filename, FTable *table, char *extname));
    260260int     gfits_read_table               PROTO((char *filename, FTable *ftable));
  • trunk/Ohana/src/libfits/table/F_get_column.c

    r41422 r41433  
    318318
    319319/***********************/
    320 int gfits_get_table_column_type (Header *header, char *label, char *type) {
    321 
    322   int i, N, Nfields, Nval, Nbytes;
     320int gfits_get_table_column_type (Header *header, char *label, char *type, int *Nval) {
     321
     322  int i, N, Nfields, Nbytes;
    323323  char tlabel[256], field[256], format[256];
    324324
     
    340340  gfits_scan (header, field, "%s", 1, format);
    341341
    342   if (!gfits_table_format (format, type, &Nval, &Nbytes)) return (FALSE);
     342  if (!gfits_table_format (format, type, Nval, &Nbytes)) return (FALSE);
     343  *Nval = 1;
     344
    343345  return (TRUE);
    344346}
     
    404406    for (i = 0; i < Ny; i++, Pin+=Nx, Pout+=4) {
    405407      memcpy (line, Pin, Nval*Nbytes);
    406       sscanf (line, "%d", (int *)Pout);
     408      sscanf (line, cformat, (int *)Pout);
    407409    }
    408410  }
     
    420422    for (i = 0; i < Ny; i++, Pin+=Nx, Pout+=4) {
    421423      memcpy (line, Pin, Nval*Nbytes);
    422       sscanf (line, "%f", (float *)Pout);
     424      sscanf (line, cformat, (float *)Pout);
    423425    }
    424426  }
  • trunk/Ohana/src/libfits/table/F_table_format.c

    r41422 r41433  
    115115  if (!*Nbytes) { return (FALSE); }
    116116 
    117   // XXXX : check usage:
    118   myAbort ("need to check length");
    119117  sprintf (format, "%%-%s%c", Size, Type); // NOTE: this line is not used
    120118
Note: See TracChangeset for help on using the changeset viewer.