Changeset 2944 in Sophya for trunk


Ignore:
Timestamp:
Apr 26, 2006, 5:47:13 PM (19 years ago)
Author:
ansari
Message:

1- Correction/Amelioration gestion code de retour (Rc) ds les
CmdExecutor (basexecut.cc cxxexecutor.cc) - pour c++exec en particulier
2- ajout flag fgsmall (constructeur PIStdImgApp) pour petite fenetre
principale

Reza , 26/04/2006

Location:
trunk/SophyaPI/PIext
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/basexecut.cc

    r2933 r2944  
    109109    tokens.erase(tokens.begin());
    110110    fuf(tokens);
     111    return(0);
    111112  }
    112113  catch ( PThrowable & exc ) {
     
    114115         << (string)typeid(exc).name() << " Msg= "
    115116         << exc.Msg() << endl;
    116     cout << endl;
     117    return(-77);
    117118  }
    118119  catch ( ... ) {
    119120    cerr << "\n PIABaseExecutor: Call / Catched Exception ... "
    120121         << endl;
    121     cout << endl;
     122    return(-79);
    122123  }
    123124#endif
  • trunk/SophyaPI/PIext/cxxexecutor.cc

    r2762 r2944  
    158158  ZSync zs(mutx_cxxe);  zs.NOp();
    159159
    160   rc = ExecuteCXX(toks); if(rc) return(1);
     160  return ( ExecuteCXX(toks) );
    161161
    162162} else if(kw == "c++execfrf") {
     
    172172    else              rc = FillUserFctFrF();
    173173  if(rc) return(1);
    174   rc = CrFile();   if(rc) return(1);
    175   rc = Compile();  if(rc) return(1);
    176   rc = Link();     if(rc) return(1);
    177   rc = Call();     if(rc) return(1);
     174  rc = CrFile();   if(rc) return(rc);
     175  rc = Compile();  if(rc) return(rc);
     176  rc = Link();     if(rc) return(rc);
     177  rc = Call();     
     178  return(rc);
    178179
    179180} else if(kw == "c++args") {
     
    190191  ZSync zs(mutx_cxxe);  zs.NOp();
    191192
    192   rc = FillUserCode(toks,2);        if(rc) return(1);
    193   rc = FillUserFctFrS();            if(rc) return(1);
    194   rc = CrFile(tokens[0],tokens[1]); if(rc) return(1);
     193  rc = FillUserCode(toks,2);        if(rc) return(rc);
     194  rc = FillUserFctFrS();            if(rc) return(rc);
     195  rc = CrFile(tokens[0],tokens[1]);
     196  return(1);
    195197
    196198} else if(kw == "c++createfrf") {
     
    206208    else              rc = FillUserFctFrF(tokens[3]);
    207209  if(rc) return(1);
    208   rc = CrFile(tokens[0],tokens[1]); if(rc) return(1);
     210  rc = CrFile(tokens[0],tokens[1]);
     211  return rc;
    209212
    210213} else if(kw == "c++compile") {
     
    214217  if(tokens.size()>=1) rc = Compile(tokens[0]);
    215218  else                 rc = Compile();
    216   if(rc) return(1);
     219  return(rc);
    217220
    218221} else if(kw == "c++link") {
     
    223226  else if(tokens.size()>=1) rc = Link(tokens[0]);
    224227  else                      rc = Link();
    225   if(rc) return(1);
     228  return(rc);
    226229
    227230} else if(kw == "c++include") {
     
    295298{
    296299int rc=0;
    297 rc = FillUserCode(usercode,0); if(rc) return(1);
    298 rc = FillUserFctFrS(userfct);  if(rc) return(1);
    299 rc = CrFile();   if(rc) return(1);
    300 rc = Compile();  if(rc) return(1);
    301 rc = Link();     if(rc) return(1);
    302 rc = Call();     if(rc) return(1);
     300rc = FillUserCode(usercode,0); if(rc) return(rc);
     301rc = FillUserFctFrS(userfct);  if(rc) return(rc);
     302rc = CrFile();   if(rc) return(rc);
     303rc = Compile();  if(rc) return(rc);
     304rc = Link();     if(rc) return(rc);
     305rc = Call();     if(rc) return(rc);
    303306return 0;
    304307}
     
    726729if(mPrtLevel>1) cout<<"Link from "<<libname<<" for function "<<func
    727730                  <<" (rc="<<rc<<")"<<endl;
    728 return 0;
     731return rc;
    729732}
    730733
     
    742745if(mCallArgs.size()>0)
    743746  for(uint_4 i=0;i<mCallArgs.size();i++) arg.push_back(mCallArgs[i]);
    744 mpiac->ExecuteCommand(key,arg,toks);
    745 return 0;
     747return ( mpiac->ExecuteCommand(key,arg,toks) );
    746748}
    747749
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r2904 r2944  
    9393
    9494/* --Methode-- */
    95 PIStdImgApp::PIStdImgApp(int narg, char* arg[])
    96   : PIApplication(420, 320, narg, arg) , resusg(ResourceUsage::RU_All)
     95PIStdImgApp::PIStdImgApp(bool fgsmall, int narg, char* arg[])
     96  : PIApplication(420, (fgsmall)?320:220, narg, arg) , resusg(ResourceUsage::RU_All)
    9797{
    9898
     
    186186int msx = 420+mFgScSz*60;
    187187int msy = 320+mFgScSz*40;
     188int sfgsz = mFgScSz;
     189if (fgsmall) {  // Flag petite taille de fenetre
     190  if (mFgScSz > 1) mFgScSz = 1;
     191  msx = 420+mFgScSz*40;
     192  msy = 220+mFgScSz*20;
     193}
    188194MainWin()->SetSize(msx, msy);
    189195
     
    252258redirecout = false;
    253259// RedirectStdOutErr(true);  pas par defaut
     260
     261mFgScSz = sfgsz;
    254262 
    255263mObjMgr = new NamedObjMgr(true);
     
    16931701PeidaConfigureSignalhandling(fgfpe, fgsegv, true, true); 
    16941702#else
    1695 SophyaConfigureSignalhandling(fgfpe, fgsegv, true, true); 
     1703// On active aussi SIGUSR1 pour stopthr
     1704SophyaConfigureSignalhandling(fgfpe, fgsegv, true, true, true); 
    16961705#endif
    16971706m[5]->SetStateMsg(10603, fgfpe);
  • trunk/SophyaPI/PIext/pistdimgapp.h

    r2800 r2944  
    4646class PIStdImgApp : public PIApplication  {
    4747public:
    48      PIStdImgApp(int narg=0, char* arg[]=NULL);
     48     PIStdImgApp(bool fgsmall=false, int narg=0, char* arg[]=NULL);
    4949     ~PIStdImgApp();
    5050
Note: See TracChangeset for help on using the changeset viewer.