Changeset 904521e in tol


Ignore:
Timestamp:
Feb 24, 2012, 11:45:43 AM (15 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
eb21277
Parents:
6eef720
Message:

Fixes #1448 in v3.2

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@4189 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/set_type/setgrainc.cpp

    r6eef720 r904521e  
    6767BList*      BSetFromFile::compiled_     = NIL;
    6868BInt          BSetFromFile::nSetFromFile_ = 0;
     69BInt          BSetFromFile::nSetFromFileGlobal_ = 0;
     70
    6971BTerminator BSetFromFile::terminator_   = NIL;
    7072
    … …  
    284286  if(BGrammar::Level()==0)
    285287  {
     288    nSetFromFileGlobal_++;
    286289    compiled_ = Cons(this, compiled_);
    287290    DecNRefs();
    … …  
    312315  if(BGrammar::Level()==0)
    313316  {
     317    nSetFromFileGlobal_++;
    314318    compiled_ = Cons(this, compiled_);
    315319    DecNRefs();
    … …  
    336340  if(Level()==0)
    337341  {
     342    nSetFromFileGlobal_--;
    338343    IncNRefs();
    339344    compiled_=LstRemoveAtom(compiled_,this);
    … …  
    18311836    BText expression = BText("Include(\"")+path+"\")";
    18321837    BSetFromFile* set= (BSetFromFile*)(GraSet()->EvaluateExpr(expression));
    1833    
    18341838    return(set);
    18351839}
    … …  
    18441848  static BSyntaxObject* show_msg_included_so = NULL;
    18451849  static bool show_msg_included = true;
     1850  int nErr0 = (int)TOLErrorNumber().Value();
    18461851  if(!show_msg_including_so)
    18471852  {
    … …  
    19311936      Std(ok+I2(" file ", " el fichero ")+p+" ["+BDat((double)tm.MSec()/1000.0).Format("%.3lf")+" sec.]\n");
    19321937    }
     1938  }
     1939  int nErr1 = (int)TOLErrorNumber().Value();
     1940  BSetFromFile* sff = (BSetFromFile*)result;
     1941  if(sff && (!sff->Contens().Card()) && (nErr1>nErr0))
     1942  {
     1943    DESTROY(result);
    19331944  }
    19341945  return(result);
  • tol/btol/set_type/tol_bsetgra.h

    r6eef720 r904521e  
    215215  static BList*       compiled_;
    216216  static BInt           nSetFromFile_;
     217  static BInt           nSetFromFileGlobal_;
    217218  BText  tolPath_;
    218219#if defined(_MSC_VER)
    … …  
    246247
    247248  static BInt NSetFromFile() { return(nSetFromFile_); }
     249  static BInt NSetFromFileGlobal() { return(nSetFromFileGlobal_); }
     250
    248251  const BText& TolPath() const { return(tolPath_); }
    249252  BBool     Open       ();
  • tol/lang/language.cpp

    r6eef720 r904521e  
    13331333//--------------------------------------------------------------------
    13341334{
    1335     BText fileName = Text(Arg(1));
    1336     contens_ = fileName;
    1337     ofstream out;
    1338     if(fileName!="Std") { out.open(fileName.String()); }
    1339     WriteFileOrStd(fileName,out,(I2("Name~   Path~   Elements~",
    1340             "Nombre~ Camino~ Elementos~")+"\n"));
    1341    
    1342     for(BInt n=1; n<=BSetFromFile::NSetFromFile(); n++)
    1343     {
    1344   BSetFromFile* file = (BSetFromFile*)BSetFromFile::FindCompiled(n);
    1345   BSet& set = file->Contens();
    1346   WriteFileOrStd
     1335  BText fileName = Text(Arg(1));
     1336  contens_ = fileName;
     1337  ofstream out;
     1338  if(fileName!="Std") { out.open(fileName.String()); }
     1339  WriteFileOrStd(fileName,out,
     1340  (I2("Name~   Path~   Elements~",
     1341      "Nombre~ Camino~ Elementos~")+"\n"));
     1342  int size = BSetFromFile::NSetFromFileGlobal();
     1343  for(BInt n=1; n<=size; n++)
     1344  {
     1345    BSetFromFile* file = (BSetFromFile*)BSetFromFile::FindCompiled(n);
     1346    if(file)
     1347    {
     1348      BSet& set = file->Contens();
     1349      WriteFileOrStd
    13471350      (
    1348     fileName,out,
    1349     (
    1350         file->Identify() + "~" +
    1351         file->TolPath()      + "~" +
    1352         set.Card()   + "~" + "\n"
     1351        fileName,out,
     1352        (
     1353          file->Identify() + "~" +
     1354          file->TolPath()      + "~" +
     1355          set.Card()   + "~" + "\n"
    13531356        )
    1354     );
    1355     }
     1357      );
     1358    }
     1359  }
    13561360   
    13571361//    if(fileName!="Std") { BSys::EditTable(fileName, BSTFILE); }
    1358     if(fileName!="Std") { out.close(); }
     1362  if(fileName!="Std") { out.close(); }
    13591363}
    13601364
Note: See TracChangeset for help on using the changeset viewer.