Changeset 2856 in Sophya for trunk/SophyaLib/SysTools


Ignore:
Timestamp:
Nov 28, 2005, 7:24:33 PM (20 years ago)
Author:
ansari
Message:

Correction bug lie a BREAK_EXE (cntlC) - Reza 29/11/2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SysTools/commander.cc

    r2796 r2856  
    847847  if ( (kw == "for") || (kw == "foreach") || (kw == "forinfile") ) felevel++;
    848848  else if (kw == "end") felevel--;
     849
     850  int rcbex = 0;
    849851  if (felevel == 0) { // Il faut executer le bloc
    850852    CommanderBloc* curb = CmdBlks.top();
     
    866868      list<char> xtx;
    867869      TestsStack.push(xtx);
    868       curb->Execute();
     870      rcbex = curb->Execute();
    869871      // And CommanderBloc and TestResult from the corresponding stacks
    870872      PopStack(false);
     
    875877  }
    876878  else CmdBlks.top()->AddLine(s, kw);
    877   _xstatus = 0;
    878   return(0);
     879  _xstatus = rcbex;
     880  return(rcbex);
    879881}
    880882else if (kw == "end") {
     
    19461948int Commander::ExecFile(string& file, vector<string>& args)
    19471949{
    1948 char line_buff[512];
     1950char line_buff[1024];
    19491951FILE *fip;
    19501952int rcc = 0;
     
    19741976bool ohv = histon;
    19751977histon = false;
    1976 while (fgets(line_buff,511,fip) != NULL)
     1978while (fgets(line_buff,1023,fip) != NULL)
    19771979  {
    19781980  if (trace) ShowMessage(line_buff, _MAGENTA_);
Note: See TracChangeset for help on using the changeset viewer.