Index: trunk/SophyaPI/ProgPI/Makefile
===================================================================
--- trunk/SophyaPI/ProgPI/Makefile	(revision 2944)
+++ trunk/SophyaPI/ProgPI/Makefile	(revision 2945)
@@ -7,10 +7,10 @@
 clean:
 	rm -f $(PROGS)
-	rm -f $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
+	rm -f $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
  
 spiapp: $(SOPHYAEXEP)spiapp
 	echo $@ " done"
-$(SOPHYAEXEP)spiapp: $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
-	$(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o $(SOPHYAALLSLBLIST)
+$(SOPHYAEXEP)spiapp: $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
+	$(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o $(SOPHYAALLSLBLIST)
  
 $(SOPHYAOBJP)fitsbtadapter.o: fitsbtadapter.cc \
@@ -65,4 +65,6 @@
   $(SOPHYAINCP)ndatablock.h \
   $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
   $(SOPHYAINCP)generaldata.h \
   $(SOPHYAINCP)poly.h \
@@ -112,6 +114,93 @@
   $(SOPHYAINCP)fbtntintf.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  $(SOPHYAINCP)fitsmanager.h \
+  $(SOPHYAINCP)fitsinoutfile.h \
+  $(SOPHYAINCP)fitshandler.h \
+  $(SOPHYAINCP)fiosinit.h \
+  $(SOPHYAINCP)sophyainit.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsbtadapter.cc
+ 
+$(SOPHYAOBJP)piacmdrdr.o: piacmdrdr.cc \
+  $(SOPHYAINCP)sopnamsp.h piacmdrdr.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)zthread.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)pistdimgapp.h \
+  $(SOPHYAINCP)pisysdep.h \
+  $(SOPHYAINCP)piapplx.h \
+  $(SOPHYAINCP)piapplgen.h \
+  $(SOPHYAINCP)pimsghandler.h \
+  $(SOPHYAINCP)picontainerx.h \
+  $(SOPHYAINCP)picontainergen.h \
+  $(SOPHYAINCP)piwdgx.h \
+  $(SOPHYAINCP)piwdggen.h \
+  $(SOPHYAINCP)picolist.h \
+  $(SOPHYAINCP)pimenubarx.h \
+  $(SOPHYAINCP)pimenubargen.h \
+  $(SOPHYAINCP)pimenux.h \
+  $(SOPHYAINCP)pimenugen.h \
+  $(SOPHYAINCP)picons.h \
+  $(SOPHYAINCP)pistdwdgx.h \
+  $(SOPHYAINCP)pistdwdggen.h \
+  $(SOPHYAINCP)pibwdgx.h \
+  $(SOPHYAINCP)pibwdggen.h \
+  $(SOPHYAINCP)picmap.h \
+  $(SOPHYAINCP)picmapx.h \
+  $(SOPHYAINCP)picmapgen.h \
+  $(SOPHYAINCP)pigraphx.h \
+  $(SOPHYAINCP)pigraphgen.h \
+  $(SOPHYAINCP)pifontx.h \
+  $(SOPHYAINCP)pifontgen.h \
+  $(SOPHYAINCP)pigrcoord.h \
+  $(SOPHYAINCP)pilineatt.h \
+  $(SOPHYAINCP)pigraphuc.h \
+  $(SOPHYAINCP)pievthandler.h \
+  $(SOPHYAINCP)psfile.h \
+  $(SOPHYAINCP)pigraphps.h \
+  $(SOPHYAINCP)piwindowx.h \
+  $(SOPHYAINCP)piwindowgen.h \
+  $(SOPHYAINCP)pioptmenux.h \
+  $(SOPHYAINCP)pioptmenugen.h \
+  $(SOPHYAINCP)pifilechox.h \
+  $(SOPHYAINCP)pifilechogen.h \
+  $(SOPHYAINCP)piperiodx.h \
+  $(SOPHYAINCP)periodic.h \
+  $(SOPHYAINCP)piimage.h \
+  $(SOPHYAINCP)parradapter.h \
+  $(SOPHYAINCP)lut.h \
+  $(SOPHYAINCP)pieldrw.h \
+  $(SOPHYAINCP)pidrawer.h \
+  $(SOPHYAINCP)pigratt.h \
+  $(SOPHYAINCP)piaxes.h \
+  $(SOPHYAINCP)pipixmapx.h \
+  $(SOPHYAINCP)pipixmapgen.h \
+  $(SOPHYAINCP)picmapview.h \
+  $(SOPHYAINCP)pi3dwdg.h \
+  $(SOPHYAINCP)pi3ddrw.h \
+  $(SOPHYAINCP)pigraph3d.h \
+  $(SOPHYAINCP)nobjmgr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)dlftypes.h \
+  $(SOPHYAINCP)piacmd.h \
+  $(SOPHYAINCP)commander.h \
+  $(SOPHYAINCP)pdlmgr.h \
+  $(SOPHYAINCP)ctimer.h \
+  $(SOPHYAINCP)pisiadw.h \
+  $(SOPHYAINCP)pilistx.h \
+  $(SOPHYAINCP)pilistgen.h \
+  $(SOPHYAINCP)pistzwin.h \
+  $(SOPHYAINCP)pitherm.h \
+  $(SOPHYAINCP)resusage.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  piacmdrdr.cc
  
 $(SOPHYAOBJP)piapp.o: piapp.cc $(SOPHYAINCP)sopnamsp.h \
@@ -193,5 +282,5 @@
   $(SOPHYAINCP)pistzwin.h \
   $(SOPHYAINCP)pitherm.h \
