Changeset 2949 in Sophya for trunk/SophyaPI/ProgPI/piapp.cc


Ignore:
Timestamp:
Apr 27, 2006, 9:34:01 AM (19 years ago)
Author:
ansari
Message:

ajout flag -term a piapp.cc , Reza 27/4/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/ProgPI/piapp.cc

    r2945 r2949  
    4949  \verbatim
    5050  csh> spiapp -h
    51  PIOPersist::Initialize() Starting Sophya Persistence management service
    52 SOPHYA Version  2.0 Revision 0 (V_Mai2006) -- Apr 26 2006 17:17:22 cxx
     51 PIOPersist::Initialize() Starting Sophya Persistence management service 
     52SOPHYA Version  2.0 Revision 0 (V_Mai2006) -- Apr 26 2006 17:17:22 cxx 
    5353
    5454 piapp: Interactive data analysis and visualisation program
    55  Usage: piapp [-nored] [-nosig] [-nosigfpe] [-nosigsegv] [-hidezswin]
    56               [-small] [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]]
     55 Usage: piapp [-nored] [-termread] [-term] [-hidezswin] [-small]
     56              [-nosig] [-nosigfpe] [-nosigsegv]
     57              [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]]
    5758  -nored : Don't redirect stdout/stderr to piapp console
     59  -termread : Read commands on terminal (stdin)
     60  -term : equivalent to -nored -termread -small
     61  -hidezswin : Hide Zoom/Stat/ColMap window
     62  -small : Create small size main piapp window
    5863  -nosig : Don't catch SigFPE, SigSEGV
    5964  -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV
    60   -small : Create small size main piapp window
    61   -hidezswin : Hide Zoom/Stat/ColMap window
    6265  -tmpdir TmpDirectory: defines TMDIR for temporary files
    6366  -help2tex: Create a LaTeX help file (piahelp.tex)
    64   -exec file [args] : Execute command file
     67  -exec file [args] : Execute command file (last option)
    6568
    6669  \endverbatim
     
    7679  else {
    7780    cout << "\n piapp: Interactive data analysis and visualisation program \n"
    78          << " Usage: piapp [-nored] [-nosig] [-nosigfpe] [-nosigsegv] [-hidezswin] \n"
    79          << "              [-small] [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] \n"
     81         << " Usage: piapp [-nored] [-termread] [-term] [-hidezswin] [-small] \n"
     82         << "              [-nosig] [-nosigfpe] [-nosigsegv] \n"
     83         << "              [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] \n"
    8084         << "  -nored : Don't redirect stdout/stderr to piapp console\n"
     85         << "  -termread : Read commands on terminal (stdin)\n"
     86         << "  -term : equivalent to -nored -termread -small \n"
     87         << "  -hidezswin : Hide Zoom/Stat/ColMap window \n"
     88         << "  -small : Create small size main piapp window \n"
    8189         << "  -nosig : Don't catch SigFPE, SigSEGV \n"
    8290         << "  -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV \n"
    83          << "  -small : Create small size main piapp window \n"
    84          << "  -hidezswin : Hide Zoom/Stat/ColMap window \n"
    8591         << "  -tmpdir TmpDirectory: defines TMDIR for temporary files \n"
    8692         << "  -help2tex: Create a LaTeX help file (piahelp.tex)\n"
    87          << "  -exec file [args] : Execute command file \n"
     93         << "  -exec file [args] : Execute command file (last option)\n"
    8894         << endl;
    8995    return 0;
     
    96102{
    97103int ofa;
    98 bool fgfpe, fgsegv, fgred, fghidezsw, fgexec, fgsmall;
     104bool fgfpe, fgsegv, fgred, fghidezsw, fgexec, fgsmall, fgtermrd;
    99105
    100106SkyTInitiator skyinit;
     
    111117bool fgtmp = false;
    112118fgsmall = false;
     119 fgtermrd = false;
    113120string tmpdir;
    114121string exfc;
     
    119126  if (strcmp(arg[ka],"-nored") == 0)   fgred=false;
    120127  else if (strcmp(arg[ka],"-nosig") == 0)   fgfpe=fgsegv=false;
     128  else if (strcmp(arg[ka],"-termread") == 0)   fgtermrd=true;
     129  else if (strcmp(arg[ka],"-term") == 0) 
     130    { fgred=false;  fgtermrd=true; fgsmall=true; }
    121131  else if (strcmp(arg[ka],"-nosigfpe") == 0)   fgfpe=false;
    122132  else if (strcmp(arg[ka],"-nosigsegv") == 0)   fgsegv=false;
     
    219229// Creation du lecteur de commande sur terminal (avec GNU readline)
    220230PIACmdReader cmdrdr(app);
    221 cmdrdr.start();
     231if (fgtermrd) cmdrdr.start();
    222232
    223233int rc = 0;
     
    284294
    285295app->RedirectStdOutErr(false); 
    286 cmdrdr.cancel();
     296if (fgtermrd) cmdrdr.cancel();
    287297
    288298// On de-charge le module sopiamodule et fitsbtadapter
Note: See TracChangeset for help on using the changeset viewer.