Changeset 904521e in tol
- Timestamp:
- Feb 24, 2012, 11:45:43 AM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- eb21277
- Parents:
- 6eef720
- Location:
- tol
- Files:
-
- 3 edited
-
btol/set_type/setgrainc.cpp (modified) (7 diffs)
-
btol/set_type/tol_bsetgra.h (modified) (2 diffs)
-
lang/language.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/set_type/setgrainc.cpp
r6eef720 r904521e 67 67 BList* BSetFromFile::compiled_ = NIL; 68 68 BInt BSetFromFile::nSetFromFile_ = 0; 69 BInt BSetFromFile::nSetFromFileGlobal_ = 0; 70 69 71 BTerminator BSetFromFile::terminator_ = NIL; 70 72 … … 284 286 if(BGrammar::Level()==0) 285 287 { 288 nSetFromFileGlobal_++; 286 289 compiled_ = Cons(this, compiled_); 287 290 DecNRefs(); … … 312 315 if(BGrammar::Level()==0) 313 316 { 317 nSetFromFileGlobal_++; 314 318 compiled_ = Cons(this, compiled_); 315 319 DecNRefs(); … … 336 340 if(Level()==0) 337 341 { 342 nSetFromFileGlobal_--; 338 343 IncNRefs(); 339 344 compiled_=LstRemoveAtom(compiled_,this); … … 1831 1836 BText expression = BText("Include(\"")+path+"\")"; 1832 1837 BSetFromFile* set= (BSetFromFile*)(GraSet()->EvaluateExpr(expression)); 1833 1834 1838 return(set); 1835 1839 } … … 1844 1848 static BSyntaxObject* show_msg_included_so = NULL; 1845 1849 static bool show_msg_included = true; 1850 int nErr0 = (int)TOLErrorNumber().Value(); 1846 1851 if(!show_msg_including_so) 1847 1852 { … … 1931 1936 Std(ok+I2(" file ", " el fichero ")+p+" ["+BDat((double)tm.MSec()/1000.0).Format("%.3lf")+" sec.]\n"); 1932 1937 } 1938 } 1939 int nErr1 = (int)TOLErrorNumber().Value(); 1940 BSetFromFile* sff = (BSetFromFile*)result; 1941 if(sff && (!sff->Contens().Card()) && (nErr1>nErr0)) 1942 { 1943 DESTROY(result); 1933 1944 } 1934 1945 return(result); -
tol/btol/set_type/tol_bsetgra.h
r6eef720 r904521e 215 215 static BList* compiled_; 216 216 static BInt nSetFromFile_; 217 static BInt nSetFromFileGlobal_; 217 218 BText tolPath_; 218 219 #if defined(_MSC_VER) … … 246 247 247 248 static BInt NSetFromFile() { return(nSetFromFile_); } 249 static BInt NSetFromFileGlobal() { return(nSetFromFileGlobal_); } 250 248 251 const BText& TolPath() const { return(tolPath_); } 249 252 BBool Open (); -
tol/lang/language.cpp
r6eef720 r904521e 1333 1333 //-------------------------------------------------------------------- 1334 1334 { 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 1347 1350 ( 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" 1353 1356 ) 1354 ); 1355 } 1357 ); 1358 } 1359 } 1356 1360 1357 1361 // if(fileName!="Std") { BSys::EditTable(fileName, BSTFILE); } 1358 if(fileName!="Std") { out.close(); }1362 if(fileName!="Std") { out.close(); } 1359 1363 } 1360 1364
Note: See TracChangeset
for help on using the changeset viewer.
