IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2005, 9:20:18 PM (21 years ago)
Author:
eugene
Message:

working to mosaic astrom

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/table/F_table_format.c

    r2415 r3400  
    5454int fits_table_format (char *format, char *type, int *Nval, int *Nbytes) {
    5555
    56   char Fchar, foo[80], bar;
     56  char Fchar, Size[80], Type;
    5757  int Nv;
    5858
     
    6464  if (Nv == 0) {
    6565    Nv = 1;
    66     strcpy (foo, "1");
     66    strcpy (Size, "1");
    6767  } else {
    68     strcpy (foo, &format[1]);
     68    strcpy (Size, &format[1]);
    6969  }
    70 
    71   if (Fchar == 'F') { *Nbytes = 1;  strcpy (type, "float");  bar = 'f'; *Nval = Nv; }
    72   if (Fchar == 'I') { *Nbytes = 1;  strcpy (type, "int");    bar = 'd'; *Nval = Nv; }
    73   if (Fchar == 'A') { *Nbytes = 1;  strcpy (type, "char");   bar = 's'; *Nval = Nv; }
     70 
     71  Type = 'x';
     72  if (Fchar == 'F') { *Nbytes = 1;  strcpy (type, "float");  Type = 'f'; *Nval = Nv; }
     73  if (Fchar == 'I') { *Nbytes = 1;  strcpy (type, "int");    Type = 'd'; *Nval = Nv; }
     74  if (Fchar == 'A') { *Nbytes = 1;  strcpy (type, "char");   Type = 's'; *Nval = Nv; }
    7475  if (!*Nbytes) { return (FALSE); }
    7576 
    76   sprintf (format, "%%-%s%c", foo, bar);
     77  sprintf (format, "%%-%s%c", Size, Type);
    7778
    7879  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.