Index: /trunk/SophyaPI/PI/Makefile
===================================================================
--- /trunk/SophyaPI/PI/Makefile	(revision 162)
+++ /trunk/SophyaPI/PI/Makefile	(revision 163)
@@ -4,5 +4,5 @@
  
 all: $(LIB)libPI.a
-$(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
+$(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
 	$(AR) $(ARFLAGS)  $@ $? 
 ifeq ($(CXX),cxx)
@@ -12,5 +12,5 @@
  
 clean:
-	rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
+	rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
 ifeq ($(CXX),cxx)
 	cd $(REPM); rm -f *.o
@@ -19,14 +19,14 @@
 $(OBJ)lut.o: lut.cc $(INC)defs.h lut.h
 $(OBJ)parradapter.o: parradapter.cc parradapter.h \
- $(INC)defs.h $(INC)machine.h \
- lut.h
+ $(INC)defs.h \
+ $(INC)machine.h lut.h
 $(OBJ)pi3ddrw.o: pi3ddrw.cc pi3ddrw.h pisysdep.h pidrawer.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
  pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraph3d.h pibwdgx.h pigraphps.h \
- pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h \
- pimenux.h pimenugen.h piwindowx.h piwindowgen.h picontainerx.h \
- picontainergen.h piapplx.h piapplgen.h pimenubarx.h pimenubargen.h \
- picons.h
+ $(INC)defs.h pigraph3d.h pibwdgx.h \
+ pigraphps.h pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h \
+ pioptmenugen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \
+ picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \
+ pimenubargen.h picons.h
 $(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h pisysdep.h \
  picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \
@@ -71,5 +71,6 @@
 $(OBJ)pidrawer.o: pidrawer.cc pidrawer.h pibwdggen.h pisysdep.h piwdgx.h \
  piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h \
- pigraphgen.h pigraphuc.h psfile.h $(INC)defs.h
+ pigraphgen.h pigraphuc.h psfile.h \
+ $(INC)defs.h
 $(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h piwindowx.h \
  piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
@@ -84,7 +85,6 @@
  pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
  picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h piscdrawwdg.h pidrawer.h \
- pi3ddrw.h pigraph3d.h
-$(OBJ)pievthandler.o: pievthandler.cc
+ $(INC)defs.h pigraphps.h piscdrawwdg.h \
+ pidrawer.h pi3ddrw.h pigraph3d.h
 $(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \
  piwdggen.h pimsghandler.h
@@ -96,33 +96,39 @@
  $(INC)defs.h pigraphps.h pifilechox.h \
  pifilechogen.h piwindowx.h piwindowgen.h
-$(OBJ)pigfd1.o: pigfd1.cc pigfd1.h $(INC)generaldata.h \
- $(INC)exceptions.h \
- $(INC)defs.h \
- $(INC)peidainit.h \
- $(INC)ppersist.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)pclassids.h \
- $(INC)poly.h $(INC)peida.h \
- $(INC)utils.h $(INC)fmath.h \
- $(INC)cvector.h \
- $(INC)matrix.h pidrawer.h pibwdggen.h pisysdep.h \
- piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pigraphuc.h psfile.h
-$(OBJ)pigfd2.o: pigfd2.cc pigfd2.h $(INC)generaldata.h \
- $(INC)exceptions.h \
- $(INC)defs.h \
- $(INC)peidainit.h \
- $(INC)ppersist.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)pclassids.h \
- $(INC)poly.h $(INC)peida.h \
- $(INC)utils.h $(INC)fmath.h \
- $(INC)cvector.h \
- $(INC)matrix.h pi3ddrw.h pisysdep.h pidrawer.h \
- pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h pigraph3d.h \
- pibwdgx.h pigraphps.h
+$(OBJ)pigfd1.o: pigfd1.cc pigfd1.h \
+ $(INC)generaldata.h \
+ $(INC)exceptions.h \
+ $(INC)defs.h \
+ $(INC)peidainit.h \
+ $(INC)ppersist.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)pclassids.h \
+ $(INC)poly.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)fmath.h \
+ $(INC)cvector.h \
+ $(INC)matrix.h pidrawer.h pibwdggen.h \
+ pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
+ picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h
+$(OBJ)pigfd2.o: pigfd2.cc pigfd2.h \
+ $(INC)generaldata.h \
+ $(INC)exceptions.h \
+ $(INC)defs.h \
+ $(INC)peidainit.h \
+ $(INC)ppersist.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)pclassids.h \
+ $(INC)poly.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)fmath.h \
+ $(INC)cvector.h \
+ $(INC)matrix.h pi3ddrw.h pisysdep.h \
+ pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
+ pigraph3d.h pibwdgx.h pigraphps.h
 $(OBJ)pigraph3d.o: pigraph3d.cc pigraph3d.h pisysdep.h pigraphuc.h \
  pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
@@ -138,10 +144,13 @@
  piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h
 $(OBJ)pihisto.o: pihisto.cc pihisto.h $(INC)histos.h \
- $(INC)peida.h $(INC)defs.h \
- $(INC)utils.h $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)fmath.h $(INC)cvector.h \
+ $(INC)peida.h \
+ $(INC)defs.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)fmath.h \
+ $(INC)cvector.h \
  $(INC)matrix.h \
  $(INC)ppersist.h \
@@ -155,12 +164,14 @@
  pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
  pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h pihisto2d.h pioptmenux.h \
- pioptmenugen.h $(INC)histos2.h \
- $(INC)peida.h $(INC)utils.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)fmath.h $(INC)histos.h \
+ $(INC)defs.h pigraphps.h pihisto2d.h \
+ pioptmenux.h pioptmenugen.h $(INC)histos2.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)fmath.h \
+ $(INC)histos.h \
  $(INC)cvector.h \
  $(INC)matrix.h \
@@ -169,12 +180,13 @@
  piwindowgen.h pidrawer.h $(INC)nbrandom.h
 $(OBJ)piimage.o: piimage.cc piimage.h parradapter.h \
- $(INC)defs.h $(INC)machine.h \
- lut.h pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h \
- pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
- pigraphuc.h psfile.h pipixmapx.h pipixmapgen.h pibwdgx.h pigraphps.h \
- pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
- picontainergen.h picmapview.h piimgtools.h pioptmenux.h \
- pioptmenugen.h pimenux.h pimenugen.h piapplx.h piapplgen.h \
- pimenubarx.h pimenubargen.h picons.h pidrwtools.h
+ $(INC)defs.h \
+ $(INC)machine.h lut.h pisysdep.h pidrawer.h \
+ pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
+ picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h pipixmapx.h \
+ pipixmapgen.h pibwdgx.h pigraphps.h pistdwdgx.h pistdwdggen.h \
+ piwindowx.h piwindowgen.h picontainerx.h picontainergen.h \
+ picmapview.h piimgtools.h pioptmenux.h pioptmenugen.h pimenux.h \
+ pimenugen.h piapplx.h piapplgen.h pimenubarx.h pimenubargen.h \
+ picons.h pidrwtools.h
 $(OBJ)piimgtools.o: piimgtools.cc piimgtools.h pisysdep.h pistdwdgx.h \
  pistdwdggen.h piwdgx.h piwdggen.h pimsghandler.h pioptmenux.h \
