IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31371


Ignore:
Timestamp:
Apr 25, 2011, 1:41:24 PM (15 years ago)
Author:
bills
Message:

column names in binary tables are to be treated as case-insensitive

Location:
trunk/Ohana/src/libfits/table
Files:
2 edited

Legend:

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

    r28241 r31371  
    3030  tlabel[0] = 0;
    3131  if (!gfits_scan (header, "TFIELDS", "%d", 1, &Nfields)) return (NULL);
    32   for (i = 1; strcmp (label, tlabel) && (i < Nfields + 1); i++) {
     32  for (i = 1; strcasecmp (label, tlabel) && (i < Nfields + 1); i++) {
    3333    sprintf (field, "TTYPE%d", i);
    3434    gfits_scan (header, field, "%s", 1, tlabel);
    3535  }
    36   if (strcmp (label, tlabel)) return (NULL);
     36  if (strcasecmp (label, tlabel)) return (NULL);
    3737  N = i - 1;
    3838
     
    137137  tlabel[0] = 0;
    138138  gfits_scan (header, "TFIELDS", "%d", 1, &Nfields);
    139   for (i = 1; strcmp (label, tlabel) && (i < Nfields + 1); i++) {
     139  for (i = 1; strcasecmp (label, tlabel) && (i < Nfields + 1); i++) {
    140140    sprintf (field, "TTYPE%d", i);
    141141    gfits_scan (header, field, "%s", 1, tlabel);
    142142  }
    143   if (strcmp (label, tlabel)) return (FALSE);
     143  if (strcasecmp (label, tlabel)) return (FALSE);
    144144  N = i - 1;
    145145
     
    166166  tlabel[0] = 0;
    167167  gfits_scan (header, "TFIELDS", "%d", 1, &Nfields);
    168   for (i = 1; strcmp (label, tlabel) && (i < Nfields + 1); i++) {
     168  for (i = 1; strcasecmp (label, tlabel) && (i < Nfields + 1); i++) {
    169169    sprintf (field, "TTYPE%d", i);
    170170    gfits_scan (header, field, "%s", 1, tlabel);
    171171  }
    172   if (strcmp (label, tlabel)) return (FALSE);
     172  if (strcasecmp (label, tlabel)) return (FALSE);
    173173  N = i - 1;
    174174
     
    291291  tlabel[0] = 0;
    292292  gfits_scan (header, "TFIELDS", "%d", 1, &Nfields);
    293   for (i = 1; strcmp (label, tlabel) && (i < Nfields + 1); i++) {
     293  for (i = 1; strcasecmp (label, tlabel) && (i < Nfields + 1); i++) {
    294294    sprintf (field, "TTYPE%d", i);
    295295    gfits_scan (header, field, "%s", 1, tlabel);
    296296  }
    297   if (strcmp (label, tlabel)) return (FALSE);
     297  if (strcasecmp (label, tlabel)) return (FALSE);
    298298  N = i - 1;
    299299
     
    321321  tlabel[0] = 0;
    322322  gfits_scan (header, "TFIELDS", "%d", 1, &Nfields);
    323   for (i = 1; strcmp (label, tlabel) && (i < Nfields + 1); i++) {
     323  for (i = 1; strcasecmp (label, tlabel) && (i < Nfields + 1); i++) {
    324324    sprintf (field, "TTYPE%d", i);
    325325    gfits_scan (header, field, "%s", 1, tlabel);
    326326  }
    327   if (strcmp (label, tlabel)) return (FALSE);
     327  if (strcasecmp (label, tlabel)) return (FALSE);
    328328  N = i - 1;
    329329
  • trunk/Ohana/src/libfits/table/F_set_column.c

    r28241 r31371  
    3131  tlabel[0] = 0;
    3232  gfits_scan (header, "TFIELDS", "%d", 1, &Nfields);
    33   for (i = 1; strcmp (label, tlabel) && (i < Nfields + 1); i++) {
     33  for (i = 1; strcasecmp (label, tlabel) && (i < Nfields + 1); i++) {
    3434    sprintf (field, "TTYPE%d", i);
    3535    gfits_scan (header, field, "%s", 1, tlabel);
    3636  }
    37   if (strcmp (label, tlabel)) return (FALSE);
     37  if (strcasecmp (label, tlabel)) return (FALSE);
    3838  N = i - 1;
    3939
Note: See TracChangeset for help on using the changeset viewer.