Ignore:
Timestamp:
05/13/14 14:39:48 (11 years ago)
Author:
Malte Marquarding
Message:

Finally fix aall warning: deprecated conversion from string constant to 'char*'

Location:
trunk/external-alma/atnf/PKSIO
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/GBTFITSreader.cc

    r2907 r2940  
    170170  // Move to the SDFITS extension.
    171171  cALFA = cALFA_BD = cALFA_CIMA = 0;
    172   char *extName = "SINGLE DISH" ;
    173   if (fits_movnam_hdu(cSDptr, BINARY_TBL, "SINGLE DISH", 0, &cStatus)) {
     172  char *extName = (char *)"SINGLE DISH" ;
     173  if (fits_movnam_hdu(cSDptr, BINARY_TBL, extName, 0, &cStatus)) {
    174174    // No SDFITS table, look for BDFITS or CIMAFITS.
    175175    cStatus = 0;
    176     if (fits_movnam_hdu(cSDptr, BINARY_TBL, "BDFITS", 0, &cStatus) == 0) {
     176    if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"BDFITS", 0, &cStatus) == 0) {
    177177      cALFA_BD = 1;
    178       extName = "BDFITS" ;
     178      extName = (char *)"BDFITS" ;
    179179
    180180    } else {
    181181      cStatus = 0;
    182       if (fits_movnam_hdu(cSDptr, BINARY_TBL, "CIMAFITS", 0, &cStatus) == 0) {
     182      if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"CIMAFITS", 0, &cStatus) == 0) {
    183183        cALFA_CIMA = 1;
    184         extName = "CIMAFITS" ;
     184        extName = (char *)"CIMAFITS" ;
    185185
    186186        // Check for later versions of CIMAFITS.
    187187        float version;
    188         readParm("VERSION", TFLOAT, &version);
     188        readParm((char *)(char *)"VERSION", TFLOAT, &version);
    189189        if (version >= 2.0f) cALFA_CIMA = int(version);
    190190
     
    282282  // GBT data.
    283283  char telescope[32];
    284   readParm("TELESCOP", TSTRING, telescope);      // Core.
     284  readParm((char *)(char *)"TELESCOP", TSTRING, telescope);      // Core.
    285285  cGBT = strncmp(telescope, "GBT", 3) == 0 ||
    286286         strncmp(telescope, "NRAO_GBT", 8) == 0;
     
    288288
    289289  // Check that the DATA array column is present.
    290   findData(DATA, "DATA", TFLOAT);
     290  findData(DATA, (char *)(char *)"DATA", TFLOAT);
    291291  haveSpectra = cHaveSpectra = cData[DATA].colnum > 0;
    292292
     
    305305      // no TDIM (or MAXISn) card; use the LAGS_IN value.
    306306      cNAxes = 5;
    307       readParm("LAGS_IN", TLONG, cNAxis);
     307      readParm((char *)"LAGS_IN", TLONG, cNAxis);
    308308      cNAxis[1] = 1;
    309309      cNAxis[2] = 1;
     
    325325    }
    326326
    327     findData(FLAGGED, "FLAGGED", TBYTE);
     327    findData(FLAGGED, (char *)(char *)"FLAGGED", TBYTE);
    328328
    329329  } else {
    330330    // DATA column not present, check for a DATAXED keyword.
    331     findData(DATAXED, "DATAXED", TSTRING);
     331    findData(DATAXED, (char *)(char *)"DATAXED", TSTRING);
    332332    if (cData[DATAXED].colnum < 0) {
    333333      log(LogOrigin( className, methodName, WHERE ), LogIO::SEVERE, "DATA array column absent from binary table.");
     
    338338    // Determine the number of axes and their length.
    339339    char dataxed[32];
    340     readParm("DATAXED", TSTRING, dataxed);
     340    readParm((char *)(char *)"DATAXED", TSTRING, dataxed);
    341341
    342342    for (int iaxis = 0; iaxis < 5; iaxis++) cNAxis[iaxis] = 0;
     
    348348  }
    349349
    350   char  *CTYPE[5] = {"CTYPE1", "CTYPE2", "CTYPE3", "CTYPE4", "CTYPE5"};
    351   char  *CRPIX[5] = {"CRPIX1", "CRPIX2", "CRPIX3", "CRPIX4", "CRPIX5"};
    352   char  *CRVAL[5] = {"CRVAL1", "CRVAL2", "CRVAL3", "CRVAL4", "CRVAL5"};
    353   char  *CDELT[5] = {"CDELT1", "CDELT2", "CDELT3", "CDELT4", "CDELT5"};
     350  char  *CTYPE[5] = {(char *)"CTYPE1", (char *)"CTYPE2", (char *)"CTYPE3", (char *)"CTYPE4", (char *)"CTYPE5"};
     351  char  *CRPIX[5] = {(char *)"CRPIX1", (char *)"CRPIX2", (char *)"CRPIX3", (char *)"CRPIX4", (char *)"CRPIX5"};
     352  char  *CRVAL[5] = {(char *)"CRVAL1", (char *)"CRVAL2", (char *)"CRVAL3", (char *)"CRVAL4", (char *)"CRVAL5"};
     353  char  *CDELT[5] = {(char *)"CDELT1", (char *)"CDELT2", (char *)"CDELT3", (char *)"CDELT4", (char *)"CDELT5"};
    354354
    355355  // Find required DATA array axes.
     
    429429    // Fixed in ALFA CIMAFITS.
    430430    cRaAxis = 2;
    431     raCRVAL = "CRVAL2A";
     431    raCRVAL = (char *)"CRVAL2A";
    432432
    433433    cDecAxis = 3;
    434     decCRVAL = "CRVAL3A";
     434    decCRVAL = (char *)"CRVAL3A";
    435435  }
    436436
     
    444444
    445445  // Set up machinery for data retrieval.
    446   findData(SCAN,     "SCAN",     TINT);         // Shared.
    447   findData(CYCLE,    "CYCLE",    TINT);         // Additional.
    448   findData(DATE_OBS, "DATE-OBS", TSTRING);      // Core.
     446  findData(SCAN,     (char *)(char *)"SCAN",     TINT);         // Shared.
     447  findData(CYCLE,    (char *)(char *)"CYCLE",    TINT);         // Additional.
     448  findData(DATE_OBS, (char *)"DATE-OBS", TSTRING);      // Core.
    449449
    450450  if (cTimeAxis >= 0) {
     
    461461
    462462  } else {
    463     findData(TIME,   "TIME",     TDOUBLE);      // Core.
    464   }
    465 
    466   findData(EXPOSURE, "EXPOSURE", TFLOAT);       // Core.
    467   findData(OBJECT,   "OBJECT",   TSTRING);      // Core.
    468   findData(OBJ_RA,   "OBJ-RA",   TDOUBLE);      // Additional.
    469   findData(OBJ_DEC,  "OBJ-DEC",  TDOUBLE);      // Additional.
    470   findData(RESTFRQ,  "RESTFRQ",  TDOUBLE);      // Additional.
    471   findData(OBSMODE,  "OBSMODE",  TSTRING);      // Shared.
    472 
    473   findData(BEAM,     "BEAM",     TSHORT);       // Additional.
    474   findData(IF,       "IF",       TSHORT);       // Additional.
     463    findData(TIME,   (char *)(char *)"TIME",     TDOUBLE);      // Core.
     464  }
     465
     466  findData(EXPOSURE, (char *)(char *)"EXPOSURE", TFLOAT);       // Core.
     467  findData(OBJECT,   (char *)(char *)"OBJECT",   TSTRING);      // Core.
     468  findData(OBJ_RA,   (char *)"OBJ-RA",   TDOUBLE);      // Additional.
     469  findData(OBJ_DEC,  (char *)"OBJ-DEC",  TDOUBLE);      // Additional.
     470  findData(RESTFRQ,  (char *)(char *)"RESTFRQ",  TDOUBLE);      // Additional.
     471  findData(OBSMODE,  (char *)(char *)"OBSMODE",  TSTRING);      // Shared.
     472
     473  findData(BEAM,     (char *)(char *)"BEAM",     TSHORT);       // Additional.
     474  findData(IF,       (char *)(char *)"IF",       TSHORT);       // Additional.
    475475  findData(FqRefVal,  fqCRVAL,   TDOUBLE);      // Frequency reference value.
    476476  findData(FqDelt,    fqCDELT,   TDOUBLE);      // Frequency increment.
     
    478478  findData(RA,        raCRVAL,   TDOUBLE);      // Right ascension.
    479479  findData(DEC,      decCRVAL,   TDOUBLE);      // Declination.
    480   findData(SCANRATE, "SCANRATE", TFLOAT);       // Additional.
    481 
    482   findData(TSYS,     "TSYS",     TFLOAT);       // Core.
    483   findData(CALFCTR,  "CALFCTR",  TFLOAT);       // Additional.
    484   findData(XCALFCTR, "XCALFCTR", TFLOAT);       // Additional.
    485   findData(BASELIN,  "BASELIN",  TFLOAT);       // Additional.
    486   findData(BASESUB,  "BASESUB",  TFLOAT);       // Additional.
    487   findData(XPOLDATA, "XPOLDATA", TFLOAT);       // Additional.
    488 
    489   findData(REFBEAM,  "REFBEAM",  TSHORT);       // Additional.
    490   findData(TCAL,     "TCAL",     TFLOAT);       // Shared.
    491   findData(TCALTIME, "TCALTIME", TSTRING);      // Additional.
    492   findData(AZIMUTH,  "AZIMUTH",  TFLOAT);       // Shared.
    493   findData(ELEVATIO, "ELEVATIO", TFLOAT);       // Shared.
    494   findData(PARANGLE, "PARANGLE", TFLOAT);       // Additional.
    495   findData(FOCUSAXI, "FOCUSAXI", TFLOAT);       // Additional.
    496   findData(FOCUSTAN, "FOCUSTAN", TFLOAT);       // Additional.
    497   findData(FOCUSROT, "FOCUSROT", TFLOAT);       // Additional.
    498   findData(TAMBIENT, "TAMBIENT", TFLOAT);       // Shared.
    499   findData(PRESSURE, "PRESSURE", TFLOAT);       // Shared.
    500   findData(HUMIDITY, "HUMIDITY", TFLOAT);       // Shared.
    501   findData(WINDSPEE, "WINDSPEE", TFLOAT);       // Shared.
    502   findData(WINDDIRE, "WINDDIRE", TFLOAT);       // Shared.
     480  findData(SCANRATE, (char *)(char *)"SCANRATE", TFLOAT);       // Additional.
     481
     482  findData(TSYS,     (char *)(char *)"TSYS",     TFLOAT);       // Core.
     483  findData(CALFCTR,  (char *)(char *)"CALFCTR",  TFLOAT);       // Additional.
     484  findData(XCALFCTR, (char *)(char *)"XCALFCTR", TFLOAT);       // Additional.
     485  findData(BASELIN,  (char *)(char *)"BASELIN",  TFLOAT);       // Additional.
     486  findData(BASESUB,  (char *)(char *)"BASESUB",  TFLOAT);       // Additional.
     487  findData(XPOLDATA, (char *)(char *)"XPOLDATA", TFLOAT);       // Additional.
     488
     489  findData(REFBEAM,  (char *)(char *)"REFBEAM",  TSHORT);       // Additional.
     490  findData(TCAL,     (char *)(char *)"TCAL",     TFLOAT);       // Shared.
     491  findData(TCALTIME, (char *)(char *)"TCALTIME", TSTRING);      // Additional.
     492  findData(AZIMUTH,  (char *)(char *)"AZIMUTH",  TFLOAT);       // Shared.
     493  findData(ELEVATIO, (char *)(char *)"ELEVATIO", TFLOAT);       // Shared.
     494  findData(PARANGLE, (char *)(char *)"PARANGLE", TFLOAT);       // Additional.
     495  findData(FOCUSAXI, (char *)(char *)"FOCUSAXI", TFLOAT);       // Additional.
     496  findData(FOCUSTAN, (char *)(char *)"FOCUSTAN", TFLOAT);       // Additional.
     497  findData(FOCUSROT, (char *)(char *)"FOCUSROT", TFLOAT);       // Additional.
     498  findData(TAMBIENT, (char *)(char *)"TAMBIENT", TFLOAT);       // Shared.
     499  findData(PRESSURE, (char *)(char *)"PRESSURE", TFLOAT);       // Shared.
     500  findData(HUMIDITY, (char *)(char *)"HUMIDITY", TFLOAT);       // Shared.
     501  findData(WINDSPEE, (char *)(char *)"WINDSPEE", TFLOAT);       // Shared.
     502  findData(WINDDIRE, (char *)(char *)"WINDDIRE", TFLOAT);       // Shared.
    503503
    504504  findData(STOKES,    polCRVAL,  TINT);
    505   findData(SIG,       "SIG",     TSTRING);
    506   findData(CAL,       "CAL",     TSTRING);
    507 
    508   findData(RVSYS,     "RVSYS",   TDOUBLE);
    509   findData(VFRAME,    "VFRAME",  TDOUBLE);
    510   findData(VELDEF,    "VELDEF",  TSTRING);
    511 
    512   findData(TIMESTAMP, "TIMESTAMP", TSTRING);
    513   findData(DURATION,  "DURATION", TDOUBLE);
    514   findData(SAMPLER,   "SAMPLER", TSTRING);
     505  findData(SIG,       (char *)(char *)"SIG",     TSTRING);
     506  findData(CAL,       (char *)(char *)"CAL",     TSTRING);
     507
     508  findData(RVSYS,     (char *)(char *)"RVSYS",   TDOUBLE);
     509  findData(VFRAME,    (char *)(char *)"VFRAME",  TDOUBLE);
     510  findData(VELDEF,    (char *)(char *)"VELDEF",  TSTRING);
     511
     512  findData(TIMESTAMP, (char *)(char *)"TIMESTAMP", TSTRING);
     513  findData(DURATION,  (char *)(char *)"DURATION", TDOUBLE);
     514  findData(SAMPLER,   (char *)(char *)"SAMPLER", TSTRING);
    515515
    516516  if (cStatus) {
     
    527527    cScanNo = 0;
    528528    if (cALFA_CIMA) {
    529       findData(SCAN,  "SCAN_ID", TINT);
     529      findData(SCAN,  (char *)"SCAN_ID", TINT);
    530530      if (cALFA_CIMA > 1) {
    531531        // Note that RECNUM increases by cNAxisTime per row.
    532         findData(CYCLE, "RECNUM", TINT);
     532        findData(CYCLE, (char *)(char *)"RECNUM", TINT);
    533533      } else {
    534         findData(CYCLE, "SUBSCAN", TINT);
     534        findData(CYCLE, (char *)(char *)"SUBSCAN", TINT);
    535535      }
    536536    } else if (cALFA_BD) {
    537       findData(SCAN,  "SCAN_NUMBER", TINT);
    538       findData(CYCLE, "PATTERN_NUMBER", TINT);
     537      findData(SCAN,  (char *)"SCAN_NUMBER", TINT);
     538      findData(CYCLE, (char *)"PATTERN_NUMBER", TINT);
    539539    }
    540540  } else {
     
    554554  if (cALFA) {
    555555    // ALFA INPUT_ID, 0-relative (overrides BEAM column if present).
    556     findData(BEAM, "INPUT_ID", TSHORT);
     556    findData(BEAM, (char *)"INPUT_ID", TSHORT);
    557557    cBeam_1rel = 0;
    558558
     
    563563    } else {
    564564      // ms2sdfits output, 0-relative "feed" number.
    565       findData(BEAM, "MAIN_FEED1", TSHORT);
     565      findData(BEAM, (char *)"MAIN_FEED1", TSHORT);
    566566      cBeam_1rel = 0;
    567567    }
     
    573573    // ALFA data, 0-relative.
    574574    if (cALFA_CIMA > 1) {
    575       findData(IF, "IFN", TSHORT);
     575      findData(IF, (char *)(char *)"IFN", TSHORT);
    576576    } else {
    577       findData(IF, "IFVAL", TSHORT);
     577      findData(IF, (char *)(char *)"IFVAL", TSHORT);
    578578    }
    579579    cIF_1rel = 0;
     
    582582  // ms2sdfits writes a scalar "TSYS" column that averages the polarizations.
    583583  int colnum;
    584   findCol("SYSCAL_TSYS", &colnum);
     584  findCol((char *)"SYSCAL_TSYS", &colnum);
    585585  if (colnum > 0) {
    586586    // This contains the vector Tsys.
    587     findData(TSYS, "SYSCAL_TSYS", TFLOAT);
     587    findData(TSYS, (char *)"SYSCAL_TSYS", TFLOAT);
    588588  }
    589589
     
    591591
    592592  if (cData[SCANRATE].colnum < 0) {
    593     findData(SCANRATE, "FIELD_POINTING_DIR_RATE", TFLOAT);
     593    findData(SCANRATE, (char *)"FIELD_POINTING_DIR_RATE", TFLOAT);
    594594  }
    595595
    596596  if (cData[RESTFRQ].colnum < 0) {
    597     findData(RESTFRQ, "RESTFREQ", TDOUBLE);
     597    findData(RESTFRQ, (char *)(char *)"RESTFREQ", TDOUBLE);
    598598    if (cData[RESTFRQ].colnum < 0) {
    599       findData(RESTFRQ, "SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE);
     599      findData(RESTFRQ, (char *)"SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE);
    600600    }
    601601  }
    602602
    603603  if (cData[OBJ_RA].colnum < 0) {
    604     findData(OBJ_RA, "SOURCE_DIRECTION", TDOUBLE);
     604    findData(OBJ_RA, (char *)"SOURCE_DIRECTION", TDOUBLE);
    605605  }
    606606  if (cData[OBJ_DEC].colnum < 0) {
    607     findData(OBJ_DEC, "SOURCE_DIRECTION", TDOUBLE);
     607    findData(OBJ_DEC, (char *)"SOURCE_DIRECTION", TDOUBLE);
    608608  }
    609609
     
    611611
    612612  if (cData[TCAL].colnum < 0) {
    613     findData(TCAL, "SYSCAL_TCAL", TFLOAT);
     613    findData(TCAL, (char *)"SYSCAL_TCAL", TFLOAT);
    614614  } else if (cALFA_BD) {
    615615    // ALFA BDFITS has a different TCAL with 64 elements - kill it!
    616     findData(TCAL, "NO NO NO", TFLOAT);
     616    findData(TCAL, (char *)"NO NO NO", TFLOAT);
    617617  }
    618618
    619619  if (cALFA_BD) {
    620620    // ALFA BDFITS.
    621     findData(AZIMUTH, "CRVAL2B", TFLOAT);
    622     findData(ELEVATIO, "CRVAL3B", TFLOAT);
     621    findData(AZIMUTH, (char *)(char *)"CRVAL2B", TFLOAT);
     622    findData(ELEVATIO, (char *)(char *)"CRVAL3B", TFLOAT);
    623623  }
    624624
    625625  if (cALFA) {
    626626    // ALFA data.
    627     findData(PARANGLE, "PARA_ANG", TFLOAT);
     627    findData(PARANGLE, (char *)"PARA_ANG", TFLOAT);
    628628  }
    629629
    630630  if (cData[TAMBIENT].colnum < 0) {
    631     findData(TAMBIENT, "WEATHER_TEMPERATURE", TFLOAT);
     631    findData(TAMBIENT, (char *)"WEATHER_TEMPERATURE", TFLOAT);
    632632  }
    633633
    634634  if (cData[PRESSURE].colnum < 0) {
    635     findData(PRESSURE, "WEATHER_PRESSURE", TFLOAT);
     635    findData(PRESSURE, (char *)"WEATHER_PRESSURE", TFLOAT);
    636636  }
    637637
    638638  if (cData[HUMIDITY].colnum < 0) {
    639     findData(HUMIDITY, "WEATHER_REL_HUMIDITY", TFLOAT);
     639    findData(HUMIDITY, (char *)"WEATHER_REL_HUMIDITY", TFLOAT);
    640640  }
    641641
    642642  if (cData[WINDSPEE].colnum < 0) {
    643     findData(WINDSPEE, "WEATHER_WIND_SPEED", TFLOAT);
     643    findData(WINDSPEE, (char *)"WEATHER_WIND_SPEED", TFLOAT);
    644644  }
    645645
    646646  if (cData[WINDDIRE].colnum < 0) {
    647     findData(WINDDIRE, "WEATHER_WIND_DIRECTION", TFLOAT);
     647    findData(WINDDIRE, (char *)"WEATHER_WIND_DIRECTION", TFLOAT);
    648648  }
    649649
     
    768768          if (cData[DATAXED].colnum > 0) {
    769769            char dataxed[32];
    770             readParm("DATAXED", TSTRING, dataxed);
     770            readParm((char *)(char *)"DATAXED", TSTRING, dataxed);
    771771
    772772            sscanf(dataxed, "(%ld,%ld,%ld,%ld,%ld)", cNAxis, cNAxis+1,
     
    10141014  if (cALFA_CIMA > 1) {
    10151015    // FFTs per second when the Mock correlator operates in RFI blanking mode.
    1016     readData("PHFFTACC", TFLOAT, 0, &cALFAacc);
     1016    readData((char *)"PHFFTACC", TFLOAT, 0, &cALFAacc);
    10171017  }
    10181018
     
    10511051
    10521052  // Read parameter values.
    1053   readParm("OBSERVER", TSTRING, observer);              // Shared.
    1054   readParm("PROJID",   TSTRING, project);               // Shared.
    1055   readParm("TELESCOP", TSTRING, telescope);             // Core.
     1053  readParm((char *)(char *)"OBSERVER", TSTRING, observer);              // Shared.
     1054  readParm((char *)(char *)"PROJID",   TSTRING, project);               // Shared.
     1055  readParm((char *)(char *)"TELESCOP", TSTRING, telescope);             // Core.
    10561056
    10571057  antPos[0] = 0.0;
    10581058  antPos[1] = 0.0;
    10591059  antPos[2] = 0.0;
    1060   if (readParm("ANTENNA_POSITION", TDOUBLE, antPos)) {
    1061     readParm("OBSGEO-X",  TDOUBLE, antPos);             // Additional.
    1062     readParm("OBSGEO-Y",  TDOUBLE, antPos + 1);         // Additional.
    1063     readParm("OBSGEO-Z",  TDOUBLE, antPos + 2);         // Additional.
     1060  if (readParm((char *)"ANTENNA_POSITION", TDOUBLE, antPos)) {
     1061    readParm((char *)"OBSGEO-X",  TDOUBLE, antPos);             // Additional.
     1062    readParm((char *)"OBSGEO-Y",  TDOUBLE, antPos + 1);         // Additional.
     1063    readParm((char *)"OBSGEO-Z",  TDOUBLE, antPos + 2);         // Additional.
    10641064  }
    10651065
    10661066  if (antPos[0] == 0.0) {
    10671067    if (cGBT) {
    1068       readParm( "SITELONG", TDOUBLE, antPos ) ;
    1069       readParm( "SITELAT", TDOUBLE, antPos+1 ) ;
    1070       readParm( "SITEELEV", TDOUBLE, antPos+2 ) ;
     1068      readParm( (char *)(char *)"SITELONG", TDOUBLE, antPos ) ;
     1069      readParm( (char *)(char *)"SITELAT", TDOUBLE, antPos+1 ) ;
     1070      readParm( (char *)(char *)"SITEELEV", TDOUBLE, antPos+2 ) ;
    10711071      Vector<Double> pos( 2 ) ;
    10721072      pos[0] = Double( antPos[0] ) ;
     
    11161116  }
    11171117
    1118   readParm("EQUINOX",  TFLOAT,  &equinox);              // Shared.
     1118  readParm((char *)(char *)"EQUINOX",  TFLOAT,  &equinox);              // Shared.
    11191119  if (cStatus == 405) {
    11201120    // EQUINOX was written as string value in early versions.
    11211121    cStatus = 0;
    11221122    char strtmp[32];
    1123     readParm("EQUINOX", TSTRING, strtmp);
     1123    readParm((char *)(char *)"EQUINOX", TSTRING, strtmp);
    11241124    sscanf(strtmp, "%f", &equinox);
    11251125  }
    11261126
    1127   if (readParm("RADESYS", TSTRING, radecsys)) {         // Additional.
    1128     if (readParm("RADECSYS", TSTRING, radecsys)) {      // Additional.
     1127  if (readParm((char *)(char *)"RADESYS", TSTRING, radecsys)) {         // Additional.
     1128    if (readParm((char *)(char *)"RADECSYS", TSTRING, radecsys)) {      // Additional.
    11291129      strcpy(radecsys, "");
    11301130    }
    11311131  }
    11321132
    1133   if (readParm("SPECSYS", TSTRING, dopplerFrame)) {     // Additional.
     1133  if (readParm((char *)(char *)"SPECSYS", TSTRING, dopplerFrame)) {     // Additional.
    11341134    // Fallback value.
    11351135    strcpy(dopplerFrame, "TOPOCENT");
     
    11391139    // Added few more codes currently (as of 2009 Oct) used in the GBT
    11401140    // SDFITS (based io_sdfits_define.pro of GBTIDL). - TT
    1141     if (readParm("VELFRAME", TSTRING, dopplerFrame)) {  // Additional.
     1141    if (readParm((char *)(char *)"VELFRAME", TSTRING, dopplerFrame)) {  // Additional.
    11421142      // No, try digging it out of the CTYPE card (AIPS convention).
    11431143      char keyw[9], ctype[9];
     
    12111211  readTime(1, 1, datobs, utc);
    12121212  readData(FqRefVal, 1, &refFreq);
    1213   readParm("BANDWID", TDOUBLE, &bandwidth);             // Core.
     1213  readParm((char *)(char *)"BANDWID", TDOUBLE, &bandwidth);             // Core.
    12141214
    12151215  if (cStatus) {
     
    12631263            if (cALFA_BD) {
    12641264              unsigned char invert;
    1265               readData("UPPERSB", TBYTE, irow, &invert);
     1265              readData((char *)"UPPERSB", TBYTE, irow, &invert);
    12661266
    12671267              if (invert) {
     
    18671867    unsigned char invert;
    18681868    int anynul, colnum;
    1869     findCol("UPPERSB", &colnum);
     1869    findCol((char *)"UPPERSB", &colnum);
    18701870    fits_read_col(cSDptr, TBYTE, colnum, cRow, 1, 1, 0, &invert, &anynul,
    18711871                  &cStatus);
     
    20112011          // Rescale according to the number of unblanked accumulations.
    20122012          int colnum, naccum;
    2013           findCol("STAT", &colnum);
     2013          findCol((char *)"STAT", &colnum);
    20142014          fits_read_col(cSDptr, TINT, colnum, cRowR, 10*(cTimeIdx-1)+2, 1, 0,
    20152015                        &naccum, &anynul, &cStatus);
     
    26312631  char chars[32];
    26322632  if (cALFA_BD) {
    2633     readData("OBS_NAME", TSTRING, cRow, chars);
     2633    readData((char *)"OBS_NAME", TSTRING, cRow, chars);
    26342634  } else {
    2635     readData("SCANTYPE", TSTRING, cRow, chars);
     2635    readData((char *)"SCANTYPE", TSTRING, cRow, chars);
    26362636  }
    26372637
     
    26912691  if (cALFA_CIMA > 1) {
    26922692    int   colnum, naccum;
    2693     findCol("STAT", &colnum);
     2693    findCol((char *)"STAT", &colnum);
    26942694    fits_read_col(cSDptr, TINT, colnum, cRow, 2, 1, 0, &naccum, &anynul,
    26952695                  &cStatus);
     
    29162916    MEpoch me( Quantity( dd, "d" ), MEpoch::UTC ) ;
    29172917    double antPos[3] ;
    2918     readParm( "SITELONG", TDOUBLE, antPos ) ;
    2919     readParm( "SITELAT", TDOUBLE, antPos+1 ) ;
    2920     readParm( "SITEELEV", TDOUBLE, antPos+2 ) ;
     2918    readParm( (char *)(char *)"SITELONG", TDOUBLE, antPos ) ;
     2919    readParm( (char *)(char *)"SITELAT", TDOUBLE, antPos+1 ) ;
     2920    readParm( (char *)(char *)"SITEELEV", TDOUBLE, antPos+2 ) ;
    29212921    Vector<Double> pos( 2 ) ;
    29222922    pos[0] = Double( antPos[0] ) ;
  • trunk/external-alma/atnf/PKSIO/NROFITSDataset.cc

    r2812 r2940  
    887887  //cout << "SCANTP(" << i << ") = " << record_->SCANTP << endl ;
    888888  //
    889   char *name1 = "" ;
    890   char *name2 = "" ;
     889  const char *name1 = "" ;
     890  const char *name2 = "" ;
    891891  if ( SCNCD == 0 ) {
    892892    name1 = "DRA" ;
     
    16831683  while ( count < ARYNM && index < rowNum_ ) {
    16841684    char ctmp[5] ;
    1685     fread( ctmp, 1, 4, fp_ ) ;
     1685    std::size_t retval = fread( ctmp, 1, 4, fp_ ) ;
    16861686    ctmp[4] = '\0' ;
    16871687    //cout << "ctmp = " << ctmp << endl ;
     
    17671767  int count = 0 ;
    17681768  while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) {
    1769     fread( buf, 1, 80, fp_ ) ;
     1769    std::size_t retval = fread( buf, 1, 80, fp_ ) ;
    17701770    buf[80] = '\0' ;
    17711771    count++ ;
     
    18011801  fseek( fp_, 0, SEEK_SET ) ;
    18021802  while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) {
    1803     fread( buf, 1, 80, fp_ ) ;
     1803    std::size_t retval = fread( buf, 1, 80, fp_ ) ;
    18041804    buf[80] = '\0' ;
    18051805    //char bufo[9] ;
     
    18371837  fseek( fp_, 0, SEEK_SET ) ;
    18381838  while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) {
    1839     fread( buf, 1, 80, fp_ ) ;
     1839    std::size_t retval = fread( buf, 1, 80, fp_ ) ;
    18401840    buf[80] = '\0' ;
    18411841    //char bufo[9] ;
     
    18711871  fseek( fp_, 0, SEEK_SET ) ;
    18721872  while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) {
    1873     fread( buf, 1, 80, fp_ ) ;
     1873    std::size_t retval = fread( buf, 1, 80, fp_ ) ;
    18741874    buf[80] = '\0' ;
    18751875    char bufo[9] ;
     
    19131913  // read data
    19141914  if ( xsize < clen ) {
    1915     fread( v, 1, xsize, fp_ ) ;
     1915    std::size_t retval = fread( v, 1, xsize, fp_ ) ;
    19161916    //v[xsize] = '\0' ;
    19171917  }
    19181918  else {
    1919     fread( v, 1, clen-1, fp_ ) ;
     1919    std::size_t retval = fread( v, 1, clen-1, fp_ ) ;
    19201920    //v[clen-1] = '\0' ;
    19211921  }
     
    19351935
    19361936  // read data
    1937   fread( &v, sizeof(int), 1, fp_ ) ;
     1937  std::size_t retval = fread( &v, sizeof(int), 1, fp_ ) ;
    19381938  if ( b == 0 )
    19391939    convertEndian( v ) ;
     
    19531953
    19541954  // read data
    1955   fread( &v, sizeof(float), 1, fp_ ) ;
     1955  std::size_t retval = fread( &v, sizeof(float), 1, fp_ ) ;
    19561956  if ( b == 0 )
    19571957    convertEndian( v ) ;
     
    19711971
    19721972  // read data
    1973   fread( &v, sizeof(double), 1, fp_ ) ;
     1973  std::size_t retval = fread( &v, sizeof(double), 1, fp_ ) ;
    19741974  if ( b == 0 )
    19751975    convertEndian( v ) ; 
     
    19961996    int clen = strlen( v[i] ) ;
    19971997    if ( clen > xsize ) {
    1998       fread( v[i], 1, xsize, fp_ ) ;
     1998      std::size_t retval = fread( v[i], 1, xsize, fp_ ) ;
    19991999      //v[i][xsize] = '\0' ;
    20002000    }
    20012001    else {
    2002       fread( v[i], 1, clen, fp_ ) ;
     2002      std::size_t retval = fread( v[i], 1, clen, fp_ ) ;
    20032003      //v[i][clen-1] = '\0' ;
    20042004    }
     
    20192019
    20202020  for ( unsigned int i = 0 ; i < v.size() ; i++ ) {
    2021     fread( &v[i], 1, sizeof(int), fp_ ) ;
     2021    std::size_t retval = fread( &v[i], 1, sizeof(int), fp_ ) ;
    20222022    if ( b == 0 )
    20232023      convertEndian( v[i] ) ;
     
    20382038
    20392039  for ( unsigned int i = 0 ; i < v.size() ; i++ ) {
    2040     fread( &v[i], 1, sizeof(float), fp_ ) ;
     2040    std::size_t retval = fread( &v[i], 1, sizeof(float), fp_ ) ;
    20412041    if ( b == 0 )
    20422042      convertEndian( v[i] ) ;
     
    20572057
    20582058  for ( unsigned int i = 0 ; i < v.size() ; i++ ) {
    2059     fread( &v[i], 1, sizeof(double), fp_ ) ;
     2059    std::size_t retval = fread( &v[i], 1, sizeof(double), fp_ ) ;
    20602060    if ( b == 0 )
    20612061      convertEndian( v[i] ) ;
     
    20872087//     int clen = (int)strlen( v[i] ) ;
    20882088//     if ( clen > xsize ) {
    2089 //       fread( v[i], 1, xsize, fp_ ) ;
     2089//       std::size_t retval = fread( v[i], 1, xsize, fp_ ) ;
    20902090//       //v[i][xsize] = '\0' ;
    20912091//     }
    20922092//     else {
    2093 //       fread( v[i], 1, clen-1, fp_ ) ;
     2093//       std::size_t retval = fread( v[i], 1, clen-1, fp_ ) ;
    20942094//       //v[i][clen-1] = '\0' ;
    20952095//     }
    20962096    char c[xsize+1] ;
    2097     fread( c, 1, xsize, fp_ ) ;
     2097    std::size_t retval = fread( c, 1, xsize, fp_ ) ;
    20982098    c[xsize] = '\0' ;
    20992099    v[i] = string( c ) ;
     
    21182118    int offset = scanLen_ * arrayid_[i] + sizeof(int) * idx ;
    21192119    fseek( fp_, offset, SEEK_CUR ) ;
    2120     fread( &v[i], 1, sizeof(int), fp_ ) ;
     2120    std::size_t retval = fread( &v[i], 1, sizeof(int), fp_ ) ;
    21212121    if ( b == 0 )
    21222122      convertEndian( v[i] ) ;
     
    21412141    int offset = scanLen_ * arrayid_[i] + sizeof(float) * idx ;
    21422142    fseek( fp_, offset, SEEK_CUR ) ;
    2143     fread( &v[i], 1, sizeof(float), fp_ ) ;
     2143    std::size_t retval = fread( &v[i], 1, sizeof(float), fp_ ) ;
    21442144    if ( b == 0 )
    21452145      convertEndian( v[i] ) ;
     
    21642164    int offset = scanLen_ * arrayid_[i] + sizeof(double) * idx ;
    21652165    fseek( fp_, offset, SEEK_CUR ) ;
    2166     fread( &v[i], 1, sizeof(double), fp_ ) ;
     2166    std::size_t retval = fread( &v[i], 1, sizeof(double), fp_ ) ;
    21672167    if ( b == 0 )
    21682168      convertEndian( v[i] ) ;
  • trunk/external-alma/atnf/PKSIO/NROReader.cc

    r2804 r2940  
    8181  // Determine the type of input.
    8282  NROReader *reader = 0;
     83  std::size_t retval;
    8384  if ( inFile.isRegular() ) {
    8485    FILE *file ;
     
    8687    // read LOFIL0
    8788    char buf[9];
    88     fread( buf, 4, 1, file ) ;
     89    retval = fread( buf, 4, 1, file ) ;
    8990    buf[4] = '\0' ;
    9091    // DEBUG
     
    107108      delete d ;
    108109      fseek( file, size, SEEK_SET ) ;
    109       fread( buf, 8, 1, file ) ;
     110      retval = fread( buf, 8, 1, file ) ;
    110111      buf[8] = '\0' ;
    111112      // DEBUG
     
    123124        delete d ;
    124125        fseek( file, size, SEEK_SET ) ;
    125         fread( buf, 8, 1, file ) ;
     126        retval = fread( buf, 8, 1, file ) ;
    126127        buf[8] = '\0' ;
    127128        // DEBUG
  • trunk/external-alma/atnf/PKSIO/SDFITSreader.cc

    r1757 r2940  
    146146  // Move to the SDFITS extension.
    147147  cALFA = cALFA_BD = cALFA_CIMA = 0;
    148   if (fits_movnam_hdu(cSDptr, BINARY_TBL, "SINGLE DISH", 0, &cStatus)) {
     148  if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"SINGLE DISH", 0, &cStatus)) {
    149149    // No SDFITS table, look for BDFITS or CIMAFITS.
    150150    cStatus = 0;
    151     if (fits_movnam_hdu(cSDptr, BINARY_TBL, "BDFITS", 0, &cStatus) == 0) {
     151    if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"BDFITS", 0, &cStatus) == 0) {
    152152      cALFA_BD = 1;
    153153
    154154    } else {
    155155      cStatus = 0;
    156       if (fits_movnam_hdu(cSDptr, BINARY_TBL, "CIMAFITS", 0, &cStatus) == 0) {
     156      if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"CIMAFITS", 0, &cStatus) == 0) {
    157157        cALFA_CIMA = 1;
    158158
    159159        // Check for later versions of CIMAFITS.
    160160        float version;
    161         readParm("VERSION", TFLOAT, &version);
     161        readParm((char *)"VERSION", TFLOAT, &version);
    162162        if (version >= 2.0f) cALFA_CIMA = int(version);
    163163
     
    188188  // GBT data.
    189189  char telescope[32];
    190   readParm("TELESCOP", TSTRING, telescope);      // Core.
     190  readParm((char *)"TELESCOP", TSTRING, telescope);      // Core.
    191191  cGBT = strncmp(telescope, "GBT", 3) == 0 ||
    192          strncmp(telescope, "NRAO_GBT", 8) == 0;
     192         strncmp(telescope, (char *)"NRAO_GBT", 8) == 0;
    193193
    194194
    195195  // Check that the DATA array column is present.
    196   findData(DATA, "DATA", TFLOAT);
     196  findData(DATA, (char *)"DATA", TFLOAT);
    197197  haveSpectra = cHaveSpectra = cData[DATA].colnum > 0;
    198198
     
    211211      // no TDIM (or MAXISn) card; use the LAGS_IN value.
    212212      cNAxes = 5;
    213       readParm("LAGS_IN", TLONG, cNAxis);
     213      readParm((char *)"LAGS_IN", TLONG, cNAxis);
    214214      cNAxis[1] = 1;
    215215      cNAxis[2] = 1;
     
    231231    }
    232232
    233     findData(FLAGGED, "FLAGGED", TBYTE);
     233    findData(FLAGGED, (char *)"FLAGGED", TBYTE);
    234234
    235235  } else {
    236236    // DATA column not present, check for a DATAXED keyword.
    237     findData(DATAXED, "DATAXED", TSTRING);
     237    findData(DATAXED, (char *)"DATAXED", TSTRING);
    238238    if (cData[DATAXED].colnum < 0) {
    239239      log(LogOrigin( className, methodName, WHERE ), LogIO::SEVERE, "DATA array column absent from binary table.");
     
    244244    // Determine the number of axes and their length.
    245245    char dataxed[32];
    246     readParm("DATAXED", TSTRING, dataxed);
     246    readParm((char *)"DATAXED", TSTRING, dataxed);
    247247
    248248    for (int iaxis = 0; iaxis < 5; iaxis++) cNAxis[iaxis] = 0;
     
    254254  }
    255255
    256   char  *CTYPE[5] = {"CTYPE1", "CTYPE2", "CTYPE3", "CTYPE4", "CTYPE5"};
    257   char  *CRPIX[5] = {"CRPIX1", "CRPIX2", "CRPIX3", "CRPIX4", "CRPIX5"};
    258   char  *CRVAL[5] = {"CRVAL1", "CRVAL2", "CRVAL3", "CRVAL4", "CRVAL5"};
    259   char  *CDELT[5] = {"CDELT1", "CDELT2", "CDELT3", "CDELT4", "CDELT5"};
     256  char  *CTYPE[5] = {(char *)"CTYPE1", (char *)"CTYPE2", (char *)"CTYPE3", (char *)"CTYPE4", (char *)"CTYPE5"};
     257  char  *CRPIX[5] = {(char *)"CRPIX1", (char *)"CRPIX2", (char *)"CRPIX3", (char *)"CRPIX4", (char *)"CRPIX5"};
     258  char  *CRVAL[5] = {(char *)"CRVAL1", (char *)"CRVAL2", (char *)"CRVAL3", (char *)"CRVAL4", (char *)"CRVAL5"};
     259  char  *CDELT[5] = {(char *)"CDELT1", (char *)"CDELT2", (char *)"CDELT3", (char *)"CDELT4", (char *)"CDELT5"};
    260260
    261261  // Find required DATA array axes.
     
    335335    // Fixed in ALFA CIMAFITS.
    336336    cRaAxis = 2;
    337     raCRVAL = "CRVAL2A";
     337    raCRVAL = (char *)"CRVAL2A";
    338338
    339339    cDecAxis = 3;
    340     decCRVAL = "CRVAL3A";
     340    decCRVAL = (char *)"CRVAL3A";
    341341  }
    342342
     
    350350
    351351  // Set up machinery for data retrieval.
    352   findData(SCAN,     "SCAN",     TINT);         // Shared.
    353   findData(CYCLE,    "CYCLE",    TINT);         // Additional.
    354   findData(DATE_OBS, "DATE-OBS", TSTRING);      // Core.
     352  findData(SCAN,     (char *)"SCAN",     TINT);         // Shared.
     353  findData(CYCLE,    (char *)"CYCLE",    TINT);         // Additional.
     354  findData(DATE_OBS, (char *)"DATE-OBS", TSTRING);      // Core.
    355355
    356356  if (cTimeAxis >= 0) {
     
    367367
    368368  } else {
    369     findData(TIME,   "TIME",     TDOUBLE);      // Core.
    370   }
    371 
    372   findData(EXPOSURE, "EXPOSURE", TFLOAT);       // Core.
    373   findData(OBJECT,   "OBJECT",   TSTRING);      // Core.
    374   findData(OBJ_RA,   "OBJ-RA",   TDOUBLE);      // Additional.
    375   findData(OBJ_DEC,  "OBJ-DEC",  TDOUBLE);      // Additional.
    376   findData(RESTFRQ,  "RESTFRQ",  TDOUBLE);      // Additional.
    377   findData(OBSMODE,  "OBSMODE",  TSTRING);      // Shared.
    378 
    379   findData(BEAM,     "BEAM",     TSHORT);       // Additional.
    380   findData(IF,       "IF",       TSHORT);       // Additional.
     369    findData(TIME,   (char *)"TIME",     TDOUBLE);      // Core.
     370  }
     371
     372  findData(EXPOSURE, (char *)"EXPOSURE", TFLOAT);       // Core.
     373  findData(OBJECT,   (char *)"OBJECT",   TSTRING);      // Core.
     374  findData(OBJ_RA,   (char *)"OBJ-RA",   TDOUBLE);      // Additional.
     375  findData(OBJ_DEC,  (char *)"OBJ-DEC",  TDOUBLE);      // Additional.
     376  findData(RESTFRQ,  (char *)"RESTFRQ",  TDOUBLE);      // Additional.
     377  findData(OBSMODE,  (char *)"OBSMODE",  TSTRING);      // Shared.
     378
     379  findData(BEAM,     (char *)"BEAM",     TSHORT);       // Additional.
     380  findData(IF,       (char *)"IF",       TSHORT);       // Additional.
    381381  findData(FqRefVal,  fqCRVAL,   TDOUBLE);      // Frequency reference value.
    382382  findData(FqDelt,    fqCDELT,   TDOUBLE);      // Frequency increment.
     
    384384  findData(RA,        raCRVAL,   TDOUBLE);      // Right ascension.
    385385  findData(DEC,      decCRVAL,   TDOUBLE);      // Declination.
    386   findData(SCANRATE, "SCANRATE", TFLOAT);       // Additional.
    387 
    388   findData(TSYS,     "TSYS",     TFLOAT);       // Core.
    389   findData(CALFCTR,  "CALFCTR",  TFLOAT);       // Additional.
    390   findData(XCALFCTR, "XCALFCTR", TFLOAT);       // Additional.
    391   findData(BASELIN,  "BASELIN",  TFLOAT);       // Additional.
    392   findData(BASESUB,  "BASESUB",  TFLOAT);       // Additional.
    393   findData(XPOLDATA, "XPOLDATA", TFLOAT);       // Additional.
    394 
    395   findData(REFBEAM,  "REFBEAM",  TSHORT);       // Additional.
    396   findData(TCAL,     "TCAL",     TFLOAT);       // Shared.
    397   findData(TCALTIME, "TCALTIME", TSTRING);      // Additional.
    398   findData(AZIMUTH,  "AZIMUTH",  TFLOAT);       // Shared.
    399   findData(ELEVATIO, "ELEVATIO", TFLOAT);       // Shared.
    400   findData(PARANGLE, "PARANGLE", TFLOAT);       // Additional.
    401   findData(FOCUSAXI, "FOCUSAXI", TFLOAT);       // Additional.
    402   findData(FOCUSTAN, "FOCUSTAN", TFLOAT);       // Additional.
    403   findData(FOCUSROT, "FOCUSROT", TFLOAT);       // Additional.
    404   findData(TAMBIENT, "TAMBIENT", TFLOAT);       // Shared.
    405   findData(PRESSURE, "PRESSURE", TFLOAT);       // Shared.
    406   findData(HUMIDITY, "HUMIDITY", TFLOAT);       // Shared.
    407   findData(WINDSPEE, "WINDSPEE", TFLOAT);       // Shared.
    408   findData(WINDDIRE, "WINDDIRE", TFLOAT);       // Shared.
     386  findData(SCANRATE, (char *)"SCANRATE", TFLOAT);       // Additional.
     387
     388  findData(TSYS,     (char *)"TSYS",     TFLOAT);       // Core.
     389  findData(CALFCTR,  (char *)"CALFCTR",  TFLOAT);       // Additional.
     390  findData(XCALFCTR, (char *)"XCALFCTR", TFLOAT);       // Additional.
     391  findData(BASELIN,  (char *)"BASELIN",  TFLOAT);       // Additional.
     392  findData(BASESUB,  (char *)"BASESUB",  TFLOAT);       // Additional.
     393  findData(XPOLDATA, (char *)"XPOLDATA", TFLOAT);       // Additional.
     394
     395  findData(REFBEAM,  (char *)"REFBEAM",  TSHORT);       // Additional.
     396  findData(TCAL,     (char *)"TCAL",     TFLOAT);       // Shared.
     397  findData(TCALTIME, (char *)"TCALTIME", TSTRING);      // Additional.
     398  findData(AZIMUTH,  (char *)"AZIMUTH",  TFLOAT);       // Shared.
     399  findData(ELEVATIO, (char *)"ELEVATIO", TFLOAT);       // Shared.
     400  findData(PARANGLE, (char *)"PARANGLE", TFLOAT);       // Additional.
     401  findData(FOCUSAXI, (char *)"FOCUSAXI", TFLOAT);       // Additional.
     402  findData(FOCUSTAN, (char *)"FOCUSTAN", TFLOAT);       // Additional.
     403  findData(FOCUSROT, (char *)"FOCUSROT", TFLOAT);       // Additional.
     404  findData(TAMBIENT, (char *)"TAMBIENT", TFLOAT);       // Shared.
     405  findData(PRESSURE, (char *)"PRESSURE", TFLOAT);       // Shared.
     406  findData(HUMIDITY, (char *)"HUMIDITY", TFLOAT);       // Shared.
     407  findData(WINDSPEE, (char *)"WINDSPEE", TFLOAT);       // Shared.
     408  findData(WINDDIRE, (char *)"WINDDIRE", TFLOAT);       // Shared.
    409409
    410410  findData(STOKES,    polCRVAL,  TINT);
    411   findData(SIG,       "SIG",     TSTRING);
    412   findData(CAL,       "CAL",     TSTRING);
    413 
    414   findData(RVSYS,     "RVSYS",   TDOUBLE);
    415   findData(VFRAME,    "VFRAME",  TDOUBLE);
    416   findData(VELDEF,    "VELDEF",  TSTRING);
     411  findData(SIG,       (char *)"SIG",     TSTRING);
     412  findData(CAL,       (char *)"CAL",     TSTRING);
     413
     414  findData(RVSYS,     (char *)"RVSYS",   TDOUBLE);
     415  findData(VFRAME,    (char *)"VFRAME",  TDOUBLE);
     416  findData(VELDEF,    (char *)"VELDEF",  TSTRING);
    417417
    418418  if (cStatus) {
     
    429429    cScanNo = 0;
    430430    if (cALFA_CIMA) {
    431       findData(SCAN,  "SCAN_ID", TINT);
     431      findData(SCAN,  (char *)"SCAN_ID", TINT);
    432432      if (cALFA_CIMA > 1) {
    433433        // Note that RECNUM increases by cNAxisTime per row.
    434         findData(CYCLE, "RECNUM", TINT);
     434        findData(CYCLE, (char *)"RECNUM", TINT);
    435435      } else {
    436         findData(CYCLE, "SUBSCAN", TINT);
     436        findData(CYCLE, (char *)"SUBSCAN", TINT);
    437437      }
    438438    } else if (cALFA_BD) {
    439       findData(SCAN,  "SCAN_NUMBER", TINT);
    440       findData(CYCLE, "PATTERN_NUMBER", TINT);
     439      findData(SCAN,  (char *)"SCAN_NUMBER", TINT);
     440      findData(CYCLE, (char *)"PATTERN_NUMBER", TINT);
    441441    }
    442442  } else {
     
    456456  if (cALFA) {
    457457    // ALFA INPUT_ID, 0-relative (overrides BEAM column if present).
    458     findData(BEAM, "INPUT_ID", TSHORT);
     458    findData(BEAM, (char *)"INPUT_ID", TSHORT);
    459459    cBeam_1rel = 0;
    460460
     
    465465    } else {
    466466      // ms2sdfits output, 0-relative "feed" number.
    467       findData(BEAM, "MAIN_FEED1", TSHORT);
     467      findData(BEAM, (char *)"MAIN_FEED1", TSHORT);
    468468      cBeam_1rel = 0;
    469469    }
     
    475475    // ALFA data, 0-relative.
    476476    if (cALFA_CIMA > 1) {
    477       findData(IF, "IFN", TSHORT);
     477      findData(IF, (char *)"IFN", TSHORT);
    478478    } else {
    479       findData(IF, "IFVAL", TSHORT);
     479      findData(IF, (char *)"IFVAL", TSHORT);
    480480    }
    481481    cIF_1rel = 0;
     
    484484  // ms2sdfits writes a scalar "TSYS" column that averages the polarizations.
    485485  int colnum;
    486   findCol("SYSCAL_TSYS", &colnum);
     486  findCol((char *)"SYSCAL_TSYS", &colnum);
    487487  if (colnum > 0) {
    488488    // This contains the vector Tsys.
    489     findData(TSYS, "SYSCAL_TSYS", TFLOAT);
     489    findData(TSYS, (char *)"SYSCAL_TSYS", TFLOAT);
    490490  }
    491491
     
    493493
    494494  if (cData[SCANRATE].colnum < 0) {
    495     findData(SCANRATE, "FIELD_POINTING_DIR_RATE", TFLOAT);
     495    findData(SCANRATE, (char *)"FIELD_POINTING_DIR_RATE", TFLOAT);
    496496  }
    497497
    498498  if (cData[RESTFRQ].colnum < 0) {
    499     findData(RESTFRQ, "RESTFREQ", TDOUBLE);
     499    findData(RESTFRQ, (char *)"RESTFREQ", TDOUBLE);
    500500    if (cData[RESTFRQ].colnum < 0) {
    501       findData(RESTFRQ, "SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE);
     501      findData(RESTFRQ, (char *)"SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE);
    502502    }
    503503  }
    504504
    505505  if (cData[OBJ_RA].colnum < 0) {
    506     findData(OBJ_RA, "SOURCE_DIRECTION", TDOUBLE);
     506    findData(OBJ_RA, (char *)"SOURCE_DIRECTION", TDOUBLE);
    507507  }
    508508  if (cData[OBJ_DEC].colnum < 0) {
    509     findData(OBJ_DEC, "SOURCE_DIRECTION", TDOUBLE);
     509    findData(OBJ_DEC, (char *)"SOURCE_DIRECTION", TDOUBLE);
    510510  }
    511511
     
    513513
    514514  if (cData[TCAL].colnum < 0) {
    515     findData(TCAL, "SYSCAL_TCAL", TFLOAT);
     515    findData(TCAL, (char *)"SYSCAL_TCAL", TFLOAT);
    516516  } else if (cALFA_BD) {
    517517    // ALFA BDFITS has a different TCAL with 64 elements - kill it!
    518     findData(TCAL, "NO NO NO", TFLOAT);
     518    findData(TCAL, (char *)"NO NO NO", TFLOAT);
    519519  }
    520520
    521521  if (cALFA_BD) {
    522522    // ALFA BDFITS.
    523     findData(AZIMUTH, "CRVAL2B", TFLOAT);
    524     findData(ELEVATIO, "CRVAL3B", TFLOAT);
     523    findData(AZIMUTH, (char *)(char *)"CRVAL2B", TFLOAT);
     524    findData(ELEVATIO, (char *)(char *)"CRVAL3B", TFLOAT);
    525525  }
    526526
    527527  if (cALFA) {
    528528    // ALFA data.
    529     findData(PARANGLE, "PARA_ANG", TFLOAT);
     529    findData(PARANGLE, (char *)"PARA_ANG", TFLOAT);
    530530  }
    531531
    532532  if (cData[TAMBIENT].colnum < 0) {
    533     findData(TAMBIENT, "WEATHER_TEMPERATURE", TFLOAT);
     533    findData(TAMBIENT, (char *)"WEATHER_TEMPERATURE", TFLOAT);
    534534  }
    535535
    536536  if (cData[PRESSURE].colnum < 0) {
    537     findData(PRESSURE, "WEATHER_PRESSURE", TFLOAT);
     537    findData(PRESSURE, (char *)"WEATHER_PRESSURE", TFLOAT);
    538538  }
    539539
    540540  if (cData[HUMIDITY].colnum < 0) {
    541     findData(HUMIDITY, "WEATHER_REL_HUMIDITY", TFLOAT);
     541    findData(HUMIDITY, (char *)"WEATHER_REL_HUMIDITY", TFLOAT);
    542542  }
    543543
    544544  if (cData[WINDSPEE].colnum < 0) {
    545     findData(WINDSPEE, "WEATHER_WIND_SPEED", TFLOAT);
     545    findData(WINDSPEE, (char *)"WEATHER_WIND_SPEED", TFLOAT);
    546546  }
    547547
    548548  if (cData[WINDDIRE].colnum < 0) {
    549     findData(WINDDIRE, "WEATHER_WIND_DIRECTION", TFLOAT);
     549    findData(WINDDIRE, (char *)"WEATHER_WIND_DIRECTION", TFLOAT);
    550550  }
    551551
     
    680680          if (cData[DATAXED].colnum > 0) {
    681681            char dataxed[32];
    682             readParm("DATAXED", TSTRING, dataxed);
     682            readParm((char *)"DATAXED", TSTRING, dataxed);
    683683
    684684            sscanf(dataxed, "(%ld,%ld,%ld,%ld,%ld)", cNAxis, cNAxis+1,
     
    835835  if (cALFA_CIMA > 1) {
    836836    // FFTs per second when the Mock correlator operates in RFI blanking mode.
    837     readData("PHFFTACC", TFLOAT, 0, &cALFAacc);
     837    readData((char *)"PHFFTACC", TFLOAT, 0, &cALFAacc);
    838838  }
    839839
     
    872872
    873873  // Read parameter values.
    874   readParm("OBSERVER", TSTRING, observer);              // Shared.
    875   readParm("PROJID",   TSTRING, project);               // Shared.
    876   readParm("TELESCOP", TSTRING, telescope);             // Core.
     874  readParm((char *)"OBSERVER", TSTRING, observer);              // Shared.
     875  readParm((char *)"PROJID",   TSTRING, project);               // Shared.
     876  readParm((char *)"TELESCOP", TSTRING, telescope);             // Core.
    877877
    878878  antPos[0] = 0.0;
    879879  antPos[1] = 0.0;
    880880  antPos[2] = 0.0;
    881   if (readParm("ANTENNA_POSITION", TDOUBLE, antPos)) {
    882     readParm("OBSGEO-X",  TDOUBLE, antPos);             // Additional.
    883     readParm("OBSGEO-Y",  TDOUBLE, antPos + 1);         // Additional.
    884     readParm("OBSGEO-Z",  TDOUBLE, antPos + 2);         // Additional.
     881  if (readParm((char *)"ANTENNA_POSITION", TDOUBLE, antPos)) {
     882    readParm((char *)"OBSGEO-X",  TDOUBLE, antPos);             // Additional.
     883    readParm((char *)"OBSGEO-Y",  TDOUBLE, antPos + 1);         // Additional.
     884    readParm((char *)"OBSGEO-Z",  TDOUBLE, antPos + 2);         // Additional.
    885885  }
    886886
     
    919919  }
    920920
    921   readParm("EQUINOX",  TFLOAT,  &equinox);              // Shared.
     921  readParm((char *)"EQUINOX",  TFLOAT,  &equinox);              // Shared.
    922922  if (cStatus == 405) {
    923923    // EQUINOX was written as string value in early versions.
    924924    cStatus = 0;
    925925    char strtmp[32];
    926     readParm("EQUINOX", TSTRING, strtmp);
     926    readParm((char *)"EQUINOX", TSTRING, strtmp);
    927927    sscanf(strtmp, "%f", &equinox);
    928928  }
    929929
    930   if (readParm("RADESYS", TSTRING, radecsys)) {         // Additional.
    931     if (readParm("RADECSYS", TSTRING, radecsys)) {      // Additional.
     930  if (readParm((char *)"RADESYS", TSTRING, radecsys)) {         // Additional.
     931    if (readParm((char *)"RADECSYS", TSTRING, radecsys)) {      // Additional.
    932932      strcpy(radecsys, "");
    933933    }
    934934  }
    935935
    936   if (readParm("SPECSYS", TSTRING, dopplerFrame)) {     // Additional.
     936  if (readParm((char *)"SPECSYS", TSTRING, dopplerFrame)) {     // Additional.
    937937    // Fallback value.
    938938    strcpy(dopplerFrame, "TOPOCENT");
     
    942942    // Added few more codes currently (as of 2009 Oct) used in the GBT
    943943    // SDFITS (based io_sdfits_define.pro of GBTIDL). - TT
    944     if (readParm("VELFRAME", TSTRING, dopplerFrame)) {  // Additional.
     944    if (readParm((char *)"VELFRAME", TSTRING, dopplerFrame)) {  // Additional.
    945945      // No, try digging it out of the CTYPE card (AIPS convention).
    946946      char keyw[9], ctype[9];
     
    10081008  readTime(1, 1, datobs, utc);
    10091009  readData(FqRefVal, 1, &refFreq);
    1010   readParm("BANDWID", TDOUBLE, &bandwidth);             // Core.
     1010  readParm((char *)"BANDWID", TDOUBLE, &bandwidth);             // Core.
    10111011
    10121012  if (cStatus) {
     
    10601060            if (cALFA_BD) {
    10611061              unsigned char invert;
    1062               readData("UPPERSB", TBYTE, irow, &invert);
     1062              readData((char *)"UPPERSB", TBYTE, irow, &invert);
    10631063
    10641064              if (invert) {
     
    16051605    unsigned char invert;
    16061606    int anynul, colnum;
    1607     findCol("UPPERSB", &colnum);
     1607    findCol((char *)"UPPERSB", &colnum);
    16081608    fits_read_col(cSDptr, TBYTE, colnum, cRow, 1, 1, 0, &invert, &anynul,
    16091609                  &cStatus);
     
    17491749          // Rescale according to the number of unblanked accumulations.
    17501750          int colnum, naccum;
    1751           findCol("STAT", &colnum);
     1751          findCol((char *)"STAT", &colnum);
    17521752          fits_read_col(cSDptr, TINT, colnum, cRow, 10*(cTimeIdx-1)+2, 1, 0,
    17531753                        &naccum, &anynul, &cStatus);
     
    23462346  char chars[32];
    23472347  if (cALFA_BD) {
    2348     readData("OBS_NAME", TSTRING, cRow, chars);
     2348    readData((char *)"OBS_NAME", TSTRING, cRow, chars);
    23492349  } else {
    2350     readData("SCANTYPE", TSTRING, cRow, chars);
     2350    readData((char *)"SCANTYPE", TSTRING, cRow, chars);
    23512351  }
    23522352
     
    24062406  if (cALFA_CIMA > 1) {
    24072407    int   colnum, naccum;
    2408     findCol("STAT", &colnum);
     2408    findCol((char *)"STAT", &colnum);
    24092409    fits_read_col(cSDptr, TINT, colnum, cRow, 2, 1, 0, &naccum, &anynul,
    24102410                  &cStatus);
  • trunk/external-alma/atnf/PKSIO/SDFITSwriter.cc

    r1757 r2940  
    230230
    231231  // SCAN (shared, real).
    232   fits_insert_col(cSDptr, ++ncol, "SCAN", "1I", &cStatus);
     232  fits_insert_col(cSDptr, ++ncol, (char *)"SCAN", (char *)"1I", &cStatus);
    233233
    234234  // CYCLE (additional, real).
    235   fits_insert_col(cSDptr, ++ncol, "CYCLE", "1J", &cStatus);
     235  fits_insert_col(cSDptr, ++ncol, (char *)"CYCLE", (char *)"1J", &cStatus);
    236236
    237237  // DATE-OBS (core, real).
    238   fits_insert_col(cSDptr, ++ncol, "DATE-OBS", "10A", &cStatus);
     238  fits_insert_col(cSDptr, ++ncol, (char *)"DATE-OBS", (char *)"10A", &cStatus);
    239239
    240240  // TIME (core, real).
    241   fits_insert_col(cSDptr, ++ncol, "TIME", "1D", &cStatus);
     241  fits_insert_col(cSDptr, ++ncol, (char *)"TIME", (char *)"1D", &cStatus);
    242242  sprintf(tunit, "TUNIT%d", ncol);
    243243  fits_write_key_str(cSDptr, tunit, "s", "units of field", &cStatus);
    244244
    245245  // EXPOSURE (core, real).
    246   fits_insert_col(cSDptr, ++ncol, "EXPOSURE", "1E", &cStatus);
     246  fits_insert_col(cSDptr, ++ncol, (char *)"EXPOSURE", (char *)"1E", &cStatus);
    247247  sprintf(tunit, "TUNIT%d", ncol);
    248248  fits_write_key_str(cSDptr, tunit, "s", "units of field", &cStatus);
    249249
    250250  // OBJECT (core, real).
    251   fits_insert_col(cSDptr, ++ncol, "OBJECT", "16A", &cStatus);
     251  fits_insert_col(cSDptr, ++ncol, (char *)"OBJECT", (char *)"16A", &cStatus);
    252252
    253253  // OBJ-RA (additional, real).
    254   fits_insert_col(cSDptr, ++ncol, "OBJ-RA", "1D", &cStatus);
     254  fits_insert_col(cSDptr, ++ncol, (char *)"OBJ-RA", (char *)"1D", &cStatus);
    255255  sprintf(tunit, "TUNIT%d", ncol);
    256256  fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
    257257
    258258  // OBJ-DEC (additional, real).
    259   fits_insert_col(cSDptr, ++ncol, "OBJ-DEC", "1D", &cStatus);
     259  fits_insert_col(cSDptr, ++ncol, (char *)"OBJ-DEC", (char *)"1D", &cStatus);
    260260  sprintf(tunit, "TUNIT%d", ncol);
    261261  fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
    262262
    263263  // RESTFRQ (additional, real).
    264   fits_insert_col(cSDptr, ++ncol, "RESTFRQ", "1D", &cStatus);
     264  fits_insert_col(cSDptr, ++ncol, (char *)"RESTFRQ",(char *) "1D", &cStatus);
    265265  sprintf(tunit, "TUNIT%d", ncol);
    266266  fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus);
    267267
    268268  // OBSMODE (shared, real).
    269   fits_insert_col(cSDptr, ++ncol, "OBSMODE", "16A", &cStatus);
     269  fits_insert_col(cSDptr, ++ncol, (char *)"OBSMODE", (char *)"16A", &cStatus);
    270270
    271271  // BEAM (additional, real).
    272   fits_insert_col(cSDptr, ++ncol, "BEAM", "1I", &cStatus);
     272  fits_insert_col(cSDptr, ++ncol, (char *)"BEAM", (char *)"1I", &cStatus);
    273273
    274274  // IF (additional, real).
    275   fits_insert_col(cSDptr, ++ncol, "IF", "1I", &cStatus);
     275  fits_insert_col(cSDptr, ++ncol, (char *)"IF", (char *)"1I", &cStatus);
    276276
    277277  // FREQRES (core, real).
    278   fits_insert_col(cSDptr, ++ncol, "FREQRES", "1D", &cStatus);
     278  fits_insert_col(cSDptr, ++ncol, (char *)"FREQRES", (char *)"1D", &cStatus);
    279279  sprintf(tunit, "TUNIT%d", ncol);
    280280  fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus);
    281281
    282282  // BANDWID (core, real).
    283   fits_insert_col(cSDptr, ++ncol, "BANDWID", "1D", &cStatus);
     283  fits_insert_col(cSDptr, ++ncol, (char *)"BANDWID", (char *)"1D", &cStatus);
    284284  sprintf(tunit, "TUNIT%d", ncol);
    285285  fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus);
     
    290290
    291291  // CRPIX1 (core, real).
    292   fits_insert_col(cSDptr, ++ncol, "CRPIX1", "1E", &cStatus);
     292  fits_insert_col(cSDptr, ++ncol, (char *)"CRPIX1", (char *)"1E", &cStatus);
    293293
    294294  // CRVAL1 (core, real).
    295   fits_insert_col(cSDptr, ++ncol, "CRVAL1", "1D", &cStatus);
     295  fits_insert_col(cSDptr, ++ncol, (char *)"CRVAL1", (char *)"1D", &cStatus);
    296296  sprintf(tunit, "TUNIT%d", ncol);
    297297  fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus);
    298298
    299299  // CDELT1 (core, real).
    300   fits_insert_col(cSDptr, ++ncol, "CDELT1", "1D", &cStatus);
     300  fits_insert_col(cSDptr, ++ncol, (char *)"CDELT1", (char *)"1D", &cStatus);
    301301  sprintf(tunit, "TUNIT%d", ncol);
    302302  fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus);
     
    330330
    331331  // CRVAL3 (core, real).
    332   fits_insert_col(cSDptr, ++ncol, "CRVAL3", "1D", &cStatus);
     332  fits_insert_col(cSDptr, ++ncol, (char *)"CRVAL3", (char *)"1D", &cStatus);
    333333  sprintf(tunit, "TUNIT%d", ncol);
    334334  fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
     
    347347
    348348  // CRVAL4 (core, real).
    349   fits_insert_col(cSDptr, ++ncol, "CRVAL4", "1D", &cStatus);
     349  fits_insert_col(cSDptr, ++ncol, (char *)"CRVAL4", (char *)"1D", &cStatus);
    350350  sprintf(tunit, "TUNIT%d", ncol);
    351351  fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
     
    355355
    356356  // SCANRATE (additional, real).
    357   fits_insert_col(cSDptr, ++ncol, "SCANRATE", "2E", &cStatus);
     357  fits_insert_col(cSDptr, ++ncol, (char *)"SCANRATE", (char *)"2E", &cStatus);
    358358  sprintf(tunit, "TUNIT%d", ncol);
    359359  fits_write_key_str(cSDptr, tunit, "deg/s", "units of field", &cStatus);
     
    377377  // TSYS (core, real).
    378378  sprintf(tform, "%dE", maxNPol);
    379   fits_insert_col(cSDptr, ++ncol, "TSYS", tform, &cStatus);
     379  fits_insert_col(cSDptr, ++ncol, (char *)"TSYS", tform, &cStatus);
    380380  sprintf(tunit, "TUNIT%d", ncol);
    381381  fits_write_key_str(cSDptr, tunit, bunit, "units of field", &cStatus);
     
    383383  // CALFCTR (additional, real).
    384384  sprintf(tform, "%dE", maxNPol);
    385   fits_insert_col(cSDptr, ++ncol, "CALFCTR", tform, &cStatus);
     385  fits_insert_col(cSDptr, ++ncol, (char *)"CALFCTR", tform, &cStatus);
    386386
    387387  if (cHaveBase) {
    388388    // BASELIN (additional, real).
    389389    sprintf(tform, "%dE", 2*maxNPol);
    390     fits_insert_col(cSDptr, ++ncol, "BASELIN", tform, &cStatus);
     390    fits_insert_col(cSDptr, ++ncol, (char *)"BASELIN", tform, &cStatus);
    391391    long tdim[] = {2, maxNPol};
    392392    fits_write_tdim(cSDptr, ncol, 2, tdim, &cStatus);
     
    394394    // BASESUB (additional, real).
    395395    sprintf(tform, "%dE", 24*maxNPol);
    396     fits_insert_col(cSDptr, ++ncol, "BASESUB", tform, &cStatus);
     396    fits_insert_col(cSDptr, ++ncol, (char *)"BASESUB", tform, &cStatus);
    397397    tdim[0] = 24;
    398398    fits_write_tdim(cSDptr, ncol, 2, tdim, &cStatus);
     
    407407    strcpy(tform, "1PE");
    408408  }
    409   fits_insert_col(cSDptr, ++ncol, "DATA", tform, &cStatus);
     409  fits_insert_col(cSDptr, ++ncol, (char *)"DATA", tform, &cStatus);
    410410
    411411  if (cDoTDIM) {
    412412    // TDIMn varies with IF, write a TDIM column.
    413413    sprintf(ttype, "TDIM%d", ncol);
    414     fits_insert_col(cSDptr, ++ncol, ttype, "16A", &cStatus);
     414    fits_insert_col(cSDptr, ++ncol, ttype, (char *)"16A", &cStatus);
    415415  } else {
    416416    // TDIMn fixed for each IF, write a TDIM keyword.
     
    430430    strcpy(tform, "1PB");
    431431  }
    432   fits_insert_col(cSDptr, ++ncol, "FLAGGED", tform, &cStatus);
     432  fits_insert_col(cSDptr, ++ncol, (char *)"FLAGGED", tform, &cStatus);
    433433
    434434  if (cDoTDIM) {
    435435    // TDIMn varies with IF, write a TDIM column.
    436436    sprintf(ttype, "TDIM%d", ncol);
    437     fits_insert_col(cSDptr, ++ncol, ttype, "16A", &cStatus);
     437    fits_insert_col(cSDptr, ++ncol, ttype, (char *)"16A", &cStatus);
    438438  } else {
    439439    // TDIMn fixed for each IF, write a TDIM keyword.
     
    445445    // XCALFCTR (additional, real).
    446446    sprintf(tform, "%dE", 2);
    447     fits_insert_col(cSDptr, ++ncol, "XCALFCTR", tform, &cStatus);
     447    fits_insert_col(cSDptr, ++ncol, (char *)"XCALFCTR", tform, &cStatus);
    448448
    449449    // XPOLDATA (additional, real).
     
    455455      strcpy(tform, "1PE");
    456456    }
    457     fits_insert_col(cSDptr, ++ncol, "XPOLDATA", tform, &cStatus);
     457    fits_insert_col(cSDptr, ++ncol, (char *)"XPOLDATA", tform, &cStatus);
    458458
    459459    if (cDoTDIM) {
    460460      // TDIMn varies with IF, write a TDIM column.
    461461      sprintf(ttype, "TDIM%d", ncol);
    462       fits_insert_col(cSDptr, ++ncol, ttype, "16A", &cStatus);
     462      fits_insert_col(cSDptr, ++ncol, ttype, (char *)"16A", &cStatus);
    463463    } else {
    464464      // TDIMn fixed for each IF, write a TDIM keyword.
     
    474474    if (cIsMX) {
    475475      // REFBEAM (additional, real).
    476       fits_insert_col(cSDptr, ++ncol, "REFBEAM",  "1I", &cStatus);
     476      fits_insert_col(cSDptr, ++ncol, (char *)"REFBEAM",  (char *)"1I", &cStatus);
    477477    }
    478478
    479479    // TCAL (shared, real).
    480480    sprintf(tform, "%dE", min(maxNPol,2));
    481     fits_insert_col(cSDptr, ++ncol, "TCAL", tform, &cStatus);
     481    fits_insert_col(cSDptr, ++ncol, (char *)"TCAL", tform, &cStatus);
    482482    sprintf(tunit, "TUNIT%d", ncol);
    483483    fits_write_key_str(cSDptr, tunit, "Jy", "units of field", &cStatus);
    484484
    485485    // TCALTIME (additional, real).
    486     fits_insert_col(cSDptr, ++ncol, "TCALTIME",  "16A", &cStatus);
     486    fits_insert_col(cSDptr, ++ncol, (char *)"TCALTIME",  (char *)"16A", &cStatus);
    487487
    488488    // AZIMUTH (shared, real).
    489     fits_insert_col(cSDptr, ++ncol, "AZIMUTH",  "1E", &cStatus);
     489    fits_insert_col(cSDptr, ++ncol, (char *)"AZIMUTH",  (char *)"1E", &cStatus);
    490490    sprintf(tunit, "TUNIT%d", ncol);
    491491    fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
    492492
    493493    // ELEVATIO (shared, real).
    494     fits_insert_col(cSDptr, ++ncol, "ELEVATIO", "1E", &cStatus);
     494    fits_insert_col(cSDptr, ++ncol, (char *)"ELEVATIO", (char *)"1E", &cStatus);
    495495    sprintf(tunit, "TUNIT%d", ncol);
    496496    fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
    497497
    498498    // PARANGLE (additional, real).
    499     fits_insert_col(cSDptr, ++ncol, "PARANGLE", "1E", &cStatus);
     499    fits_insert_col(cSDptr, ++ncol, (char *)"PARANGLE", (char *)"1E", &cStatus);
    500500    sprintf(tunit, "TUNIT%d", ncol);
    501501    fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
    502502
    503503    // FOCUSAXI (additional, real).
    504     fits_insert_col(cSDptr, ++ncol, "FOCUSAXI", "1E", &cStatus);
     504    fits_insert_col(cSDptr, ++ncol, (char *)"FOCUSAXI", (char *)"1E", &cStatus);
    505505    sprintf(tunit, "TUNIT%d", ncol);
    506506    fits_write_key_str(cSDptr, tunit, "m", "units of field", &cStatus);
    507507
    508508    // FOCUSTAN (additional, real).
    509     fits_insert_col(cSDptr, ++ncol, "FOCUSTAN", "1E", &cStatus);
     509    fits_insert_col(cSDptr, ++ncol, (char *)"FOCUSTAN", (char *)"1E", &cStatus);
    510510    sprintf(tunit, "TUNIT%d", ncol);
    511511    fits_write_key_str(cSDptr, tunit, "m", "units of field", &cStatus);
    512512
    513513    // FOCUSROT (additional, real).
    514     fits_insert_col(cSDptr, ++ncol, "FOCUSROT", "1E", &cStatus);
    515     sprintf(tunit, "TUNIT%d", ncol);
    516     fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
     514    fits_insert_col(cSDptr, ++ncol, (char *)"FOCUSROT", (char *)"1E", &cStatus);
     515    sprintf(tunit, "TUNIT%d", ncol);
     516    fits_write_key_str(cSDptr, tunit, (char *)"deg", (char *)"units of field", &cStatus);
    517517
    518518    // TAMBIENT (shared, real).
    519     fits_insert_col(cSDptr, ++ncol, "TAMBIENT", "1E", &cStatus);
     519    fits_insert_col(cSDptr, ++ncol, (char *)"TAMBIENT", (char *)"1E", &cStatus);
    520520    sprintf(tunit, "TUNIT%d", ncol);
    521521    fits_write_key_str(cSDptr, tunit, "C", "units of field", &cStatus);
    522522
    523523    // PRESSURE (shared, real).
    524     fits_insert_col(cSDptr, ++ncol, "PRESSURE", "1E", &cStatus);
     524    fits_insert_col(cSDptr, ++ncol, (char *)"PRESSURE", (char *)"1E", &cStatus);
    525525    sprintf(tunit, "TUNIT%d", ncol);
    526526    fits_write_key_str(cSDptr, tunit, "Pa", "units of field", &cStatus);
    527527
    528528    // HUMIDITY (shared, real).
    529     fits_insert_col(cSDptr, ++ncol, "HUMIDITY", "1E", &cStatus);
     529    fits_insert_col(cSDptr, ++ncol, (char *)"HUMIDITY", (char *)"1E", &cStatus);
    530530    sprintf(tunit, "TUNIT%d", ncol);
    531531    fits_write_key_str(cSDptr, tunit, "%", "units of field", &cStatus);
    532532
    533533    // WINDSPEE (shared, real).
    534     fits_insert_col(cSDptr, ++ncol, "WINDSPEE", "1E", &cStatus);
     534    fits_insert_col(cSDptr, ++ncol, (char *)"WINDSPEE", (char *)"1E", &cStatus);
    535535    sprintf(tunit, "TUNIT%d", ncol);
    536536    fits_write_key_str(cSDptr, tunit, "m/s", "units of field", &cStatus);
    537537
    538538    // WINDDIRE (shared, real).
    539     fits_insert_col(cSDptr, ++ncol, "WINDDIRE", "1E", &cStatus);
     539    fits_insert_col(cSDptr, ++ncol, (char *)"WINDDIRE", (char *)"1E", &cStatus);
    540540    sprintf(tunit, "TUNIT%d", ncol);
    541541    fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
Note: See TracChangeset for help on using the changeset viewer.