Ignore:
Timestamp:
Feb 6, 2000, 4:11:55 PM (26 years ago)
Author:
ansari
Message:

Adaptations aux modifs DVList (comment/var) - Reza 6/2/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsioserver.cc

    r712 r721  
    896896  for(it = dvl.Begin(); it != dvl.End(); it++)
    897897    {
    898       char keytype= (*it).second.typ;
     898      char keytype= (*it).second.elval.typ;
    899899      char keyname[10];
    900900      strncpy(keyname,(*it).first.substr(0,64).c_str(),8);
     
    905905        case 'I' :
    906906          {
    907             int ival=(*it).second.mtv.iv;
     907            int ival=(*it).second.elval.mtv.iv;
    908908            strcpy(comment,"I entier");
    909909            fits_write_key(fptr,TINT,keyname,&ival,comment,&status);
     
    912912        case 'D' :
    913913          {
    914             double dval=(*it).second.mtv.dv;
     914            double dval=(*it).second.elval.mtv.dv;
    915915            strcpy(comment,"D double");
    916916            fits_write_key(fptr,TDOUBLE,keyname,&dval,comment,&status);
     
    920920          {
    921921            char strval[128];
    922             strncpy(strval,(*it).second.mtv.strv,127);
     922            strncpy(strval,(*it).second.elval.mtv.strv,127);
    923923            strcpy(comment,"S character string");
    924924            fits_write_key(fptr,TSTRING,keyname,&strval,comment,&status);
     
    12801280  for(it = dvl.Begin(); it != dvl.End(); it++) 
    12811281    {
    1282       int datatype=  key_type_PL2FITS( (*it).second.typ);
     1282      int datatype=  key_type_PL2FITS( (*it).second.elval.typ);
    12831283      // FLEN_KEYWORD est la longueur max d'un mot-cle. Il doit y avoir une
    12841284      // erreur dans la librairie fits qui donne FLEN_KEYWORD=72
     
    12931293        {
    12941294        case TINT :
    1295           ival=(*it).second.mtv.iv;
     1295          ival=(*it).second.elval.mtv.iv;
    12961296          strcpy(comment,"I entier");
    12971297//DBG          cerr << " Writing I " << (string)keyname << " = " << ival << endl;
     
    12991299          break;
    13001300        case TDOUBLE :
    1301           dval=(*it).second.mtv.dv;
     1301          dval=(*it).second.elval.mtv.dv;
    13021302          strcpy(comment,"D double");
    13031303//DBG          cerr << " Writing D " << (string)keyname << " = " << dval << endl;
     
    13051305          break;
    13061306        case TSTRING :
    1307           strncpy(strval, (*it).second.mtv.strv, 128); strval[127] = '\0';
     1307          strncpy(strval, (*it).second.elval.mtv.strv, 128); strval[127] = '\0';
    13081308          strcpy(comment,"S character string");
    13091309//DBG          cerr << " Writing S " << (string)keyname << " = " << (string)strval << endl;
     
    14381438  for(it = dvl.Begin(); it != dvl.End(); it++) 
    14391439    {
    1440       int datatype=  key_type_PL2FITS( (*it).second.typ);
     1440      int datatype=  key_type_PL2FITS( (*it).second.elval.typ);
    14411441      char keyname[16];
    14421442      strncpy(keyname, (*it).first.substr(0,64).c_str(),flen_keyword);
     
    14491449        {
    14501450        case TINT :
    1451           ival=(*it).second.mtv.iv;
     1451          ival=(*it).second.elval.mtv.iv;
    14521452          strcpy(comment," ");
    14531453//DBG          cerr << " Writing I " << (string)keyname << " = " << ival << endl;
     
    14551455          break;
    14561456        case TDOUBLE :
    1457           dval=(*it).second.mtv.dv;
     1457          dval=(*it).second.elval.mtv.dv;
    14581458          strcpy(comment," ");
    14591459//DBG          cerr << " Writing D " << (string)keyname << " = " << dval << endl;
     
    14611461          break;
    14621462        case TSTRING :
    1463           strncpy(strval, (*it).second.mtv.strv, 128); strval[127] = '\0';
     1463          strncpy(strval, (*it).second.elval.mtv.strv, 128); strval[127] = '\0';
    14641464          strcpy(comment," ");
    14651465//DBG          cerr << " Writing S " << (string)keyname << " = " << (string)strval << endl;
Note: See TracChangeset for help on using the changeset viewer.