@@ -183,9 +195,8 @@
  pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
  picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h piimage.h parradapter.h \
- $(INC)machine.h lut.h pidrawer.h pipixmapx.h \
- pipixmapgen.h picmapview.h
+ $(INC)defs.h pigraphps.h piimage.h \
+ parradapter.h $(INC)machine.h lut.h \
+ pidrawer.h pipixmapx.h pipixmapgen.h picmapview.h
 $(OBJ)piinit.o: piinit.cc $(INC)defs.h piinit.h \
- $(INC)strecinit.h \
  $(INC)imaginit.h \
  $(INC)outilsinit.h \
@@ -212,25 +223,29 @@
  pimenugen.h piwdgx.h piwdggen.h pimsghandler.h
 $(OBJ)pimsghandler.o: pimsghandler.cc pimsghandler.h
-$(OBJ)pintup3d.o: pintup3d.cc pintup3d.h $(INC)ntuple.h \
- $(INC)ppersist.h $(INC)defs.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)pclassids.h \
- $(INC)dvlist.h pi3ddrw.h pisysdep.h pidrawer.h \
- pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h pigraph3d.h \
- pibwdgx.h pigraphps.h
-$(OBJ)pintuple.o: pintuple.cc pintuple.h $(INC)ntuple.h \
- $(INC)ppersist.h $(INC)defs.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)pclassids.h \
- $(INC)dvlist.h pidrawer.h pibwdggen.h pisysdep.h \
- piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pigraphuc.h psfile.h
+$(OBJ)pintup3d.o: pintup3d.cc pintup3d.h \
+ $(INC)ntuple.h \
+ $(INC)ppersist.h \
+ $(INC)defs.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)pclassids.h \
+ $(INC)dvlist.h pi3ddrw.h pisysdep.h \
+ pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
+ pigraph3d.h pibwdgx.h pigraphps.h
+$(OBJ)pintuple.o: pintuple.cc pintuple.h \
+ $(INC)ntuple.h \
+ $(INC)ppersist.h \
+ $(INC)defs.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)pclassids.h \
+ $(INC)dvlist.h pidrawer.h pibwdggen.h \
+ pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
+ picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h
 $(OBJ)pioptmenugen.o: pioptmenugen.cc pioptmenugen.h pisysdep.h pimenux.h \
  pimenugen.h piwdgx.h piwdggen.h pimsghandler.h
@@ -258,6 +273,8 @@
  $(INC)machine.h lut.h \
  $(INC)cvector.h \
- $(INC)matrix.h $(INC)peida.h \
- $(INC)utils.h $(INC)perrors.h \
+ $(INC)matrix.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)perrors.h \
  $(INC)exceptions.h \
  $(INC)peidainit.h \
@@ -283,6 +300,8 @@
 $(OBJ)pistdwdgx.o: pistdwdgx.cc pisysdep.h pistdwdgx.h pistdwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)pistlist.o: pistlist.cc pistlist.h $(INC)stlist.h \
- $(INC)machine.h $(INC)defs.h \
+$(OBJ)pistlist.o: pistlist.cc pistlist.h \
+ $(INC)stlist.h \
+ $(INC)machine.h \
+ $(INC)defs.h \
  $(INC)exceptions.h \
  $(INC)peidainit.h \
@@ -292,7 +311,10 @@
  $(INC)pclassids.h \
  $(INC)star.h \
- $(INC)starmacro.h $(INC)psf.h \
- $(INC)peida.h $(INC)utils.h \
- $(INC)fmath.h $(INC)cimage.h \
+ $(INC)starmacro.h \
+ $(INC)psf.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)fmath.h \
+ $(INC)cimage.h \
  $(INC)rzimage.h \
  $(INC)rzvect.h \
@@ -304,7 +326,9 @@
  $(INC)cvector.h \
  $(INC)generaldata.h \
- $(INC)poly.h $(INC)fct2dfit.h \
+ $(INC)poly.h \
+ $(INC)fct2dfit.h \
  $(INC)pixelmap.h \
- $(INC)transfo.h $(INC)zfidu.h \
+ $(INC)transfo.h \
+ $(INC)zfidu.h \
  $(INC)imgalig.h \
  $(INC)fitsimage.h \
@@ -321,8 +345,8 @@
  $(INC)erostarfile.h \
  $(INC)xstrstream.h \
- $(INC)dates.h $(INC)tarlib.h \
- pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h \
- picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \
- psfile.h
+ $(INC)dates.h \
+ $(INC)tarlib.h pidrawer.h pibwdggen.h \
+ pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
+ picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h
 $(OBJ)pistzwin.o: pistzwin.cc pistzwin.h pisysdep.h piwindowx.h \
  piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
@@ -331,15 +355,19 @@
  picmapx.h picmapgen.h
 $(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \
- $(INC)defs.h $(INC)machine.h \
- lut.h pi3ddrw.h pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h \
- pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
- pigraphuc.h psfile.h pigraph3d.h pibwdgx.h pigraphps.h
+ $(INC)defs.h \
+ $(INC)machine.h lut.h pi3ddrw.h pisysdep.h \
+ pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
+ pigraph3d.h pibwdgx.h pigraphps.h
 $(OBJ)piup.o: piup.cc $(INC)ctimer.h \
- $(INC)peida.h $(INC)defs.h \
- $(INC)utils.h $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)fmath.h $(INC)imageop.h \
+ $(INC)peida.h \
+ $(INC)defs.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)fmath.h \
+ $(INC)imageop.h \
  $(INC)cimage.h \
  $(INC)rzimage.h \
@@ -365,6 +393,6 @@
  $(INC)erostarfile.h \
  $(INC)xstrstream.h \
- $(INC)dates.h $(INC)tarlib.h \
- piup.h
+ $(INC)dates.h \
+ $(INC)tarlib.h piup.h
 $(OBJ)piwdggen.o: piwdggen.cc piwdggen.h pimsghandler.h picontainergen.h \
  pisysdep.h piwdgx.h psfile.h $(INC)defs.h \
Index: /trunk/SophyaPI/PI/exclude
===================================================================
--- /trunk/SophyaPI/PI/exclude	(revision 162)
+++ /trunk/SophyaPI/PI/exclude	(revision 163)
@@ -29,2 +29,4 @@
 pitestapp.cc
 piup_def.cc
+xdispim.c
+piup.c
Index: /trunk/SophyaPI/PI/pi3ddrw.cc
===================================================================
--- /trunk/SophyaPI/PI/pi3ddrw.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pi3ddrw.cc	(revision 163)
@@ -129,8 +129,8 @@
   list<int>::iterator it;
   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-#if defined(__GNUC__) && !defined(GCCV28)
+#if defined(__DECCXX) || defined(__KCC__)
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+#else
     ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-#else
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
 #endif
   vfixed = true;
@@ -144,8 +144,8 @@
   list<int>::iterator it;
   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-#if defined(__GNUC__) && !defined(GCCV28)
+#if defined(__DECCXX) || defined(__KCC__)
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
+#else
     ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
-#else
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
 #endif
   vfixed = true;
@@ -165,8 +165,8 @@
   list<int>::iterator it = m3DrIl.begin();
   if (it == m3DrIl.end())  return;
