Changeset 2795 in Sophya for trunk/SophyaLib


Ignore:
Timestamp:
Jun 3, 2005, 4:51:28 PM (20 years ago)
Author:
ansari
Message:

correction lecture ascii par EnumeratedSeq (pour tableau) , remplacement is.getline(...) par getline(istream,string) - Reza 3 Juin 2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/utilarr.cc

    r2752 r2795  
    281281  nbadtot = nbad = 0;
    282282  while (!is.eof()) {
    283     is.clear();
    284     is.getline(buff, 256);
    285     //    cout << " DBG : buff=" << buff << " :state=" << is.rdstate() << endl;
    286     line += buff;  nel = 0;
    287     if (is.good()) {
     283  /* Reza, Juin 2005 : Remplace par getline(istream, string) - plus sur
     284     is.clear();
     285     is.getline(buff, 256);    line += buff;  nel = 0; */
     286    line = "";
     287    getline(is, line);
     288    if (is.good() || is.eof()) {
    288289      if ((line.length() > 0) && (line[0]!=clm)) {
    289290        nel = Append(line, nbad, sep);
     
    293294        nbadtot += nbad;
    294295      }
    295       //              cout << " Decoding line = " << line << " Nel= " << nel << endl;
    296       line = "";
    297296    }
    298297  }
     298/* Reza, Juin 2005 : plus necessaire
    299299  if ((line.length() > 0) && (line[0]!=clm)) {
    300300    nel = Append(line, nbad, sep);
    301     //        cout << " Decoding Eline = " << line << " Nel= " << nel << endl;
    302     if (nel > 0)  {
    303       nr++;  n += nel;
    304     }
    305     nbadtot += nbad;
    306     line = "";
    307   }
     301    if (nel > 0)  {       nr++;  n += nel; }
     302    nbadtot += nbad;    line = ""; }
     303*/
    308304  if (nbadtot > 0)
    309305    cout << "EnumeratedSequence::FillFromFile()/Warning " << nbadtot
Note: See TracChangeset for help on using the changeset viewer.