-  $(SOPHYAINCP)resusage.h \
+  $(SOPHYAINCP)resusage.h piacmdrdr.h \
   $(SOPHYAINCP)piversion.h \
   $(SOPHYAINCP)piaversion.h \
@@ -295,4 +384,6 @@
   $(SOPHYAINCP)ndatablock.h \
   $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
   $(SOPHYAINCP)generaldata.h \
   $(SOPHYAINCP)poly.h \
@@ -413,4 +504,6 @@
   $(SOPHYAINCP)ndatablock.h \
   $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
   $(SOPHYAINCP)pitvmaad.h \
   $(SOPHYAINCP)fftpserver.h \
Index: trunk/SophyaPI/ProgPI/makefile_wgrdl
===================================================================
--- trunk/SophyaPI/ProgPI/makefile_wgrdl	(revision 2945)
+++ trunk/SophyaPI/ProgPI/makefile_wgrdl	(revision 2945)
@@ -0,0 +1,615 @@
+include ../BuildMgr/sophyamake.inc
+
+#####  makefile to build piapp linked with GNU readline library 
+#####   
+PROGS = $(SOPHYAEXEP)spiapp
+ 
+all: $(PROGS)
+ 
+clean:
+	rm -f $(PROGS)
+	rm -f $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
+ 
+### GNU-readline : libray path and name (-lreadline -lhistory)
+spiapp: $(SOPHYAEXEP)spiapp
+	echo $@ " done"
+$(SOPHYAEXEP)spiapp: $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o
+	$(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)piapp.o $(SOPHYAOBJP)piacmdrdr.o $(SOPHYAOBJP)sopiamodule.o $(SOPHYAOBJP)fitsbtadapter.o $(SOPHYAOBJP)w2ps.o $(SOPHYAOBJP)skymapmodule.o $(SOPHYAALLSLBLIST) -L/usr/local/lib -lreadline -lhistory -lcurses
+ 
+$(SOPHYAOBJP)fitsbtadapter.o: fitsbtadapter.cc \
+  $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)nobjmgr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)dlftypes.h \
+  $(SOPHYAINCP)servnobjm.h \
+  $(SOPHYAINCP)pdlmgr.h \
+  $(SOPHYAINCP)zthread.h \
+  $(SOPHYAINCP)nomgadapter.h \
+  $(SOPHYAINCP)pidrawer.h \
+  $(SOPHYAINCP)pibwdggen.h \
+  $(SOPHYAINCP)pisysdep.h \
+  $(SOPHYAINCP)piwdgx.h \
+  $(SOPHYAINCP)piwdggen.h \
+  $(SOPHYAINCP)pimsghandler.h \
+  $(SOPHYAINCP)picolist.h \
+  $(SOPHYAINCP)picmap.h \
+  $(SOPHYAINCP)picmapx.h \
+  $(SOPHYAINCP)picmapgen.h \
+  $(SOPHYAINCP)pigraphx.h \
+  $(SOPHYAINCP)pigraphgen.h \
+  $(SOPHYAINCP)pifontx.h \
+  $(SOPHYAINCP)pifontgen.h \
+  $(SOPHYAINCP)pigrcoord.h \
+  $(SOPHYAINCP)pilineatt.h \
+  $(SOPHYAINCP)pigraphuc.h \
+  $(SOPHYAINCP)pievthandler.h \
+  $(SOPHYAINCP)psfile.h \
+  $(SOPHYAINCP)pigratt.h \
+  $(SOPHYAINCP)piaxes.h \
+  $(SOPHYAINCP)parradapter.h \
+  $(SOPHYAINCP)lut.h \
+  $(SOPHYAINCP)ntupintf.h \
+  $(SOPHYAINCP)generalfit.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  $(SOPHYAINCP)generaldata.h \
+  $(SOPHYAINCP)poly.h \
+  $(SOPHYAINCP)peida.h \
+  $(SOPHYAINCP)utils.h \
+  $(SOPHYAINCP)perrors.h \
+  $(SOPHYAINCP)fmath.h \
+  $(SOPHYAINCP)pistdimgapp.h \
+  $(SOPHYAINCP)piapplx.h \
+  $(SOPHYAINCP)piapplgen.h \
+  $(SOPHYAINCP)picontainerx.h \
+  $(SOPHYAINCP)picontainergen.h \
+  $(SOPHYAINCP)pimenubarx.h \
+  $(SOPHYAINCP)pimenubargen.h \
+  $(SOPHYAINCP)pimenux.h \
+  $(SOPHYAINCP)pimenugen.h \
+  $(SOPHYAINCP)picons.h \
+  $(SOPHYAINCP)pistdwdgx.h \
+  $(SOPHYAINCP)pistdwdggen.h \
+  $(SOPHYAINCP)pibwdgx.h \
+  $(SOPHYAINCP)pigraphps.h \
+  $(SOPHYAINCP)piwindowx.h \
+  $(SOPHYAINCP)piwindowgen.h \
+  $(SOPHYAINCP)pioptmenux.h \
+  $(SOPHYAINCP)pioptmenugen.h \
+  $(SOPHYAINCP)pifilechox.h \
+  $(SOPHYAINCP)pifilechogen.h \
+  $(SOPHYAINCP)piperiodx.h \
+  $(SOPHYAINCP)periodic.h \
+  $(SOPHYAINCP)piimage.h \
+  $(SOPHYAINCP)pieldrw.h \
+  $(SOPHYAINCP)pipixmapx.h \
+  $(SOPHYAINCP)pipixmapgen.h \
+  $(SOPHYAINCP)picmapview.h \
+  $(SOPHYAINCP)pi3dwdg.h \
+  $(SOPHYAINCP)pi3ddrw.h \
+  $(SOPHYAINCP)pigraph3d.h \
+  $(SOPHYAINCP)piacmd.h \
+  $(SOPHYAINCP)commander.h \
+  $(SOPHYAINCP)ctimer.h \
+  $(SOPHYAINCP)pisiadw.h \
+  $(SOPHYAINCP)pilistx.h \
+  $(SOPHYAINCP)pilistgen.h \
+  $(SOPHYAINCP)pistzwin.h \
+  $(SOPHYAINCP)pitherm.h \
+  $(SOPHYAINCP)resusage.h \
+  $(SOPHYAINCP)fbtntintf.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  $(SOPHYAINCP)fitsmanager.h \
+  $(SOPHYAINCP)fitsinoutfile.h \
+  $(SOPHYAINCP)fitshandler.h \
+  $(SOPHYAINCP)fiosinit.h \
+  $(SOPHYAINCP)sophyainit.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsbtadapter.cc
+ 
+### GNU-readline : flag WITH_GNUREADLINE and include file path readline/readline.h readline/history.h
+$(SOPHYAOBJP)piacmdrdr.o: piacmdrdr.cc \
+  $(SOPHYAINCP)sopnamsp.h piacmdrdr.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)zthread.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)pistdimgapp.h \
+  $(SOPHYAINCP)pisysdep.h \
+  $(SOPHYAINCP)piapplx.h \
+  $(SOPHYAINCP)piapplgen.h \
+  $(SOPHYAINCP)pimsghandler.h \
+  $(SOPHYAINCP)picontainerx.h \
+  $(SOPHYAINCP)picontainergen.h \
+  $(SOPHYAINCP)piwdgx.h \
+  $(SOPHYAINCP)piwdggen.h \
+  $(SOPHYAINCP)picolist.h \
+  $(SOPHYAINCP)pimenubarx.h \
+  $(SOPHYAINCP)pimenubargen.h \
+  $(SOPHYAINCP)pimenux.h \
+  $(SOPHYAINCP)pimenugen.h \
+  $(SOPHYAINCP)picons.h \
+  $(SOPHYAINCP)pistdwdgx.h \
+  $(SOPHYAINCP)pistdwdggen.h \
+  $(SOPHYAINCP)pibwdgx.h \
+  $(SOPHYAINCP)pibwdggen.h \
+  $(SOPHYAINCP)picmap.h \
+  $(SOPHYAINCP)picmapx.h \
+  $(SOPHYAINCP)picmapgen.h \
+  $(SOPHYAINCP)pigraphx.h \
+  $(SOPHYAINCP)pigraphgen.h \
+  $(SOPHYAINCP)pifontx.h \
+  $(SOPHYAINCP)pifontgen.h \
+  $(SOPHYAINCP)pigrcoord.h \
+  $(SOPHYAINCP)pilineatt.h \
+  $(SOPHYAINCP)pigraphuc.h \
+  $(SOPHYAINCP)pievthandler.h \
+  $(SOPHYAINCP)psfile.h \
+  $(SOPHYAINCP)pigraphps.h \
+  $(SOPHYAINCP)piwindowx.h \
+  $(SOPHYAINCP)piwindowgen.h \
+  $(SOPHYAINCP)pioptmenux.h \
+  $(SOPHYAINCP)pioptmenugen.h \
+  $(SOPHYAINCP)pifilechox.h \
+  $(SOPHYAINCP)pifilechogen.h \
+  $(SOPHYAINCP)piperiodx.h \
+  $(SOPHYAINCP)periodic.h \
+  $(SOPHYAINCP)piimage.h \
+  $(SOPHYAINCP)parradapter.h \
+  $(SOPHYAINCP)lut.h \
+  $(SOPHYAINCP)pieldrw.h \
+  $(SOPHYAINCP)pidrawer.h \
+  $(SOPHYAINCP)pigratt.h \
+  $(SOPHYAINCP)piaxes.h \
+  $(SOPHYAINCP)pipixmapx.h \
+  $(SOPHYAINCP)pipixmapgen.h \
+  $(SOPHYAINCP)picmapview.h \
+  $(SOPHYAINCP)pi3dwdg.h \
+  $(SOPHYAINCP)pi3ddrw.h \
+  $(SOPHYAINCP)pigraph3d.h \
+  $(SOPHYAINCP)nobjmgr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)dlftypes.h \
+  $(SOPHYAINCP)piacmd.h \
+  $(SOPHYAINCP)commander.h \
+  $(SOPHYAINCP)pdlmgr.h \
+  $(SOPHYAINCP)ctimer.h \
+  $(SOPHYAINCP)pisiadw.h \
+  $(SOPHYAINCP)pilistx.h \
+  $(SOPHYAINCP)pilistgen.h \
+  $(SOPHYAINCP)pistzwin.h \
+  $(SOPHYAINCP)pitherm.h \
+  $(SOPHYAINCP)resusage.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -I/usr/local/include -DWITH_GNUREADLINE -o $@  piacmdrdr.cc
+ 
+$(SOPHYAOBJP)piapp.o: piapp.cc $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)pistdimgapp.h \
+  $(SOPHYAINCP)pisysdep.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)piapplx.h \
+  $(SOPHYAINCP)piapplgen.h \
+  $(SOPHYAINCP)pimsghandler.h \
+  $(SOPHYAINCP)picontainerx.h \
+  $(SOPHYAINCP)picontainergen.h \
+  $(SOPHYAINCP)piwdgx.h \
+  $(SOPHYAINCP)piwdggen.h \
+  $(SOPHYAINCP)picolist.h \
+  $(SOPHYAINCP)pimenubarx.h \
+  $(SOPHYAINCP)pimenubargen.h \
+  $(SOPHYAINCP)pimenux.h \
+  $(SOPHYAINCP)pimenugen.h \
+  $(SOPHYAINCP)picons.h \
+  $(SOPHYAINCP)pistdwdgx.h \
+  $(SOPHYAINCP)pistdwdggen.h \
+  $(SOPHYAINCP)pibwdgx.h \
+  $(SOPHYAINCP)pibwdggen.h \
+  $(SOPHYAINCP)picmap.h \
+  $(SOPHYAINCP)picmapx.h \
+  $(SOPHYAINCP)picmapgen.h \
+  $(SOPHYAINCP)pigraphx.h \
+  $(SOPHYAINCP)pigraphgen.h \
+  $(SOPHYAINCP)pifontx.h \
+  $(SOPHYAINCP)pifontgen.h \
+  $(SOPHYAINCP)pigrcoord.h \
+  $(SOPHYAINCP)pilineatt.h \
+  $(SOPHYAINCP)pigraphuc.h \
+  $(SOPHYAINCP)pievthandler.h \
+  $(SOPHYAINCP)psfile.h \
+  $(SOPHYAINCP)pigraphps.h \
+  $(SOPHYAINCP)piwindowx.h \
+  $(SOPHYAINCP)piwindowgen.h \
+  $(SOPHYAINCP)pioptmenux.h \
+  $(SOPHYAINCP)pioptmenugen.h \
+  $(SOPHYAINCP)pifilechox.h \
+  $(SOPHYAINCP)pifilechogen.h \
+  $(SOPHYAINCP)piperiodx.h \
+  $(SOPHYAINCP)periodic.h \
+  $(SOPHYAINCP)piimage.h \
+  $(SOPHYAINCP)parradapter.h \
+  $(SOPHYAINCP)lut.h \
+  $(SOPHYAINCP)pieldrw.h \
+  $(SOPHYAINCP)pidrawer.h \
+  $(SOPHYAINCP)pigratt.h \
+  $(SOPHYAINCP)piaxes.h \
+  $(SOPHYAINCP)pipixmapx.h \
+  $(SOPHYAINCP)pipixmapgen.h \
+  $(SOPHYAINCP)picmapview.h \
+  $(SOPHYAINCP)pi3dwdg.h \
+  $(SOPHYAINCP)pi3ddrw.h \
+  $(SOPHYAINCP)pigraph3d.h \
+  $(SOPHYAINCP)nobjmgr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)dlftypes.h \
+  $(SOPHYAINCP)piacmd.h \
+  $(SOPHYAINCP)commander.h \
+  $(SOPHYAINCP)pdlmgr.h \
+  $(SOPHYAINCP)ctimer.h \
+  $(SOPHYAINCP)zthread.h \
+  $(SOPHYAINCP)pisiadw.h \
+  $(SOPHYAINCP)pilistx.h \
+  $(SOPHYAINCP)pilistgen.h \
+  $(SOPHYAINCP)pistzwin.h \
+  $(SOPHYAINCP)pitherm.h \
+  $(SOPHYAINCP)resusage.h piacmdrdr.h \
+  $(SOPHYAINCP)piversion.h \
+  $(SOPHYAINCP)piaversion.h \
+  $(SOPHYAINCP)timing.h \
+  $(SOPHYAINCP)skyinit.h \
+  $(SOPHYAINCP)ntoolsinit.h \
+  $(SOPHYAINCP)tarrinit.h \
+  $(SOPHYAINCP)sophyainit.h \
+  $(SOPHYAINCP)xntuple.h \
+  $(SOPHYAINCP)ntupintf.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  piapp.cc
+ 
+$(SOPHYAOBJP)skymapmodule.o: skymapmodule.cc \
+  $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)piacmd.h \
+  $(SOPHYAINCP)commander.h \
+  $(SOPHYAINCP)pdlmgr.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)ctimer.h \
+  $(SOPHYAINCP)zthread.h \
+  $(SOPHYAINCP)dlftypes.h \
+  $(SOPHYAINCP)nobjmgr.h \
+  $(SOPHYAINCP)pistdimgapp.h \
+  $(SOPHYAINCP)pisysdep.h \
+  $(SOPHYAINCP)piapplx.h \
+  $(SOPHYAINCP)piapplgen.h \
+  $(SOPHYAINCP)pimsghandler.h \
+  $(SOPHYAINCP)picontainerx.h \
+  $(SOPHYAINCP)picontainergen.h \
+  $(SOPHYAINCP)piwdgx.h \
+  $(SOPHYAINCP)piwdggen.h \
+  $(SOPHYAINCP)picolist.h \
+  $(SOPHYAINCP)pimenubarx.h \
+  $(SOPHYAINCP)pimenubargen.h \
+  $(SOPHYAINCP)pimenux.h \
+  $(SOPHYAINCP)pimenugen.h \
+  $(SOPHYAINCP)picons.h \
+  $(SOPHYAINCP)pistdwdgx.h \
+  $(SOPHYAINCP)pistdwdggen.h \
+  $(SOPHYAINCP)pibwdgx.h \
+  $(SOPHYAINCP)pibwdggen.h \
+  $(SOPHYAINCP)picmap.h \
+  $(SOPHYAINCP)picmapx.h \
+  $(SOPHYAINCP)picmapgen.h \
+  $(SOPHYAINCP)pigraphx.h \
+  $(SOPHYAINCP)pigraphgen.h \
+  $(SOPHYAINCP)pifontx.h \
+  $(SOPHYAINCP)pifontgen.h \
+  $(SOPHYAINCP)pigrcoord.h \
+  $(SOPHYAINCP)pilineatt.h \
+  $(SOPHYAINCP)pigraphuc.h \
+  $(SOPHYAINCP)pievthandler.h \
+  $(SOPHYAINCP)psfile.h \
+  $(SOPHYAINCP)pigraphps.h \
+  $(SOPHYAINCP)piwindowx.h \
+  $(SOPHYAINCP)piwindowgen.h \
+  $(SOPHYAINCP)pioptmenux.h \
+  $(SOPHYAINCP)pioptmenugen.h \
+  $(SOPHYAINCP)pifilechox.h \
+  $(SOPHYAINCP)pifilechogen.h \
+  $(SOPHYAINCP)piperiodx.h \
+  $(SOPHYAINCP)periodic.h \
+  $(SOPHYAINCP)piimage.h \
+  $(SOPHYAINCP)parradapter.h \
+  $(SOPHYAINCP)lut.h \
+  $(SOPHYAINCP)pieldrw.h \
+  $(SOPHYAINCP)pidrawer.h \
+  $(SOPHYAINCP)pigratt.h \
+  $(SOPHYAINCP)piaxes.h \
+  $(SOPHYAINCP)pipixmapx.h \
+  $(SOPHYAINCP)pipixmapgen.h \
+  $(SOPHYAINCP)picmapview.h \
+  $(SOPHYAINCP)pi3dwdg.h \
+  $(SOPHYAINCP)pi3ddrw.h \
+  $(SOPHYAINCP)pigraph3d.h \
+  $(SOPHYAINCP)pisiadw.h \
+  $(SOPHYAINCP)pilistx.h \
+  $(SOPHYAINCP)pilistgen.h \
+  $(SOPHYAINCP)pistzwin.h \
+  $(SOPHYAINCP)pitherm.h \
+  $(SOPHYAINCP)resusage.h \
+  $(SOPHYAINCP)servnobjm.h \
+  $(SOPHYAINCP)nomgadapter.h \
+  $(SOPHYAINCP)ntupintf.h \
+  $(SOPHYAINCP)generalfit.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  $(SOPHYAINCP)generaldata.h \
+  $(SOPHYAINCP)poly.h \
+  $(SOPHYAINCP)peida.h \
+  $(SOPHYAINCP)utils.h \
+  $(SOPHYAINCP)perrors.h \
+  $(SOPHYAINCP)fmath.h \
+  $(SOPHYAINCP)ntuple.h \
+  $(SOPHYAINCP)slinparbuff.h \
+  $(SOPHYAINCP)localmap.h \
+  $(SOPHYAINCP)pixelmap.h \
+  $(SOPHYAINCP)spherepos.h \
+  $(SOPHYAINCP)unitvector.h \
+  $(SOPHYAINCP)vector3d.h \
+  $(SOPHYAINCP)longlat.h \
+  $(SOPHYAINCP)utilgeom.h \
+  $(SOPHYAINCP)sphericalmap.h \
+  $(SOPHYAINCP)smathconst.h \
+  $(SOPHYAINCP)spherehealpix.h \
+  $(SOPHYAINCP)HEALPixUtils.h \
+  $(SOPHYAINCP)spherethetaphi.h \
+  $(SOPHYAINCP)sphericaltransformserver.h \
+  $(SOPHYAINCP)fftservintf.h \
+  $(SOPHYAINCP)fftpserver.h \
+  $(SOPHYAINCP)alm.h \
+  $(SOPHYAINCP)nbrandom.h \
+  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)nbmath.h \
+  $(SOPHYAINCP)triangmtx.h \
+  $(SOPHYAINCP)lambdaBuilder.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  skymapmodule.cc
+ 
+$(SOPHYAOBJP)sopiamodule.o: sopiamodule.cc \
+  $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)piacmd.h \
+  $(SOPHYAINCP)commander.h \
+  $(SOPHYAINCP)pdlmgr.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)ctimer.h \
+  $(SOPHYAINCP)zthread.h \
+  $(SOPHYAINCP)dlftypes.h \
+  $(SOPHYAINCP)nobjmgr.h \
+  $(SOPHYAINCP)pistdimgapp.h \
+  $(SOPHYAINCP)pisysdep.h \
+  $(SOPHYAINCP)piapplx.h \
+  $(SOPHYAINCP)piapplgen.h \
+  $(SOPHYAINCP)pimsghandler.h \
+  $(SOPHYAINCP)picontainerx.h \
+  $(SOPHYAINCP)picontainergen.h \
+  $(SOPHYAINCP)piwdgx.h \
+  $(SOPHYAINCP)piwdggen.h \
+  $(SOPHYAINCP)picolist.h \
+  $(SOPHYAINCP)pimenubarx.h \
+  $(SOPHYAINCP)pimenubargen.h \
+  $(SOPHYAINCP)pimenux.h \
+  $(SOPHYAINCP)pimenugen.h \
+  $(SOPHYAINCP)picons.h \
+  $(SOPHYAINCP)pistdwdgx.h \
+  $(SOPHYAINCP)pistdwdggen.h \
+  $(SOPHYAINCP)pibwdgx.h \
+  $(SOPHYAINCP)pibwdggen.h \
+  $(SOPHYAINCP)picmap.h \
+  $(SOPHYAINCP)picmapx.h \
+  $(SOPHYAINCP)picmapgen.h \
+  $(SOPHYAINCP)pigraphx.h \
+  $(SOPHYAINCP)pigraphgen.h \
+  $(SOPHYAINCP)pifontx.h \
+  $(SOPHYAINCP)pifontgen.h \
+  $(SOPHYAINCP)pigrcoord.h \
+  $(SOPHYAINCP)pilineatt.h \
+  $(SOPHYAINCP)pigraphuc.h \
+  $(SOPHYAINCP)pievthandler.h \
+  $(SOPHYAINCP)psfile.h \
+  $(SOPHYAINCP)pigraphps.h \
+  $(SOPHYAINCP)piwindowx.h \
+  $(SOPHYAINCP)piwindowgen.h \
+  $(SOPHYAINCP)pioptmenux.h \
+  $(SOPHYAINCP)pioptmenugen.h \
+  $(SOPHYAINCP)pifilechox.h \
+  $(SOPHYAINCP)pifilechogen.h \
+  $(SOPHYAINCP)piperiodx.h \
+  $(SOPHYAINCP)periodic.h \
+  $(SOPHYAINCP)piimage.h \
+  $(SOPHYAINCP)parradapter.h \
+  $(SOPHYAINCP)lut.h \
+  $(SOPHYAINCP)pieldrw.h \
+  $(SOPHYAINCP)pidrawer.h \
+  $(SOPHYAINCP)pigratt.h \
+  $(SOPHYAINCP)piaxes.h \
+  $(SOPHYAINCP)pipixmapx.h \
+  $(SOPHYAINCP)pipixmapgen.h \
+  $(SOPHYAINCP)picmapview.h \
+  $(SOPHYAINCP)pi3dwdg.h \
+  $(SOPHYAINCP)pi3ddrw.h \
+  $(SOPHYAINCP)pigraph3d.h \
+  $(SOPHYAINCP)pisiadw.h \
+  $(SOPHYAINCP)pilistx.h \
+  $(SOPHYAINCP)pilistgen.h \
+  $(SOPHYAINCP)pistzwin.h \
+  $(SOPHYAINCP)pitherm.h \
+  $(SOPHYAINCP)resusage.h \
+  $(SOPHYAINCP)servnobjm.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  $(SOPHYAINCP)pitvmaad.h \
+  $(SOPHYAINCP)fftpserver.h \
+  $(SOPHYAINCP)fftservintf.h \
+  $(SOPHYAINCP)bruit.h \
+  $(SOPHYAINCP)piscdrawwdg.h \
+  $(SOPHYAINCP)nomgadapter.h \
+  $(SOPHYAINCP)ntupintf.h \
+  $(SOPHYAINCP)generalfit.h \
+  $(SOPHYAINCP)generaldata.h \
+  $(SOPHYAINCP)poly.h \
+  $(SOPHYAINCP)peida.h \
+  $(SOPHYAINCP)utils.h \
+  $(SOPHYAINCP)perrors.h \
+  $(SOPHYAINCP)fmath.h \
+  $(SOPHYAINCP)nomskymapadapter.h \
+  $(SOPHYAINCP)pixelmap.h \
+  $(SOPHYAINCP)spherepos.h \
+  $(SOPHYAINCP)unitvector.h \
+  $(SOPHYAINCP)vector3d.h \
+  $(SOPHYAINCP)longlat.h \
+  $(SOPHYAINCP)utilgeom.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  sopiamodule.cc
+ 
+$(SOPHYAOBJP)w2ps.o: w2ps.cc $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)piacmd.h \
+  $(SOPHYAINCP)commander.h \
+  $(SOPHYAINCP)pdlmgr.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)ctimer.h \
+  $(SOPHYAINCP)zthread.h \
+  $(SOPHYAINCP)dlftypes.h \
+  $(SOPHYAINCP)nobjmgr.h \
+  $(SOPHYAINCP)pistdimgapp.h \
+  $(SOPHYAINCP)pisysdep.h \
+  $(SOPHYAINCP)piapplx.h \
+  $(SOPHYAINCP)piapplgen.h \
+  $(SOPHYAINCP)pimsghandler.h \
+  $(SOPHYAINCP)picontainerx.h \
+  $(SOPHYAINCP)picontainergen.h \
+  $(SOPHYAINCP)piwdgx.h \
+  $(SOPHYAINCP)piwdggen.h \
+  $(SOPHYAINCP)picolist.h \
+  $(SOPHYAINCP)pimenubarx.h \
+  $(SOPHYAINCP)pimenubargen.h \
+  $(SOPHYAINCP)pimenux.h \
+  $(SOPHYAINCP)pimenugen.h \
+  $(SOPHYAINCP)picons.h \
+  $(SOPHYAINCP)pistdwdgx.h \
+  $(SOPHYAINCP)pistdwdggen.h \
+  $(SOPHYAINCP)pibwdgx.h \
+  $(SOPHYAINCP)pibwdggen.h \
+  $(SOPHYAINCP)picmap.h \
+  $(SOPHYAINCP)picmapx.h \
+  $(SOPHYAINCP)picmapgen.h \
+  $(SOPHYAINCP)pigraphx.h \
+  $(SOPHYAINCP)pigraphgen.h \
+  $(SOPHYAINCP)pifontx.h \
+  $(SOPHYAINCP)pifontgen.h \
+  $(SOPHYAINCP)pigrcoord.h \
+  $(SOPHYAINCP)pilineatt.h \
+  $(SOPHYAINCP)pigraphuc.h \
+  $(SOPHYAINCP)pievthandler.h \
+  $(SOPHYAINCP)psfile.h \
+  $(SOPHYAINCP)pigraphps.h \
+  $(SOPHYAINCP)piwindowx.h \
+  $(SOPHYAINCP)piwindowgen.h \
+  $(SOPHYAINCP)pioptmenux.h \
+  $(SOPHYAINCP)pioptmenugen.h \
+  $(SOPHYAINCP)pifilechox.h \
+  $(SOPHYAINCP)pifilechogen.h \
+  $(SOPHYAINCP)piperiodx.h \
+  $(SOPHYAINCP)periodic.h \
+  $(SOPHYAINCP)piimage.h \
+  $(SOPHYAINCP)parradapter.h \
+  $(SOPHYAINCP)lut.h \
+  $(SOPHYAINCP)pieldrw.h \
+  $(SOPHYAINCP)pidrawer.h \
+  $(SOPHYAINCP)pigratt.h \
+  $(SOPHYAINCP)piaxes.h \
+  $(SOPHYAINCP)pipixmapx.h \
+  $(SOPHYAINCP)pipixmapgen.h \
+  $(SOPHYAINCP)picmapview.h \
+  $(SOPHYAINCP)pi3dwdg.h \
+  $(SOPHYAINCP)pi3ddrw.h \
+  $(SOPHYAINCP)pigraph3d.h \
+  $(SOPHYAINCP)pisiadw.h \
+  $(SOPHYAINCP)pilistx.h \
+  $(SOPHYAINCP)pilistgen.h \
+  $(SOPHYAINCP)pistzwin.h \
+  $(SOPHYAINCP)pitherm.h \
+  $(SOPHYAINCP)resusage.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  w2ps.cc
+ 
Index: trunk/SophyaPI/ProgPI/piacmdrdr.cc
===================================================================
--- trunk/SophyaPI/ProgPI/piacmdrdr.cc	(revision 2945)
+++ trunk/SophyaPI/ProgPI/piacmdrdr.cc	(revision 2945)
@@ -0,0 +1,83 @@
+#include "sopnamsp.h"
+#include "piacmdrdr.h"
+#include <iostream> 
+#include <unistd.h> 
+#include <stdio.h> 
+
+#ifdef WITH_GNUREADLINE
+#include "readline/readline.h"
+#include "readline/history.h"
+
+PIACmdReader::PIACmdReader(PIStdImgApp* imgapp)
+{
+  cout << " PIACmdReader::PIACmdReader() Using GNU readline library " << endl;
+  if (imgapp) _imgapp = imgapp;
+  else throw NullPtrError("PIACmdReader::PIACmdReader(NULL) ! ");
+}
+
+void PIACmdReader::run()
+{
+  char * line = NULL;
+  bool fgok = true;
+  char prompt[128];
+  int nc = 0;
+  while (fgok) {
+    usleep(100000);
+    sprintf(prompt,"piapp[%d] ", nc);
+    line = readline(prompt);
+    if (!line) continue;
+    else if (line[0] != '\0') {
+      nc++;
+      if (strcmp(line,"history") == 0) {
+	cout << " ===> Command history ... " << endl;
+	HIST_ENTRY **list;
+	int i;
+	list = history_list ();
+	if (list)
+	  for (int i = 0; list[i]; i++)
+	    cout << i << "- " << list[i]->line << endl;
+      }       
+      else { 
+	printf("[%d] %s\n", nc-1, line);
+	string s = line;
+	_imgapp->CmdInterpreter()->AddInputLine(s);
+	add_history (line);
+      }
+    }
+    free(line); 
+  }
+}
+#else
+//  ------ SANS GNU readline --------
+PIACmdReader::PIACmdReader(PIStdImgApp* imgapp)
+{
+  cout << " PIACmdReader::PIACmdReader() Using fgets() - without GNU readline " << endl;
+  if (imgapp) _imgapp = imgapp;
+  else throw NullPtrError("PIACmdReader::PIACmdReader(NULL) ! ");
+}
+
+void PIACmdReader::run()
+{
+  char line[1024];
+  bool fgok = true;
+  int nc = 0;
+  while (fgok) {
+    usleep(100000);
+    printf("piapp[%d] ", nc);
+    line[0] = '\0';
+    char* rs = fgets(line, 1024, stdin);
+    if (rs == NULL) continue;
+    int l = strlen(line);
+    if (l < 1)  continue; 
+    if ( (line[l-1] == '\n') || (line[l-1] == '\r') )  line[l-1] = '\0';
+    if (line[0] != '\0') {
+      printf("[%d] %s\n", nc, line);
+      nc++;
+      string s = line;
+      _imgapp->CmdInterpreter()->AddInputLine(s);
+    }
+  }
+}
+
+#endif
+
Index: trunk/SophyaPI/ProgPI/piacmdrdr.h
===================================================================
--- trunk/SophyaPI/ProgPI/piacmdrdr.h	(revision 2945)
+++ trunk/SophyaPI/ProgPI/piacmdrdr.h	(revision 2945)
@@ -0,0 +1,23 @@
+// This may look like C code, but it is really -*- C++ -*-
+// piapp command reader using GNU readline library  
+//               R. Ansari  2006
+// (C) LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#ifndef PIACMDRDR_H_SEEN
+#define PIACMDRDR_H_SEEN
+
+#include "machdefs.h"
+#include "zthread.h"
+#include "pistdimgapp.h"
+
+namespace SOPHYA {
+class PIACmdReader : public ZThread {
+public:
+  PIACmdReader(PIStdImgApp* imgapp);
+  virtual void run();
+protected:
+  PIStdImgApp* _imgapp;
+};
+}  // namespace SOPHYA 
+
+#endif 
Index: trunk/SophyaPI/ProgPI/piapp.cc
===================================================================
--- trunk/SophyaPI/ProgPI/piapp.cc	(revision 2944)
+++ trunk/SophyaPI/ProgPI/piapp.cc	(revision 2945)
@@ -7,4 +7,5 @@
 #include "pistdimgapp.h"
 #include "piacmd.h"