-#if defined(__GNUC__) && !defined(GCCV28)
+#if defined(__DECCXX) || defined(__KCC__)
+  PIDrawer3D* dr3 = dynamic_cast<PIDrawer3D*>(GetDrawerId(*it));
+#else
   PIDrawer3D* dr3 = (PIDrawer3D*)(GetDrawerId(*it));
-#else
-  PIDrawer3D* dr3 = dynamic_cast<PIDrawer3D*>(GetDrawerId(*it));
 #endif
   if (dr3 == NULL)  return;
@@ -191,14 +191,15 @@
   vo = mGr3d->Get3DCS( xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
   list<int>::iterator it;
-#if defined(__GNUC__) && !defined(GCCV28)
+
+#if defined(__DECCXX) || defined(__KCC__)
+  if (vo)   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  else   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);    
+#else
   if (vo)   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
     ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
   else   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
     ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);    
-#else
-  if (vo)   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  else   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);    
 #endif
 
Index: /trunk/SophyaPI/PI/pi3ddrw.h
===================================================================
--- /trunk/SophyaPI/PI/pi3ddrw.h	(revision 162)
+++ /trunk/SophyaPI/PI/pi3ddrw.h	(revision 163)
@@ -13,5 +13,4 @@
 #include PIBWDG_H
 
-#include <list>
 
 // -----------------  Traceur (Drawer) 3D  -------------------
Index: /trunk/SophyaPI/PI/piapplx.cc
===================================================================
--- /trunk/SophyaPI/PI/piapplx.cc	(revision 162)
+++ /trunk/SophyaPI/PI/piapplx.cc	(revision 163)
@@ -91,6 +91,6 @@
                             sx, sy, 0, msy);
 topcont->Show();
-
 MBCont()->Show();
+
 topwdg->Manage();
 
@@ -258,5 +258,7 @@
 fcntl(p[0], F_SETFL, O_NONBLOCK);
 
+#if (!defined(__GNUG__) && !defined(__aCC__))
 setlinebuf(stdout);
+#endif
 ios::sync_with_stdio();
 
@@ -290,5 +292,7 @@
 fcntl(p[0], F_SETFL, O_NONBLOCK);
 
+#if (!defined(__GNUG__) && !defined(__aCC__))
 setlinebuf(stderr);
+#endif
 ios::sync_with_stdio();
 
Index: /trunk/SophyaPI/PI/pibwdggen.cc
===================================================================
--- /trunk/SophyaPI/PI/pibwdggen.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pibwdggen.cc	(revision 163)
@@ -10,4 +10,5 @@
 #include "pidrwtools.h"
 
+static inline void fl_swap(float& a, float& b) { float tmp = a; a = b; b = tmp;  } 
 
 //++
@@ -536,6 +537,6 @@
     guc->GrC2UC(XSize(), YSize(), xmax, ymax);    
     } 
-  if (xmin > xmax)  swap(xmin,xmax);
-  if (ymin > ymax)  swap(ymin,ymax);
+  if (xmin > xmax)  fl_swap(xmin,xmax);
+  if (ymin > ymax)  fl_swap(ymin,ymax);
   (*it).drw->Draw(guc, xmin, ymin, xmax, ymax);
   g->RestoreGraphicAtt();
@@ -592,6 +593,6 @@
     guc->GrC2UC(0, 0, xmin, ymin);
     guc->GrC2UC(XSize(), YSize(), xmax, ymax);     
-    if (xmin > xmax)  swap(xmin,xmax);
-    if (ymin > ymax)  swap(ymin,ymax);
+    if (xmin > xmax)  fl_swap(xmin,xmax);
+    if (ymin > ymax)  fl_swap(ymin,ymax);
     (*it).drw->Draw(guc, xmin, ymin, xmax, ymax);
     g->RestoreGraphicAtt();    
Index: /trunk/SophyaPI/PI/pibwdggen.h
===================================================================
--- /trunk/SophyaPI/PI/pibwdggen.h	(revision 162)
+++ /trunk/SophyaPI/PI/pibwdggen.h	(revision 163)
@@ -12,4 +12,7 @@
 // Mettre dans cet ordre, sinon g++ a des problemes   
 #include <vector>   
+#if defined(__KCC__)
+#include <vector.h>
+#endif
 
 enum PIKeyModifier { PIKM_Blank = 0, PIKM_Shift = 1, PIKM_Alt = 2, PIKM_Cntl = 4 } ; 
Index: /trunk/SophyaPI/PI/picmap.cc
===================================================================
--- /trunk/SophyaPI/PI/picmap.cc	(revision 162)
+++ /trunk/SophyaPI/PI/picmap.cc	(revision 163)
@@ -3,5 +3,5 @@
 #define  MXMAPIDS   10 
 static   int    MapNCols[MXMAPIDS] = {256, 256, 256, 256, 256, 256, 256, 256, 256, 256};
