Changeset 2945 in Sophya


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

1/ Ajout classe de lecture sur stdin (terminal) avec thread separe pour
piapp - incluant la possibilite d'utilisation de la librairie GNU readline
(fichiers piacmdrdr.cc piacmdrdr.h + fichier makfile specifique makefile_wgrdl

pour compil+link avec GNU readline)

2/ MAJ Makefile et modif programme principal piapp.cc avec flag -small
et activation thread de lecture sur terminal

Reza , 26/04/2006

Location:
trunk/SophyaPI/ProgPI
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/ProgPI/Makefile

    r2834 r2945  
    77clean:
    88        rm -f $(PROGS)
    9         rm -f $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
     9        rm -f $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
    1010 
    1111spiapp: $(SOPHYAEXEP)spiapp
    1212        echo $@ " done"
    13 $(SOPHYAEXEP)spiapp: $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
    14         $(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o $(SOPHYAALLSLBLIST)
     13$(SOPHYAEXEP)spiapp: $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
     14        $(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o $(SOPHYAALLSLBLIST)
    1515 
    1616$(SOPHYAOBJP)fitsbtadapter.o: fitsbtadapter.cc \
     
    6565  $(SOPHYAINCP)ndatablock.h \
    6666  $(SOPHYAINCP)utilarr.h \
     67  $(SOPHYAINCP)tmatrix_tsnl.h \
     68  $(SOPHYAINCP)tvector_tsnl.h \
    6769  $(SOPHYAINCP)generaldata.h \
    6870  $(SOPHYAINCP)poly.h \
     
    112114  $(SOPHYAINCP)fbtntintf.h \
    113115  $(SOPHYAINCP)FitsIO/fitsio.h \
    114   $(SOPHYAINCP)FitsIO/longnam.h
     116  $(SOPHYAINCP)FitsIO/longnam.h \
     117  $(SOPHYAINCP)fitsmanager.h \
     118  $(SOPHYAINCP)fitsinoutfile.h \
     119  $(SOPHYAINCP)fitshandler.h \
     120  $(SOPHYAINCP)fiosinit.h \
     121  $(SOPHYAINCP)sophyainit.h
    115122        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsbtadapter.cc
     123 
     124$(SOPHYAOBJP)piacmdrdr.o: piacmdrdr.cc \
     125  $(SOPHYAINCP)sopnamsp.h piacmdrdr.h \
     126  $(SOPHYAINCP)machdefs.h \
     127  $(SOPHYAINCP)zthread.h \
     128  $(SOPHYAINCP)pexceptions.h \
     129  $(SOPHYAINCP)pistdimgapp.h \
     130  $(SOPHYAINCP)pisysdep.h \
     131  $(SOPHYAINCP)piapplx.h \
     132  $(SOPHYAINCP)piapplgen.h \
     133  $(SOPHYAINCP)pimsghandler.h \
     134  $(SOPHYAINCP)picontainerx.h \
     135  $(SOPHYAINCP)picontainergen.h \
     136  $(SOPHYAINCP)piwdgx.h \
     137  $(SOPHYAINCP)piwdggen.h \
     138  $(SOPHYAINCP)picolist.h \
     139  $(SOPHYAINCP)pimenubarx.h \
     140  $(SOPHYAINCP)pimenubargen.h \
     141  $(SOPHYAINCP)pimenux.h \
     142  $(SOPHYAINCP)pimenugen.h \
     143  $(SOPHYAINCP)picons.h \
     144  $(SOPHYAINCP)pistdwdgx.h \
     145  $(SOPHYAINCP)pistdwdggen.h \
     146  $(SOPHYAINCP)pibwdgx.h \
     147  $(SOPHYAINCP)pibwdggen.h \
     148  $(SOPHYAINCP)picmap.h \
     149  $(SOPHYAINCP)picmapx.h \
     150  $(SOPHYAINCP)picmapgen.h \
     151  $(SOPHYAINCP)pigraphx.h \
     152  $(SOPHYAINCP)pigraphgen.h \
     153  $(SOPHYAINCP)pifontx.h \
     154  $(SOPHYAINCP)pifontgen.h \
     155  $(SOPHYAINCP)pigrcoord.h \
     156  $(SOPHYAINCP)pilineatt.h \
     157  $(SOPHYAINCP)pigraphuc.h \
     158  $(SOPHYAINCP)pievthandler.h \
     159  $(SOPHYAINCP)psfile.h \
     160  $(SOPHYAINCP)pigraphps.h \
     161  $(SOPHYAINCP)piwindowx.h \
     162  $(SOPHYAINCP)piwindowgen.h \
     163  $(SOPHYAINCP)pioptmenux.h \
     164  $(SOPHYAINCP)pioptmenugen.h \
     165  $(SOPHYAINCP)pifilechox.h \
     166  $(SOPHYAINCP)pifilechogen.h \
     167  $(SOPHYAINCP)piperiodx.h \
     168  $(SOPHYAINCP)periodic.h \
     169  $(SOPHYAINCP)piimage.h \
     170  $(SOPHYAINCP)parradapter.h \
     171  $(SOPHYAINCP)lut.h \
     172  $(SOPHYAINCP)pieldrw.h \
     173  $(SOPHYAINCP)pidrawer.h \
     174  $(SOPHYAINCP)pigratt.h \
     175  $(SOPHYAINCP)piaxes.h \
     176  $(SOPHYAINCP)pipixmapx.h \
     177  $(SOPHYAINCP)pipixmapgen.h \
     178  $(SOPHYAINCP)picmapview.h \
     179  $(SOPHYAINCP)pi3dwdg.h \
     180  $(SOPHYAINCP)pi3ddrw.h \
     181  $(SOPHYAINCP)pigraph3d.h \
     182  $(SOPHYAINCP)nobjmgr.h \
     183  $(SOPHYAINCP)anydataobj.h \
     184  $(SOPHYAINCP)ppersist.h \
     185  $(SOPHYAINCP)gnumd5.h \
     186  $(SOPHYAINCP)ppfbinstream.h \
     187  $(SOPHYAINCP)rawstream.h \
     188  $(SOPHYAINCP)ppfnametag.h \
     189  $(SOPHYAINCP)dvlist.h \
     190  $(SOPHYAINCP)objfio.h \
     191  $(SOPHYAINCP)mutyv.h \
     192  $(SOPHYAINCP)timestamp.h \
     193  $(SOPHYAINCP)dlftypes.h \
     194  $(SOPHYAINCP)piacmd.h \
     195  $(SOPHYAINCP)commander.h \
     196  $(SOPHYAINCP)pdlmgr.h \
     197  $(SOPHYAINCP)ctimer.h \
     198  $(SOPHYAINCP)pisiadw.h \
     199  $(SOPHYAINCP)pilistx.h \
     200  $(SOPHYAINCP)pilistgen.h \
     201  $(SOPHYAINCP)pistzwin.h \
     202  $(SOPHYAINCP)pitherm.h \
     203  $(SOPHYAINCP)resusage.h
     204        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  piacmdrdr.cc
    116205 
    117206$(SOPHYAOBJP)piapp.o: piapp.cc $(SOPHYAINCP)sopnamsp.h \
     
    193282  $(SOPHYAINCP)pistzwin.h \
    194283  $(SOPHYAINCP)pitherm.h \
    195   $(SOPHYAINCP)resusage.h \
     284  $(SOPHYAINCP)resusage.h piacmdrdr.h \
    196285  $(SOPHYAINCP)piversion.h \
    197286  $(SOPHYAINCP)piaversion.h \
     
    295384  $(SOPHYAINCP)ndatablock.h \
    296385  $(SOPHYAINCP)utilarr.h \
     386  $(SOPHYAINCP)tmatrix_tsnl.h \
     387  $(SOPHYAINCP)tvector_tsnl.h \
    297388  $(SOPHYAINCP)generaldata.h \
    298389  $(SOPHYAINCP)poly.h \
     
    413504  $(SOPHYAINCP)ndatablock.h \
    414505  $(SOPHYAINCP)utilarr.h \
     506  $(SOPHYAINCP)tmatrix_tsnl.h \
     507  $(SOPHYAINCP)tvector_tsnl.h \
    415508  $(SOPHYAINCP)pitvmaad.h \
    416509  $(SOPHYAINCP)fftpserver.h \
  • trunk/SophyaPI/ProgPI/piapp.cc

    r2810 r2945  
    77#include "pistdimgapp.h"
    88#include "piacmd.h"
     9#include "piacmdrdr.h"
    910#include "piversion.h"
    1011#include "piaversion.h"
     
    4849  \verbatim
    4950  csh> spiapp -h
    50  SophyaInitiator::SophyaInitiator() BaseTools Init
    51  PIOPersist::Initialize() Starting Sophya Persistence management service
    52 SOPHYA Version  1.9 Revision 0 (V_Mai2005) -- Jun  9 2005 22:01:01
    53 gcc 3.3-fast 20030304 (Apple Computer, Inc. build 1614)
     51 PIOPersist::Initialize() Starting Sophya Persistence management service
     52SOPHYA Version  2.0 Revision 0 (V_Mai2006) -- Apr 26 2006 17:17:22 cxx
    5453
    5554 piapp: Interactive data analysis and visualisation program
    5655 Usage: piapp [-nored] [-nosig] [-nosigfpe] [-nosigsegv] [-hidezswin]
    57               [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]]
    58   -nored : NoRedirect StdOut/StdErr
     56              [-small] [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]]
     57  -nored : Don't redirect stdout/stderr to piapp console
    5958  -nosig : Don't catch SigFPE, SigSEGV
    6059  -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV
     60  -small : Create small size main piapp window
    6161  -hidezswin : Hide Zoom/Stat/ColMap window
    6262  -tmpdir TmpDirectory: defines TMDIR for temporary files
    6363  -help2tex: Create a LaTeX help file (piahelp.tex)
    6464  -exec file [args] : Execute command file
    65  
     65
    6666  \endverbatim
    6767 
     
    7777    cout << "\n piapp: Interactive data analysis and visualisation program \n"
    7878         << " Usage: piapp [-nored] [-nosig] [-nosigfpe] [-nosigsegv] [-hidezswin] \n"
    79          << "              [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] \n"
    80          << "  -nored : NoRedirect StdOut/StdErr \n"
     79         << "              [-small] [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] \n"
     80         << "  -nored : Don't redirect stdout/stderr to piapp console\n"
    8181         << "  -nosig : Don't catch SigFPE, SigSEGV \n"
    8282         << "  -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV \n"
     83         << "  -small : Create small size main piapp window \n"
    8384         << "  -hidezswin : Hide Zoom/Stat/ColMap window \n"
    8485         << "  -tmpdir TmpDirectory: defines TMDIR for temporary files \n"
     
    9596{
    9697int ofa;
    97 bool fgfpe, fgsegv, fgred, fghidezsw, fgexec;
     98bool fgfpe, fgsegv, fgred, fghidezsw, fgexec, fgsmall;
    9899
    99100SkyTInitiator skyinit;
     
    109110fgexec = false;
    110111bool fgtmp = false;
     112fgsmall = false;
    111113string tmpdir;
    112114string exfc;
     
    119121  else if (strcmp(arg[ka],"-nosigfpe") == 0)   fgfpe=false;
    120122  else if (strcmp(arg[ka],"-nosigsegv") == 0)   fgsegv=false;
     123  else if (strcmp(arg[ka],"-small") == 0)     fgsmall=true;
    121124  else if (strcmp(arg[ka],"-hidezswin") == 0)   fghidezsw=true;
    122125  else if (strcmp(arg[ka],"-help2tex") == 0) { fgtexh=true; fgred=false; }
     
    176179// cout << " DBG-TMPDIR= " << getenv("TMPDIR") << endl;
    177180
    178 PIStdImgApp * app = new PIStdImgApp(narg, arg);
     181PIStdImgApp * app = new PIStdImgApp(fgsmall, narg, arg);
    179182// cout << " DBG-2 " <<  app->ObjMgr()->GetTmpDir() << endl;
    180183cout << "  NamedObjMgr::SetTmpDir()+XNTuple::SetSwapPath() " << tmpdir << endl;
     
    213216  exit(0);
    214217}
     218
     219// Creation du lecteur de commande sur terminal (avec GNU readline)
     220PIACmdReader cmdrdr(app);
     221cmdrdr.start();
    215222
    216223int rc = 0;
     
    277284
    278285app->RedirectStdOutErr(false); 
     286cmdrdr.cancel();
     287
    279288// On de-charge le module sopiamodule et fitsbtadapter
    280289sopiamodule_end();
  • trunk/SophyaPI/ProgPI/programs

    r2743 r2945  
    1 spiapp piapp.o sopiamodule.o fitsbtadapter.o w2ps.o skymapmodule.o
     1spiapp piapp.o piacmdrdr.o sopiamodule.o fitsbtadapter.o w2ps.o skymapmodule.o
Note: See TracChangeset for help on using the changeset viewer.