+#include "piacmdrdr.h"
 #include "piversion.h"
 #include "piaversion.h"
@@ -48,20 +49,19 @@
   \verbatim
   csh> spiapp -h
- SophyaInitiator::SophyaInitiator() BaseTools Init
- PIOPersist::Initialize() Starting Sophya Persistence management service 
-SOPHYA Version  1.9 Revision 0 (V_Mai2005) -- Jun  9 2005 22:01:01 
-gcc 3.3-fast 20030304 (Apple Computer, Inc. build 1614)
+ PIOPersist::Initialize() Starting Sophya Persistence management service
+SOPHYA Version  2.0 Revision 0 (V_Mai2006) -- Apr 26 2006 17:17:22 cxx
 
  piapp: Interactive data analysis and visualisation program 
  Usage: piapp [-nored] [-nosig] [-nosigfpe] [-nosigsegv] [-hidezswin] 
-              [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] 
-  -nored : NoRedirect StdOut/StdErr 
+              [-small] [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] 
+  -nored : Don't redirect stdout/stderr to piapp console
   -nosig : Don't catch SigFPE, SigSEGV 
   -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV 
+  -small : Create small size main piapp window 
   -hidezswin : Hide Zoom/Stat/ColMap window 
   -tmpdir TmpDirectory: defines TMDIR for temporary files 
   -help2tex: Create a LaTeX help file (piahelp.tex)
   -exec file [args] : Execute command file 