-static   char*  MapNoms[MXMAPIDS]  = {"Grey32","InvGrey32","ColRJ32","ColBR32",
+static   const char*  MapNoms[MXMAPIDS]  = {"Grey32","InvGrey32","ColRJ32","ColBR32",
                                "ColRV32", "Grey128", "InvGrey128", "ColRJ128",
                                "ColBR128", "Col16"};
Index: /trunk/SophyaPI/PI/picmapgen.cc
===================================================================
--- /trunk/SophyaPI/PI/picmapgen.cc	(revision 162)
+++ /trunk/SophyaPI/PI/picmapgen.cc	(revision 163)
@@ -2,4 +2,8 @@
 #include <list>
 #include <algorithm>
+#if defined(__KCC__)
+#include <list.h>
+#include <algorithm.h>
+#endif
 #include "pisysdep.h"
 #include PICMAPNTV_H
Index: /trunk/SophyaPI/PI/picmapgen.h
===================================================================
--- /trunk/SophyaPI/PI/picmapgen.h	(revision 162)
+++ /trunk/SophyaPI/PI/picmapgen.h	(revision 163)
@@ -5,4 +5,7 @@
 #include <string>
 #include <string.h>
+#if defined(__KCC__)
+using std::string ;
+#endif
 
 
Index: /trunk/SophyaPI/PI/picmapx.cc
===================================================================
--- /trunk/SophyaPI/PI/picmapx.cc	(revision 162)
+++ /trunk/SophyaPI/PI/picmapx.cc	(revision 163)
@@ -47,7 +47,4 @@
 PIColor PIColorMapX::GetColor(int n)
 {
-PIColor picr;
-picr.red = picr.green = picr.blue = 0;
-
 if ((n<0) || (n >= NCol()))   
   {
@@ -60,5 +57,5 @@
 
 static  Colormap  defxcmap;
-static  xinicmap = 0;
+static  int xinicmap = 0;
 static int NTotColors = 0;
 static int NTotAllocCol = 0;
Index: /trunk/SophyaPI/PI/pidrawer.cc
===================================================================
--- /trunk/SophyaPI/PI/pidrawer.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pidrawer.cc	(revision 163)
@@ -5,5 +5,4 @@
 
 #include "pidrawer.h"
-#include "psfile.h"
 
 //++
Index: /trunk/SophyaPI/PI/pidrawer.h
===================================================================
--- /trunk/SophyaPI/PI/pidrawer.h	(revision 162)
+++ /trunk/SophyaPI/PI/pidrawer.h	(revision 163)
@@ -8,5 +8,9 @@
 #include "pibwdggen.h"
 #include "pigraphuc.h"
+
 #include <list>
+#if defined(__KCC__)
+#include <list.h>
+#endif
 
 enum {
Index: /trunk/SophyaPI/PI/pidrwtools.cc
===================================================================
--- /trunk/SophyaPI/PI/pidrwtools.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pidrwtools.cc	(revision 163)
@@ -236,5 +236,6 @@
 {
 if (cwdrwt == this)  cwdrwt = NULL;
-for(int i=0; i<2; i++)
+int i;
+for(i=0; i<2; i++)
   {
   delete mLab[i];
@@ -245,5 +246,5 @@
   }
 delete mBut[2];
-for(int i=0; i<6; i++)  delete mOpt[i];
+for(i=0; i<6; i++)  delete mOpt[i];
 delete mNlb;
 }
Index: /trunk/SophyaPI/PI/pierrdisp.h
===================================================================
--- /trunk/SophyaPI/PI/pierrdisp.h	(revision 162)
+++ /trunk/SophyaPI/PI/pierrdisp.h	(revision 163)
@@ -8,5 +8,4 @@
 #include PICONT_H
 #include PIPERIOD_H
-#include <string>
 
 #include "errorhandlerc.h"
Index: /trunk/SophyaPI/PI/pifilechogen.h
===================================================================
--- /trunk/SophyaPI/PI/pifilechogen.h	(revision 162)
+++ /trunk/SophyaPI/PI/pifilechogen.h	(revision 163)
@@ -2,5 +2,4 @@
 #define PIFILCHOGEN_H_SEEN
 
-#include <string>
 #include "pisysdep.h"
 #include PIWDG_H
Index: /trunk/SophyaPI/PI/pifilechox.h
===================================================================
--- /trunk/SophyaPI/PI/pifilechox.h	(revision 162)
+++ /trunk/SophyaPI/PI/pifilechox.h	(revision 163)
@@ -2,5 +2,4 @@
 #define PIFILCHOX_H_SEEN
 
-#include <string>
 #include "pisysdep.h"
 #include "pifilechogen.h"
Index: /trunk/SophyaPI/PI/pigfd2.cc
===================================================================
--- /trunk/SophyaPI/PI/pigfd2.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pigfd2.cc	(revision 163)
@@ -64,8 +64,8 @@
 if(mLAtt!=PI_NotDefLineAtt) SelectErrBar(true,true,true);
 
-#if defined(__GNUC__) && !defined(GCCV28)
+#if defined(__DECCXX) || defined(__KCC__)
+PIGraphic3D* g3 = dynamic_cast<PIGraphic3D*>(g);
+#else
 PIGraphic3D* g3 = (PIGraphic3D*)(g);
-#else
-PIGraphic3D* g3 = dynamic_cast<PIGraphic3D*>(g);
 #endif
 
Index: /trunk/SophyaPI/PI/pigfname.h
===================================================================
--- /trunk/SophyaPI/PI/pigfname.h	(revision 162)
+++ /trunk/SophyaPI/PI/pigfname.h	(revision 163)
@@ -3,4 +3,7 @@
 
 #include <string>
+#if defined(__KCC__)
+using std::string ;
+#endif
 
 string PIGetFileName(string = "");
Index: /trunk/SophyaPI/PI/pigraph3d.cc
===================================================================
--- /trunk/SophyaPI/PI/pigraph3d.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pigraph3d.cc	(revision 163)
@@ -96,4 +96,11 @@
 //|	psi : rotation du plan image
 //--
+
+#if defined(__KCC__) 
+#ifndef M_PI
+#define M_PI            3.14159265358979323846  /* pi */
+#define M_PI_2          1.57079632679489661923  /* pi/2 */
+#endif
+#endif
 
 static float deuxpi = 2*M_PI;
Index: /trunk/SophyaPI/PI/pigraphps.cc
===================================================================
--- /trunk/SophyaPI/PI/pigraphps.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pigraphps.cc	(revision 163)
@@ -188,5 +188,5 @@
 xtmp = new float[n];
 ytmp = new float[n];
-for(int i = 0 ; i < n ; i++) {xtmp[i] = (float)x[i] ; ytmp[i] = (float)y[i] ; }
+for(i = 0 ; i < n ; i++) {xtmp[i] = (float)x[i] ; ytmp[i] = (float)y[i] ; }
 //float xoff,yoff;
 //if (cinc) { xoff=yoff=0.; }   // Coord en mode incremental
@@ -217,5 +217,5 @@
 xtmp = new float[n];
 ytmp = new float[n];
-for(int i = 0 ; i < n ; i++) {xtmp[i] = (float)x[i] ; ytmp[i] = (float)y[i] ; }
+for(i = 0 ; i < n ; i++) {xtmp[i] = (float)x[i] ; ytmp[i] = (float)y[i] ; }
 //float xoff,yoff;
 //if (cinc) { xoff=yoff=0.; }   // Coord en mode incremental
Index: /trunk/SophyaPI/PI/piimage.cc
===================================================================
--- /trunk/SophyaPI/PI/piimage.cc	(revision 162)
+++ /trunk/SophyaPI/PI/piimage.cc	(revision 163)
@@ -7,5 +7,4 @@
 #include <stdlib.h>
 #include <stdio.h>
-#include <string>
 #include <string.h>
 
Index: /trunk/SophyaPI/PI/piimgtools.cc
===================================================================
--- /trunk/SophyaPI/PI/piimgtools.cc	(revision 162)
+++ /trunk/SophyaPI/PI/piimgtools.cc	(revision 163)
@@ -199,5 +199,6 @@
 {
 if (curlutw == this)  curlutw = NULL;
-for(int i=0; i<2; i++)
+int i;
+for(i=0; i<2; i++)
   {
   delete mLab[i];
@@ -209,7 +210,7 @@
   delete mOptzc[i];
   }
-for(int i=0; i<5; i++)  delete mButsz[i];
-for(int i=0; i<3; i++)  delete mButcax[i];
-for(int i=0; i<5; i++)  delete mButoa[i];
+for(i=0; i<5; i++)  delete mButsz[i];
+for(i=0; i<3; i++)  delete mButcax[i];
+for(i=0; i<5; i++)  delete mButoa[i];
 
 }
Index: /trunk/SophyaPI/PI/piinit.cc
===================================================================
--- /trunk/SophyaPI/PI/piinit.cc	(revision 162)
+++ /trunk/SophyaPI/PI/piinit.cc	(revision 163)
@@ -6,5 +6,5 @@
 
 PeidaInteractiveInitiator::PeidaInteractiveInitiator()
- : PeidaStarRecoInitiator()
+ : PeidaImagesInitiator()
 {
   FgInit++;
Index: /trunk/SophyaPI/PI/piinit.h
===================================================================
--- /trunk/SophyaPI/PI/piinit.h	(revision 162)
+++ /trunk/SophyaPI/PI/piinit.h	(revision 163)
@@ -2,9 +2,9 @@
 #define PIINIT_H_SEEN
 
-#include "strecinit.h"
+#include "imaginit.h"
 
 // Classe d'initialisation pour le module PI de PEIDA
 
-class PeidaInteractiveInitiator : public PeidaStarRecoInitiator{
+class PeidaInteractiveInitiator : public PeidaImagesInitiator{
 private:
   static int FgInit;
Index: /trunk/SophyaPI/PI/pilistx.cc
===================================================================
--- /trunk/SophyaPI/PI/pilistx.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pilistx.cc	(revision 163)
@@ -107,5 +107,9 @@
 mNItem++;
 
+#if defined(__xlC)
+XmString xms = XmStringCreate((char *)(item), XmSTRING_DEFAULT_CHARSET);
+#else
 XmString xms = XmStringCreate(const_cast<char *>(item), XmSTRING_DEFAULT_CHARSET);
+#endif
 XmListAddItem(mlist, xms, 0);
 XmStringFree(xms);
Index: /trunk/SophyaPI/PI/pintup3d.cc
===================================================================
--- /trunk/SophyaPI/PI/pintup3d.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pintup3d.cc	(revision 163)
@@ -84,8 +84,8 @@
 if ( (xK < 0) || (yK < 0) || (zK < 0) )  return;
 
-#if defined(__GNUC__) && !defined(GCCV28)
+#if defined(__DECCXX) || defined(__KCC__)
+PIGraphic3D* g3 = dynamic_cast<PIGraphic3D*>(g);
+#else
 PIGraphic3D* g3 = (PIGraphic3D*)(g);
-#else
-PIGraphic3D* g3 = dynamic_cast<PIGraphic3D*>(g);
 #endif
 
Index: /trunk/SophyaPI/PI/pioptmenugen.h
===================================================================
--- /trunk/SophyaPI/PI/pioptmenugen.h	(revision 162)
+++ /trunk/SophyaPI/PI/pioptmenugen.h	(revision 163)
@@ -2,5 +2,4 @@
 #define PIOPTMENGEN_H_SEEN
 
-#include <string>
 #include "pisysdep.h"
 #include PIMENU_H
Index: /trunk/SophyaPI/PI/pipixmapgen.h
===================================================================
--- /trunk/SophyaPI/PI/pipixmapgen.h	(revision 162)
+++ /trunk/SophyaPI/PI/pipixmapgen.h	(revision 163)
@@ -10,4 +10,7 @@
 
 #include <list>
+#if defined(__KCC__)
+#include <list.h>
+#endif
 
 class PIPixmapGen : public PIBaseWdg
Index: /trunk/SophyaPI/PI/pipixmapx.cc
===================================================================
--- /trunk/SophyaPI/PI/pipixmapx.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pipixmapx.cc	(revision 163)
@@ -6,5 +6,4 @@
 
 #include "pipixmapx.h"
-#include "psfile.h"
 
 static  GC    mygc;
@@ -130,12 +129,8 @@
 XGCValues       values;
 XtGCMask        mask;
-Display *mdsp;
-int scr;
 
 if (fgxpxm)  return; 
 fgxpxm = true;
 
-mdsp = XtDisplay(XtWdg());
-scr = XDefaultScreen(mdsp);
 
 mask = GCFunction | GCPlaneMask;
@@ -154,5 +149,4 @@
 void PIPixmapX::AllocXImg()
 {
-Window xw;
 Display * mdsp;
 int scr;
@@ -161,5 +155,4 @@
 int i,j;
 
-xw = XtWindow(XtWdg());
 mdsp = PIXDisplay();
 scr = PIXScreen();
Index: /trunk/SophyaPI/PI/piscdrawwdg.cc
===================================================================
--- /trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 162)
+++ /trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 163)
@@ -6,4 +6,6 @@
 #include "pidrwtools.h"
 #include "parradapter.h"
+
+static inline void fl_swap(float& a, float& b) { float tmp = a; a = b; b = tmp;  } 
 
 PIScDrawWdg::PIScDrawWdg(PIContainerGen *par, char *nom,
@@ -224,6 +226,6 @@
     mBDrw->GetGraphicUC()->GrC2UC(xBegDrag, yBegDrag, xl, yl);
     mBDrw->GetGraphicUC()->GrC2UC(xEndDrag, yEndDrag, xh, yh);
-    if (xl > xh) swap(xl, xh);
-    if (yl > yh) swap(yl, yh);
+    if (xl > xh) fl_swap(xl, xh);
+    if (yl > yh) fl_swap(yl, yh);
     SetLimits(xl,xh,yl,yh, kAxeDirSame, kAxeDirSame, true);
   }
Index: /trunk/SophyaPI/PI/pistdwdggen.h
===================================================================
--- /trunk/SophyaPI/PI/pistdwdggen.h	(revision 162)
+++ /trunk/SophyaPI/PI/pistdwdggen.h	(revision 163)
@@ -2,5 +2,5 @@
 #define PISTDWDGGEN_H_SEEN
 
-#include <string>
+
 #include "pisysdep.h"
 #include PIWDG_H
@@ -84,5 +84,5 @@
   kSDirRtoL     = 2,
   kSDirDownUp   = 4,
-  kSDirUpDown   = 8,
+  kSDirUpDown   = 8
 };
 
Index: /trunk/SophyaPI/PI/pisurfdr.cc
===================================================================
--- /trunk/SophyaPI/PI/pisurfdr.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pisurfdr.cc	(revision 163)
@@ -82,8 +82,8 @@
   if (mArr == NULL)  return;
 
-#if defined(__GNUC__) && !defined(GCCV28)
+#if defined(__DECCXX) || defined(__KCC__)
+  PIGraphic3D* g3 = dynamic_cast<PIGraphic3D*>(g);
+#else
   PIGraphic3D* g3 = (PIGraphic3D*)(g);
-#else
-  PIGraphic3D* g3 = dynamic_cast<PIGraphic3D*>(g);
 #endif
 
Index: /trunk/SophyaPI/PI/piwdggen.h
===================================================================
--- /trunk/SophyaPI/PI/piwdggen.h	(revision 162)
+++ /trunk/SophyaPI/PI/piwdggen.h	(revision 163)
@@ -8,4 +8,7 @@
 
 #include <string>
+#if defined(__KCC__)
+using std::string ;
+#endif
 
 #include "pimsghandler.h"
Index: /trunk/SophyaPI/PI/piwdgx.cc
===================================================================
--- /trunk/SophyaPI/PI/piwdgx.cc	(revision 162)
+++ /trunk/SophyaPI/PI/piwdgx.cc	(revision 163)
@@ -123,4 +123,8 @@
 int n=0;
 
+#ifdef DEBUG_PIWdgX
+printf("Debug_PIWdgX::CreateXtWdg(%s) Getting in \n");
+#endif
+
 if (pwdg == NULL)
   {
@@ -503,5 +507,5 @@
 
 // Ressources X si non definis 
-static String fallback_res[22] = {
+static const String fallback_res[22] = {
 "PeidaInt*default*background:                 LightGrey" ,
 "PeidaInt*background:                         LightGrey" ,
@@ -537,17 +541,25 @@
 // Initialisation ...  
 int n;
-char *pc = "PIWdgX";
+const char *pc = (const char *)"PIWdgX";
 char **ppc;
 if (narg > 0)  { n = narg, ppc = arg; }
-else { ppc = &pc; n = 1; }
+#if defined(__xlC)
+else { ppc = (char **)(&pc); n = 1; }
+#else
+else { ppc = const_cast<char **>(&pc); n = 1; }
+#endif
 //  strncpy(appname, ppc[0], 63); appname[63] = '\0';
 strncpy(appclass,"PeidaInt",63);  appclass[63] = '\0';     
 //  top = XtAppInitialize(&appctx, appclass, NULL, 0, &n, ppc);
-top = XtVaAppInitialize(&appctx, appclass, NULL, 0, &n, ppc, fallback_res, NULL);
+#if defined(__xlC)
+top = XtVaAppInitialize(&appctx, appclass, NULL, 0, &n, ppc, (String*)(fallback_res), NULL);
+#else
+top = XtVaAppInitialize(&appctx, appclass, NULL, 0, &n, ppc, const_cast<String*>(fallback_res), NULL);
+#endif
 dpy = XtDisplay(top);
 
 // On va recuperer la fonte par defaut des composantes Motif
 XtResource res[] = {
-  { "fontList", "FontList", XtRString, sizeof(String),
+  { (char *)"fontList", (char *)"FontList", XtRString, sizeof(String),
     0, XtRString, "-*-courier-bold-*-*-*-*-*-*-*-*-*-*-*" }
 };
Index: /trunk/SophyaPI/PI/piwindowx.cc
===================================================================
--- /trunk/SophyaPI/PI/piwindowx.cc	(revision 162)
+++ /trunk/SophyaPI/PI/piwindowx.cc	(revision 163)
@@ -78,5 +78,5 @@
   if (fgactl == 0) 
     { 
-    XtActionsRec desact = {"CloseWindow" ,CloseWindow};
+    XtActionsRec desact = {(char *)"CloseWindow" ,CloseWindow};
     int szx, szy, szf;
     XtAppContext * appctx = PIXtAppCtx(szx, szy, szf);
Index: /trunk/SophyaPI/PI/pixtbase.cc
===================================================================
--- /trunk/SophyaPI/PI/pixtbase.cc	(revision 162)
+++ /trunk/SophyaPI/PI/pixtbase.cc	(revision 163)
@@ -43,5 +43,5 @@
 
 static XtResource resources[] ={
-  {PIXNobject ,"Object", XtRPointer, sizeof(XtRPointer),
+  {PIXNobject ,(char *)"Object", XtRPointer, sizeof(XtRPointer),
    XtOffset(PIXtBaseWidget,  pixtbase.objet), XtRImmediate, (XtPointer)0},
 };
@@ -53,5 +53,5 @@
 
 (WidgetClass) &coreClassRec,    /* pointer to superclass ClassRec   */
-"PIXtBase",         		/* widget resource class name       */
+(char*)"PIXtBase",         	/* widget resource class name       */
 sizeof(PIXtBaseRec),	        /* size in bytes of widget record   */
 init_class_pixtbase,            /* class_initialize                 */
Index: /trunk/SophyaPI/PI/psfile.cc
===================================================================
--- /trunk/SophyaPI/PI/psfile.cc	(revision 162)
+++ /trunk/SophyaPI/PI/psfile.cc	(revision 163)
@@ -295,5 +295,9 @@
  */
 PSFile::PSFile(const char * FileName, float sc) 
+#if defined(__xlC)
+    : mPSFileName(FileName==NULL? "unnamed.eps" : (char *)(FileName)),
+#else
     : mPSFileName(FileName==NULL? "unnamed.eps" : const_cast<char *>(FileName)),
+#endif
       Tw (-1.), Th(-1.),         /* Non specifies pour du eps  */
       WMargin (-1), HMargin(-1), /* Non specifiees en eps  */ 
@@ -356,6 +360,9 @@
 	       PIPaperSize   paperSize,
 	       float marginX, float marginY)
+#if defined(__xlC)
+ :  mPSFileName (FileName == NULL ? "unnamed.ps" : (char *)(FileName)),
+#else
  :  mPSFileName (FileName == NULL ? "unnamed.ps" : const_cast<char *>(FileName)),
-
+#endif
     Tw(PaperSizeTable[paperSize].width),  /* Format papier utilise */
     Th(PaperSizeTable[paperSize].height), /*                       */
@@ -429,5 +436,5 @@
 
 
-char* PSFile::GetFileName() {
+const char* PSFile::GetFileName() {
 
     return(mPSFileName);
@@ -884,5 +891,5 @@
     fprintf(mPSFile, "%.2f Ux %.2f Uy m\n", x[0], y[0]);
 
-    char* cmd ; 
+    const char* cmd ; 
     if(cinc == true) cmd = "%.2f Ux %.2f Uy rl\n" ; 
     else             cmd = "%.2f Ux %.2f Uy l\n" ; 
@@ -905,5 +912,5 @@
     }
 
-    char* cmd ; 
+    const char* cmd ; 
     if(cinc == true) cmd = "%.2f Ux %.2f Uy rl\n" ; 
     else             cmd = "%.2f Ux %.2f Uy l\n" ; 
Index: /trunk/SophyaPI/PI/psfile.h
===================================================================
--- /trunk/SophyaPI/PI/psfile.h	(revision 162)
+++ /trunk/SophyaPI/PI/psfile.h	(revision 163)
@@ -31,4 +31,7 @@
 
 #include <list>
+#if defined(__KCC__)
+#include <list.h>
+#endif
 
 enum PIPaperSize { PI_A4 = 1, PI_A3 = 2, PI_A5 = 3, PI_NotDefPaperSize = 0};
@@ -81,5 +84,5 @@
 
     virtual int     IsEPS();
-    virtual char*   GetFileName();
+    virtual const char*   GetFileName();
 
 
@@ -147,5 +150,5 @@
 			PIColorMap *mColorMap);
 
-#ifndef __DECCXX
+#if !defined(__DECCXX) && !defined(__aCC__)
 private:
 #endif
@@ -175,5 +178,5 @@
     typedef list<Page> PageList;  /* STL */
 
-#ifdef __DECCXX
+#if defined(__DECCXX) || defined(__aCC__)
 private:
 #endif
@@ -181,5 +184,5 @@
     /* Fichier ps/eps */
     FILE *   mPSFile;
-    char *   mPSFileName;
+    const char *   mPSFileName;
     float    Tw,Th ;              /* Format, en cm */
     float    WMargin,HMargin ;    /* Marges minimales */
Index: /trunk/SophyaPI/PI/xdispim.c
===================================================================
--- /trunk/SophyaPI/PI/xdispim.c	(revision 163)
+++ /trunk/SophyaPI/PI/xdispim.c	(revision 163)
@@ -0,0 +1,383 @@
+#if 0
+/* Fonctions interface XWindow pour affichage d'images */
+/*                  Reza   05/95                       */
+
+/*                  LAL (Orsay) / IN2P3-CNRS           */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+
+#include "xdispim.h"
+
+/*  Variables globales pour  */
+
+static int RzXwDispImg = 0;
+static Display * display;
+static int screen;
+static GC defgc;
+static RzXCMap rzxcmap[5];
+static int rzxgcok = 0;
+static Font fonts[5];
+
+static int NbRzXw = 0;
+
+
+/*  Fin des variables globales   */
+
+
+/* Nouvelle-Fonction */
+int RzXInitDisplay(int prtl)
+
+/*   Connection avec un serveur X, et allocation des couleurs    */
+
+{
+Visual* vis;
+
+
+struct rzvisu_struc
+  {
+  int MMsize_x;
+  int MMsize_y;
+  int Pixsize_x;
+  int Pixsize_y;
+  float resol_x;
+  float resol_y;
+  } rzvisu;
+
+
+display = XOpenDisplay ("");
+
+if (display == 0)
+  { printf("RzXInitDisplay_Error: Cannot connect to X-Server \n");
+    return(1); }
+screen = XDefaultScreen(display);
+
+rzvisu.Pixsize_x = DisplayWidth  (display, screen);
+rzvisu.Pixsize_y = DisplayHeight (display, screen);
+rzvisu.MMsize_x = DisplayWidthMM  (display, screen);
+rzvisu.MMsize_y = DisplayHeightMM (display, screen);
+
+rzvisu.resol_x = (float)rzvisu.Pixsize_x*10./(float)rzvisu.MMsize_x;
+rzvisu.resol_y = (float)rzvisu.Pixsize_y*10./(float)rzvisu.MMsize_y;
+
+vis = DefaultVisual(display,screen);
+
+if (prtl > 0)
+  {
+  printf("RzXInitDisplay_Info: Screen size (X,Y) : %d * %d Pix (%d * %d  mm)\n",
+         rzvisu.Pixsize_x,rzvisu.Pixsize_y,
+         rzvisu.MMsize_x,rzvisu.MMsize_y);
+  printf ("... Planes= %d  Cells= %d  depth= %d ", XDisplayPlanes(display, screen) ,
+          XDisplayCells(display, screen), XDefaultDepth(display, screen));
+
+  switch (vis->class)
+    {
+    case PseudoColor :
+      printf (".... Class = %d (PseudoColor) \n",vis->class);
+      break;
+    case DirectColor : 
+      printf (".... Class = %d (DirectColor) \n",vis->class);
+      break;
+    case GrayScale :
+      printf (".... Class = %d (GreyScale) \n",vis->class);
+      break;
+    case StaticColor :
+      printf (".... Class = %d (StaticColor) \n",vis->class);
+      break;
+    case StaticGray :
+      printf (".... Class = %d (StaticGray) \n",vis->class);
+      break;
+    case TrueColor :   
+      printf (".... Class = %d (TrueColor) \n",vis->class);
+      break;
+    default :
+      printf (".... Class = %d (Unknown !) \n",vis->class);
+      break;
+    }
+
+  }
+
+/*  Allocating default CMap */
+RzXAllocCMap(rzxcmap, CMAP_GREY32, prtl);
+RzXAllocCMap(rzxcmap+1, CMAP_COL16, prtl);
+RzXAllocCMap(rzxcmap+2, CMAP_GREYINV32, prtl);
+RzXAllocCMap(rzxcmap+3, CMAP_COLRJ32, prtl);
+rzxcmap[4].typ = -1;  rzxcmap[4].nCol = 0;
+
+if (prtl > 1)
+  printf("...Loading fonts Adobe-Courier Normal/Bold/Ital : \n");
+fonts[0] = XLoadFont(display,
+       "-adobe-courier-medium-r-normal--*-140-*-iso8859-1");
+fonts[1] = XLoadFont(display,
+       "-adobe-courier-bold-r-normal--*-140-*-iso8859-1");
+fonts[2] = XLoadFont(display,
+       "-adobe-courier-medium-o-normal--*-140-*-iso8859-1");
+
+RzXwDispImg = 1;    /*  Variable de controle d'initialisation */
+
+return(0);
+}
+
+/* Nouvelle-Fonction */
+int RzXCheckInitDisp()
+{
+return (RzXwDispImg);
+}
+
+
+/* Nouvelle-Fonction */
+int RzXGetPixDSize()
+/*  Retourne la taille correspondant a depth en Byte ( 8->1) */
+{
+int depth;
+depth = DefaultDepth(display,screen);
+if (depth <= 8)  return(1);
+else if (depth <= 16)  return(2);
+else return(4);
+}
+
+/* Nouvelle-Fonction */
+int RzXDispPixMap(Window xw, unsigned char *pix,  int sizx, int sizy, RzXCMap *cmap)
+{
+int depth;
+XImage * ximg;
+int i,j;
+unsigned char *pp;
+
+depth = DefaultDepth(display,screen);
+ximg = XCreateImage (display,DefaultVisual(display,screen),
+       depth,ZPixmap,0,pix,sizx,sizy,8,0);
+pp = pix;
+for(j=0; j<sizy; j++)
+  for(i=0; i<sizx; i++) 
+    { XPutPixel(ximg, i, j, cmap->colpix[*pp]);  pp++; }
+XRaiseWindow(display, xw);
+XPutImage(display,xw,defgc,ximg,0,0,0,0,sizx, sizy);
+XSync(display,1);
+XFree(ximg);
+
+return(0);
+
+}
+
+
+/* Nouvelle-Fonction */
+RzXCMap * RzXGetCMap(int cmapid)
+{
+int i;
+for(i=0; i<5; i++)
+  if (rzxcmap[i].typ == cmapid)  return(rzxcmap+i);
+if (rzxcmap[4].typ >= 0)  RzXFreeCMap(rzxcmap+4);
+RzXAllocCMap(rzxcmap+4, cmapid, 0);
+return(rzxcmap+4);
+}
+
+
+/*  Definition d' une table de couleurs  R G B   */
+
+static float R_RGB1[16] =
+{0.0,0.00,0.0,0.0,0.0,0.00,0.0,0.6,0.8,1.0,1.00,1.0,0.75,1.0,0.85,1.0};
+static float G_RGB1[16] =
+{0.0,0.00,0.0,0.8,1.0,1.00,1.0,0.8,0.8,1.0,0.75,0.6,0.00,0.0,0.0,0.0};
+static float B_RGB1[16] =
+{0.0,0.75,1.0,1.0,1.0,0.75,0.0,0.0,0.0,0.0,0.00,0.5,0.75,1.0,0.0,0.0};
+
+
+
+/* Nouvelle-Fonction */
+int RzXAllocCMap(RzXCMap *rcmap, int cmapid, int prtl)
+/*  Allocation des tables de couleurs  */
+
+{
+Colormap cmap;
+XColor mycol;
+int nok,i;
+
+cmap = XDefaultColormap (display, screen);
+
+nok = 0;
+
+rcmap->typ = -1;
+
+switch (cmapid)
+  {
+  case CMAP_GREY32 :
+    rcmap->nCol = 32;   nok = 0;
+    for(i=0; i<rcmap->nCol; i++)
+      {
+      mycol.red = mycol.green = mycol.blue = 3535+(i*62000/32);
+      if (XAllocColor(display, cmap, &mycol) )
+        { rcmap->colpix[i] = mycol.pixel;   nok++; }
+      else rcmap->colpix[i] = BlackPixel(display, screen);  
+      }
+    rcmap->typ = CMAP_GREY32;
+    break;
+
+  case CMAP_GREYINV32 :
+    rcmap->nCol = 32;   nok = 0;
+    for(i=0; i<rcmap->nCol; i++)
+      {
+      mycol.red = mycol.green = mycol.blue = 65535-(i*62000/32);
+      if (XAllocColor(display, cmap, &mycol) )
+        { rcmap->colpix[i] = mycol.pixel;   nok++; }
+      else rcmap->colpix[i] = BlackPixel(display, screen);  
+      }
+    rcmap->typ = CMAP_GREYINV32;
+    break;
+
+  case CMAP_COL16 :
+    rcmap->nCol = 16;   nok = 0;
+    for(i=0; i<rcmap->nCol; i++)
+      {
+      mycol.red = (int)(R_RGB1[i]*65535.);
+      mycol.green = (int)(G_RGB1[i]*65535.);
+      mycol.blue =(int)(B_RGB1[i]*65535.) ;
+      if (XAllocColor(display, cmap, &mycol) )
+        { rcmap->colpix[i] = mycol.pixel;   nok++; }
+      else rcmap->colpix[i] = BlackPixel(display, screen);  
+      }
+    rcmap->typ = CMAP_COL16;
+    break;
+
+  case CMAP_COLRJ32 :
+    rcmap->nCol = 32;   nok = 0;
+    for(i=0; i<rcmap->nCol; i++)
+      {
+      if (i < 12) 
+        { mycol.green = mycol.blue = 0;  
+          mycol.red = 21535+(i*4000); }
+      else if (i < 24)
+        { mycol.blue = 0;   mycol.red = 65535;
+          mycol.green = 21535+(i-12)*4000;  }
+      else 
+        { mycol.green = mycol.red = 65535;
+          mycol.blue = 17535+(i-23)*6000; }
+
+      if (XAllocColor(display, cmap, &mycol) )
+        { rcmap->colpix[i] = mycol.pixel;   nok++; }
+      else rcmap->colpix[i] = BlackPixel(display, screen);  
+      }
+    rcmap->typ = CMAP_COLRJ32;
+    break;
+
+  case CMAP_COLBR32 :
+    rcmap->nCol = 32;   nok = 0;
+    for(i=0; i<rcmap->nCol; i++)
+      {
+      if (i < 5) 
+        { mycol.green = mycol.red = 0;  
+          mycol.blue = 5535+i*15000; }
+      else if (i < 10)
+        { mycol.blue = 65535;
+          mycol.green = 5535+(i-5)*9000;
+          mycol.red = 0;  }
+      else if (i < 15)
+        { mycol.blue = 60000-(i-10)*15000;
+          mycol.green = 41535+(i-10)*6000;
+          mycol.red = 0;  }
+      else if (i < 21)
+        { mycol.blue = 0;
+          mycol.green = 65535;
+          mycol.red = 5535+(i-15)*12000;  }
+      else if (i < 27)
+        { mycol.blue = 0;
+          mycol.green = 60000-(i-21)*12000;
+          mycol.red = 65535-(i-21)*2000;  }
+      else 
+        { mycol.blue = 0;
+          mycol.green = 0;
+          mycol.red = 57535+(i-27)*2000; }
+
+      if (XAllocColor(display, cmap, &mycol) )
+        { rcmap->colpix[i] = mycol.pixel;   nok++; }
+      else rcmap->colpix[i] = BlackPixel(display, screen);  
+      }
+    rcmap->typ = CMAP_COLBR32;
+    break;
+
+  case CMAP_COLRV32 :
+    rcmap->nCol = 32;   nok = 0;
+    for(i=0; i<rcmap->nCol; i++)
+      {
+      if (i < 8) 
+        { mycol.green = 15000+(i*5000); mycol.blue = 0;  
+          mycol.red = 15000+(i*5000); }
+      else if (i < 21)
+        { mycol.green = 50000-(i-7)*5000;   
+          if (mycol.green < 0)  mycol.green = 0;
+          mycol.blue = 0;
+          mycol.red = 53535+(i-8)*1000;  }
+      else 
+        { mycol.green = 0;  mycol.red = 65535;
+          mycol.blue = 15535+(i-21)*5000; }
+
+      if (XAllocColor(display, cmap, &mycol) )
+        { rcmap->colpix[i] = mycol.pixel;   nok++; }
+      else rcmap->colpix[i] = BlackPixel(display, screen);  
+      }
+    rcmap->typ = CMAP_COLRV32;
+    break;
+
+  default :
+    printf("RzXAllocCMap_Info: Erreur specification CMapType (%d) \n", cmapid);
+    break;
+  }
+
+for(i=rcmap->nCol; i<256; i++)  rcmap->colpix[i] = 0;
+
+if (prtl)
+  printf("RzXAllocCMap_Info: %d colors allocated for CMap Type %d \n", nok, cmapid);
+
+return(0);
+
+}
+
+/* Nouvelle-Fonction */
+int RzXFreeCMap(RzXCMap *rcmap)
+{
+Colormap cmap;
+int i;
+
+cmap = XDefaultColormap (display, screen);
+XFreeColors(display, cmap, rcmap->colpix,  rcmap->nCol, 0);
+for(i=0; i<rcmap->nCol; i++)  rcmap->colpix[i] = 0;
+rcmap->nCol = 0;
+return(0);
+}
+
+
+/* Nouvelle-Fonction */
+Window RzXNewWin(int sx, int sy, char *title, int posx, int posy)
+
+/*  Creation de fenetre X simple pour mettre une image  */
+{
+XSizeHints hint;
+Window   win;
+
+hint.x = posx;   hint.y = posy;
+hint.width  = sx;  hint.height = sy;
+hint.flags  = PPosition | PSize;
+
+
+win =  XCreateSimpleWindow (display, DefaultRootWindow (display),
+       hint.x, hint.y, hint.width, hint.height, 3,
+       WhitePixel(display, screen), BlackPixel(display, screen) );                        
+
+XSetStandardProperties (display, win, title, title, None, NULL, 0, &hint);
+
+if (!rzxgcok)
+  {
+  defgc = XCreateGC (display, win, 0, 0);
+  rzxgcok = 1;
+  }
+XMapRaised(display,win);
+XSync(display,1);
+
+return(win);
+}
+#endif
+
Index: /trunk/SophyaPI/PI/xdispim.h
===================================================================
--- /trunk/SophyaPI/PI/xdispim.h	(revision 163)
+++ /trunk/SophyaPI/PI/xdispim.h	(revision 163)
@@ -0,0 +1,36 @@
+/* Fonctions interface XWindow pour affichage d'images */
+
+#ifndef XDISPIM_SEEN
+#define XDISPIM_SEEN
+
+
+#include <X11/Xlib.h>
+
+#define CMAP_GREY32         0
+#define CMAP_COL16          1
+#define CMAP_COLRJ32        2
+#define CMAP_GREYINV32      3
+#define CMAP_COLBR32        4
+#define CMAP_COLRV32        5
+
+struct _RzXCMap_
+  {
+  int typ;
+  int nCol;
+  unsigned long colpix[256];
+  };
+typedef struct _RzXCMap_  RzXCMap;
+
+int RzXInitDisplay(int prtl);
+int RzXCheckInitDisp(void);
+
+int RzXGetPixDSize(void);
+int RzXDispPixMap(Window xw, unsigned char *pix,  int sizx, int sizy, RzXCMap *cmap);
+
+RzXCMap * RzXGetCMap(int cmpaid);
+int RzXAllocCMap(RzXCMap *rcmap, int cmapid, int prtl);
+int RzXFreeCMap(RzXCMap *rcmap);
+
+Window RzXNewWin(int sx, int sy, char *title, int posx, int posy);
+
+#endif