-  
+
   \endverbatim
  
@@ -77,8 +77,9 @@
     cout << "\n piapp: Interactive data analysis and visualisation program \n"
 	 << " Usage: piapp [-nored] [-nosig] [-nosigfpe] [-nosigsegv] [-hidezswin] \n"
-	 << "              [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] \n"
-	 << "  -nored : NoRedirect StdOut/StdErr \n"
+	 << "              [-small] [-tmpdir TmpDirectory] [-help2tex] [-exec file [args]] \n"
+	 << "  -nored : Don't redirect stdout/stderr to piapp console\n"
 	 << "  -nosig : Don't catch SigFPE, SigSEGV \n"
          << "  -nosigfpe -nosigsegv: Don t catch SigFPE / SigSEGV \n"
+	 << "  -small : Create small size main piapp window \n"
 	 << "  -hidezswin : Hide Zoom/Stat/ColMap window \n"
 	 << "  -tmpdir TmpDirectory: defines TMDIR for temporary files \n"
@@ -95,5 +96,5 @@
 {
 int ofa;
-bool fgfpe, fgsegv, fgred, fghidezsw, fgexec;
+bool fgfpe, fgsegv, fgred, fghidezsw, fgexec, fgsmall;
 
 SkyTInitiator skyinit;
@@ -109,4 +110,5 @@
 fgexec = false;
 bool fgtmp = false;
+fgsmall = false;
 string tmpdir;
 string exfc;
@@ -119,4 +121,5 @@
   else if (strcmp(arg[ka],"-nosigfpe") == 0)   fgfpe=false; 
   else if (strcmp(arg[ka],"-nosigsegv") == 0)   fgsegv=false; 
+  else if (strcmp(arg[ka],"-small") == 0)     fgsmall=true; 
   else if (strcmp(arg[ka],"-hidezswin") == 0)   fghidezsw=true; 
   else if (strcmp(arg[ka],"-help2tex") == 0) { fgtexh=true; fgred=false; }
@@ -176,5 +179,5 @@
 // cout << " DBG-TMPDIR= " << getenv("TMPDIR") << endl;
 
-PIStdImgApp * app = new PIStdImgApp(narg, arg);
+PIStdImgApp * app = new PIStdImgApp(fgsmall, narg, arg);
 // cout << " DBG-2 " <<  app->ObjMgr()->GetTmpDir() << endl;
 cout << "  NamedObjMgr::SetTmpDir()+XNTuple::SetSwapPath() " << tmpdir << endl;
@@ -213,4 +216,8 @@
   exit(0);
 }
+
+// Creation du lecteur de commande sur terminal (avec GNU readline)
+PIACmdReader cmdrdr(app);
+cmdrdr.start();
 
 int rc = 0;
@@ -277,4 +284,6 @@
 
 app->RedirectStdOutErr(false);  
+cmdrdr.cancel();
+
 // On de-charge le module sopiamodule et fitsbtadapter
 sopiamodule_end();
Index: trunk/SophyaPI/ProgPI/programs
===================================================================
--- trunk/SophyaPI/ProgPI/programs	(revision 2944)
+++ trunk/SophyaPI/ProgPI/programs	(revision 2945)
@@ -1,1 +1,1 @@
-spiapp piapp.o sopiamodule.o fitsbtadapter.o w2ps.o skymapmodule.o
+spiapp piapp.o piacmdrdr.o sopiamodule.o fitsbtadapter.o w2ps.o skymapmodule.o
