aboutsummaryrefslogtreecommitdiff
path: root/src/graph/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph/include')
-rwxr-xr-xsrc/graph/include/G.h102
-rwxr-xr-xsrc/graph/include/Gfun.H179
-rwxr-xr-xsrc/graph/include/XDefs.h98
-rwxr-xr-xsrc/graph/include/actions.h156
-rwxr-xr-xsrc/graph/include/all_2d.H111
-rwxr-xr-xsrc/graph/include/all_3d.H125
-rwxr-xr-xsrc/graph/include/all_alone.H13
-rwxr-xr-xsrc/graph/include/bitmaps/hand.bitmap8
-rwxr-xr-xsrc/graph/include/bitmaps/light11.bitmap8
-rwxr-xr-xsrc/graph/include/bitmaps/light11.mask8
-rwxr-xr-xsrc/graph/include/bitmaps/mouse11.bitmap8
-rwxr-xr-xsrc/graph/include/bitmaps/mouse11.mask6
-rwxr-xr-xsrc/graph/include/bitmaps/spad11.bitmap9
-rwxr-xr-xsrc/graph/include/bitmaps/spad11.mask11
-rwxr-xr-xsrc/graph/include/bitmaps/volume.bitmap8
-rwxr-xr-xsrc/graph/include/bitmaps/volume.mask8
-rwxr-xr-xsrc/graph/include/bitmaps/volume2.bitmap8
-rwxr-xr-xsrc/graph/include/bitmaps/volume2.mask8
-rwxr-xr-xsrc/graph/include/buttons2d.H15
-rwxr-xr-xsrc/graph/include/buttons3d.H15
-rwxr-xr-xsrc/graph/include/cleanup.H113
-rwxr-xr-xsrc/graph/include/closeView3d.H15
-rwxr-xr-xsrc/graph/include/colors.h84
-rwxr-xr-xsrc/graph/include/component.h88
-rwxr-xr-xsrc/graph/include/component3d.H117
-rwxr-xr-xsrc/graph/include/control2d.H119
-rwxr-xr-xsrc/graph/include/control3d.H119
-rwxr-xr-xsrc/graph/include/fun2D.H19
-rwxr-xr-xsrc/graph/include/fun3D.H17
-rwxr-xr-xsrc/graph/include/graph2d.H17
-rwxr-xr-xsrc/graph/include/illuminate3d.H113
-rwxr-xr-xsrc/graph/include/light11.bitmap8
-rwxr-xr-xsrc/graph/include/light11.mask8
-rwxr-xr-xsrc/graph/include/lightbut3d.H15
-rwxr-xr-xsrc/graph/include/lighting3d.H111
-rwxr-xr-xsrc/graph/include/main2d.H17
-rwxr-xr-xsrc/graph/include/main3d.H17
-rwxr-xr-xsrc/graph/include/make2D.H15
-rwxr-xr-xsrc/graph/include/make3D.H15
-rwxr-xr-xsrc/graph/include/makeGraph.H17
-rwxr-xr-xsrc/graph/include/mesh3d.H19
-rwxr-xr-xsrc/graph/include/mode.h36
-rwxr-xr-xsrc/graph/include/mouse11.bitmap8
-rwxr-xr-xsrc/graph/include/mouse11.mask6
-rwxr-xr-xsrc/graph/include/msort3d.H17
-rwxr-xr-xsrc/graph/include/noX10.h87
-rwxr-xr-xsrc/graph/include/override.h44
-rwxr-xr-xsrc/graph/include/pot2d.H15
-rwxr-xr-xsrc/graph/include/pot3d.H17
-rwxr-xr-xsrc/graph/include/process2d.H121
-rwxr-xr-xsrc/graph/include/process3d.H17
-rwxr-xr-xsrc/graph/include/project3d.H115
-rwxr-xr-xsrc/graph/include/purty/hand.bitmap8
-rwxr-xr-xsrc/graph/include/purty/light11.bitmap8
-rwxr-xr-xsrc/graph/include/purty/light11.mask8
-rwxr-xr-xsrc/graph/include/purty/mouse11.bitmap8
-rwxr-xr-xsrc/graph/include/purty/mouse11.mask6
-rwxr-xr-xsrc/graph/include/purty/slicer.bitmap86
-rwxr-xr-xsrc/graph/include/purty/spadBitmap.bitmap14
-rwxr-xr-xsrc/graph/include/purty/spadMask.mask14
-rwxr-xr-xsrc/graph/include/purty/volume.bitmap8
-rwxr-xr-xsrc/graph/include/purty/volume.mask8
-rwxr-xr-xsrc/graph/include/purty/volume.mask.B8
-rwxr-xr-xsrc/graph/include/purty/volume2.bitmap8
-rwxr-xr-xsrc/graph/include/purty/volume2.mask8
-rwxr-xr-xsrc/graph/include/quit3d.H17
-rwxr-xr-xsrc/graph/include/quitbut3d.H15
-rwxr-xr-xsrc/graph/include/readView.H15
-rwxr-xr-xsrc/graph/include/save3d.H17
-rwxr-xr-xsrc/graph/include/savebut3d.H15
-rwxr-xr-xsrc/graph/include/smoothShade3d.H137
-rwxr-xr-xsrc/graph/include/spadAction2d.H17
-rwxr-xr-xsrc/graph/include/spadAction3d.H19
-rwxr-xr-xsrc/graph/include/spadBitmap.bitmap14
-rwxr-xr-xsrc/graph/include/spadMask.mask14
-rwxr-xr-xsrc/graph/include/spoon2D.H19
-rwxr-xr-xsrc/graph/include/spoonComp.H17
-rwxr-xr-xsrc/graph/include/sselect.H15
-rwxr-xr-xsrc/graph/include/stuff2d.H17
-rwxr-xr-xsrc/graph/include/stuff3d.H113
-rwxr-xr-xsrc/graph/include/surface3d.H133
-rwxr-xr-xsrc/graph/include/transform3d.H115
-rwxr-xr-xsrc/graph/include/tube.h113
-rwxr-xr-xsrc/graph/include/view.h90
-rwxr-xr-xsrc/graph/include/view2D.h100
-rwxr-xr-xsrc/graph/include/view3D.h98
-rwxr-xr-xsrc/graph/include/viewAlone.H15
-rwxr-xr-xsrc/graph/include/viewCommand.h36
-rwxr-xr-xsrc/graph/include/viewport2D.H111
-rwxr-xr-xsrc/graph/include/viewport3d.H115
-rwxr-xr-xsrc/graph/include/volume3d.H123
-rwxr-xr-xsrc/graph/include/write.h42
-rwxr-xr-xsrc/graph/include/write2d.H15
-rwxr-xr-xsrc/graph/include/write3d.H15
94 files changed, 2104 insertions, 0 deletions
diff --git a/src/graph/include/G.h b/src/graph/include/G.h
new file mode 100755
index 00000000..726ac68a
--- /dev/null
+++ b/src/graph/include/G.h
@@ -0,0 +1,102 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _G_H_
+#define _G_H_ 1
+
+
+
+
+#define Xoption 0 /* Gdraw routine option */
+#define PSoption 1 /* Gdraw routine option */
+
+#define psError -1 /* error return status */
+
+/* Black and white definitions of PS */
+
+#define psBlack 0.0 /* def for black in PS */
+#define psWhite 1.0 /* def for white in PS */
+
+/* Foreground and background definition */
+
+#define psForeground psBlack /* foreground color: black */
+#define psBackground psWhite /* background color: white */
+
+/* Gray scale defintions -- same as that in src/XShade.h for XShadeMax */
+
+#define psShadeMax 17.0 /* same as XShadeMax */
+#define psShadeMul (1.0/(psShadeMax-1.0)) /* white and 16 gray shades */
+
+#define psNormalWidth 1 /* def for line width */
+
+/* These are all the line join styles available in PS */
+
+#define psMiterJoin 0
+#define psRoundJoin 1
+#define psBevelJoin 2
+
+/* These are all the line cap styles available in PS */
+
+#define psButtCap 0
+#define psRoundCap 1
+#define psPSqCap 2
+
+
+
+/*
+ * Structures
+ */
+
+/*
+ * This is used to keep track of GC name in character and in unsigned long
+ */
+
+typedef struct _GCstruct {
+ GC GCint;
+ char GCchar[10];
+ struct _GCstruct *next;
+} GCstruct, *GCptr;
+
+
+/*
+ * These global variables are expected to be declared somewehere in the
+ * client application source, eg, in main.c for view2D and view3D.
+ */
+
+extern char *PSfilename; /* User-definable output file name. */
+
+extern int psInit; /* Flag for one-time PS initialization routine. */
+
+extern GCptr GChead; /* Points to the head of GCstruct linked list. */
+
+#endif
diff --git a/src/graph/include/Gfun.H1 b/src/graph/include/Gfun.H1
new file mode 100755
index 00000000..9c612fc4
--- /dev/null
+++ b/src/graph/include/Gfun.H1
@@ -0,0 +1,79 @@
+#ifdef _NO_PROTO
+extern int PSCreateFile();
+extern int Gdraws_drawFrame();
+extern int Gdraws_setDimension();
+extern int GDrawImageString();
+extern int GDrawArc();
+extern int GDrawLine();
+extern int GDrawLines();
+extern int GDrawPoint();
+extern int GDrawString();
+extern int GFillArc();
+extern int PSGlobalInit();
+extern int PSInit();
+extern int PSCreateContext();
+extern char * PSfindGC();
+extern int GSetForeground();
+extern int GSetBackground();
+extern int GSetLineAttributes();
+extern int PSClose();
+extern int centerX();
+extern int centerY();
+extern int PSColorPolygon();
+extern int PSColorwOutline();
+extern int PSDrawColor();
+extern int PSFillPolygon();
+extern int PSFillwOutline();
+extern HashTable * XCreateAssocTable();
+extern void XMakeAssoc();
+extern int * XLookUpAssoc();
+extern void XDeleteAssoc();
+extern int GDrawRectangle();
+extern int GDraw3DButtonOut();
+extern int GDraw3DButtonIn();
+extern int GDrawPushButton();
+#ifdef _GFUN_C
+static void filecopy();
+static int TrivEqual();
+static int TrivHash_code();
+#endif
+#else
+extern int PSCreateFile(int , Window , Window , char * );
+extern int Gdraws_drawFrame(int , Window , Window , char * );
+extern int Gdraws_setDimension(Window , Window );
+extern int GDrawImageString(GC , Window , int , int , char * , int , int );
+extern int GDrawArc(GC , Window , int , int , unsigned int , unsigned int , int , int , int );
+extern int GDrawLine(GC , Window , int , int , int , int , int );
+extern int GDrawLines(GC , Window , XPoint * , int , int , int );
+extern int GDrawPoint(Window , GC , int , int , int );
+extern int GDrawString(GC , Window , int , int , char * , int , int );
+extern int GFillArc(GC , Window , int , int , unsigned int , unsigned int , int , int , int );
+extern int PSGlobalInit(void );
+extern int PSInit(Window , Window );
+extern int PSCreateContext(GC , char * , int , int , int , float , float );
+extern char * PSfindGC(GC );
+extern int GSetForeground(GC , float , int );
+extern int GSetBackground(GC , float , int );
+extern int GSetLineAttributes(GC , int , int , int , int , int );
+extern int PSClose(void );
+extern int centerX(GC , char * , int , int );
+extern int centerY(GC , int );
+extern int PSColorPolygon(float , float , float , XPoint * , int );
+extern int PSColorwOutline(float , float , float , XPoint * , int );
+extern int PSDrawColor(float , float , float , XPoint * , int );
+extern int PSFillPolygon(GC , XPoint * , int );
+extern int PSFillwOutline(GC , XPoint * , int );
+extern HashTable * XCreateAssocTable(int );
+extern void XMakeAssoc(Display * , HashTable * , Window , int * );
+extern int * XLookUpAssoc(Display * , HashTable * , Window );
+extern void XDeleteAssoc(Display * , HashTable * , Window );
+extern int GDrawRectangle(GC , Window , short , short , short , short , int );
+extern int GDraw3DButtonOut(GC , Window , short , short , short , short , int );
+extern int GDraw3DButtonIn(GC , Window , short , short , short , short , int );
+extern int GDrawPushButton(Display * , GC , GC , GC , Window , short , short , short , short , int , char * , unsigned long , unsigned long , int );
+#ifdef _GFUN_C
+static void filecopy(FILE * , FILE * );
+static int TrivEqual(Window , Window );
+static int TrivHash_code(Window , int );
+#endif
+#endif
diff --git a/src/graph/include/XDefs.h b/src/graph/include/XDefs.h
new file mode 100755
index 00000000..03e46da2
--- /dev/null
+++ b/src/graph/include/XDefs.h
@@ -0,0 +1,98 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef view3D
+
+/*** default fonts ***/
+#ifdef RTplatform
+#define messageFontDefault "Rom14.500"
+#define buttonFontDefault "vtbold"
+#define headerFontDefault "Itl14.500"
+#define titleFontDefault "Rom14.500"
+#define lightingFontDefault "6x10"
+#define volumeFontDefault "Rom8.500"
+#endif
+
+#if defined(PS2platform) || defined(RIOSplatform) || defined(AIX370platform)
+#define messageFontDefault "Rom14"
+#define buttonFontDefault "Rom11"
+#define headerFontDefault "Itl14"
+#define titleFontDefault "Rom14"
+#define lightingFontDefault "Rom10"
+#define volumeFontDefault "Rom8"
+#else
+#define messageFontDefault "9x15"
+#define buttonFontDefault "8x13"
+#define headerFontDefault "9x15"
+#define titleFontDefault "9x15"
+#define lightingFontDefault "6x13"
+#define volumeFontDefault "6x10"
+#endif
+
+
+#endif
+
+/************************/
+/*** view2D ***/
+/************************/
+#ifdef view2D
+
+/*** default fonts ***/
+#ifdef RTplatform
+#define messageFontDefault "Rom14.500"
+#define buttonFontDefault "vtbold"
+#define headerFontDefault "Itl14.500"
+#define titleFontDefault "Rom14.500"
+#define graphFontDefault "fg-22"
+#define unitFontDefault "6x10"
+#endif
+
+#if defined(PS2platform) || defined(RIOSplatform) || defined(AIX370platform)
+#define messageFontDefault "Rom14"
+#define buttonFontDefault "Rom11"
+#define headerFontDefault "Itl14"
+#define titleFontDefault "Rom14"
+#define graphFontDefault "Rom22"
+#define unitFontDefault "6x10"
+#else
+#define messageFontDefault "9x15"
+#define buttonFontDefault "8x13"
+#define headerFontDefault "9x15"
+#define titleFontDefault "9x15"
+#define unitFontDefault "6x10"
+#define graphFontDefault "9x15"
+#endif
+
+
+#endif
+
diff --git a/src/graph/include/actions.h b/src/graph/include/actions.h
new file mode 100755
index 00000000..118bda71
--- /dev/null
+++ b/src/graph/include/actions.h
@@ -0,0 +1,156 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define makeAViewport -1
+
+
+/* Viewport Types */
+#define view3DType 1
+#define viewGraphType 2
+#define view2DType 3
+#define viewTubeType 4
+
+/* 2D Viewport */
+
+#define translate2D 0
+#define scale2D 1
+#define pointsOnOff 2
+#define connectOnOff 3
+#define spline2D 4
+#define reset2D 5
+#define hideControl2D 6
+#define closeAll2D 7
+#define axesOnOff2D 8
+#define unitsOnOff2D 9
+#define pick2D 10
+#define drop2D 11
+#define clear2D 12
+#define ps2D 13
+#define graph1 14
+#define graph2 15
+#define graph3 16
+#define graph4 17
+#define graph5 18
+#define graph6 19
+#define graph7 20
+#define graph8 21
+#define graph9 22
+#define graphSelect1 23
+#define graphSelect2 24
+#define graphSelect3 25
+#define graphSelect4 26
+#define graphSelect5 27
+#define graphSelect6 28
+#define graphSelect7 29
+#define graphSelect8 30
+#define graphSelect9 31
+#define query2D 32
+#define zoom2Dx 33
+#define zoom2Dy 34
+#define translate2Dx 35
+#define translate2Dy 36
+
+#define maxButtons2D 37
+
+#define graphStart 14 /* the index of graph1 */
+#define graphSelectStart (graphStart+maxGraphs)
+
+/* 3D Viewport */
+
+#define controlButtonsStart3D 0
+
+#define rotate 0
+#define zoom 1
+#define translate 2
+#define render 3
+#define hideControl 4
+#define closeAll 5
+#define axesOnOff 6
+#define opaqueMesh 7
+#define resetView 8
+#define transparent 9
+
+#define lighting 10
+#define viewVolume 11
+#define region3D 12
+#define outlineOnOff 13
+
+#define zoomx 14
+#define zoomy 15
+#define zoomz 16
+#define originr 17
+#define objectr 18
+#define xy 19
+#define xz 20
+#define yz 21
+#define smooth 22
+#define saveit 23
+#define bwColor 24
+
+#define maxControlButtons3D 25
+#define controlButtonsEnd3D (controlButtonsStart3D + maxControlButtons3D)
+
+#define graphStart3D 25 /* the index of g1 */
+#define graphSelectStart3D (graphStart3D+maxGraphs)
+
+/* these should be maxControlButtons3D+1.. (be sure to modify view3D.spad) */
+#define diagOnOff (maxControlButtons3D+1)
+#define perspectiveOnOff (maxControlButtons3D+2)
+#define clipRegionOnOff 66
+#define clipSurfaceOnOff 67
+
+#define query 11
+
+
+/* misc */
+
+#define spadPressedAButton 100 /* used for communications with the .AXIOM file */
+#define colorDef 101
+#define moveViewport 102
+#define resizeViewport 103
+#define changeTitle 104
+#define showing2D 105
+#define putGraph 106 /* for 2D */
+#define getGraph 107 /* for 2D */
+#define lightDef 108 /* for 3D */
+#define translucenceDef 109 /* for 3D */
+#define writeView 110 /* for both */
+#define eyeDistanceData 111 /* for 3D */
+#define axesColor2D 112 /* for 2D */
+#define unitsColor2D 113 /* for 2D */
+#define modifyPOINT 114 /* for 3D */
+#define hitherPlaneData 116 /* for 3D */
+
+
+
+
diff --git a/src/graph/include/all_2d.H1 b/src/graph/include/all_2d.H1
new file mode 100755
index 00000000..f2404a89
--- /dev/null
+++ b/src/graph/include/all_2d.H1
@@ -0,0 +1,11 @@
+/* declarations in view2D */
+#include "buttons2d.H1"
+#include "control2d.H1"
+#include "graph2d.H1"
+#include "main2d.H1"
+#include "pot2d.H1"
+#include "process2d.H1"
+#include "spadAction2d.H1"
+#include "stuff2d.H1"
+#include "viewport2D.H1"
+#include "write2d.H1"
diff --git a/src/graph/include/all_3d.H1 b/src/graph/include/all_3d.H1
new file mode 100755
index 00000000..d41ba4d7
--- /dev/null
+++ b/src/graph/include/all_3d.H1
@@ -0,0 +1,25 @@
+#include "stuff3d.H1"
+#include "buttons3d.H1"
+#include "write3d.H1"
+#include "volume3d.H1"
+#include "control3d.H1"
+#include "transform3d.H1"
+#include "closeView3d.H1"
+#include "illuminate3d.H1"
+#include "msort3d.H1"
+#include "surface3d.H1"
+#include "mesh3d.H1"
+#include "project3d.H1"
+#include "lighting3d.H1"
+#include "lightbut3d.H1"
+#include "spadAction3d.H1"
+#include "viewport3d.H1"
+#include "pot3d.H1"
+#include "process3d.H1"
+#include "quitbut3d.H1"
+#include "quit3d.H1"
+#include "component3d.H1"
+#include "smoothShade3d.H1"
+#include "savebut3d.H1"
+#include "save3d.H1"
+#include "main3d.H1"
diff --git a/src/graph/include/all_alone.H1 b/src/graph/include/all_alone.H1
new file mode 100755
index 00000000..c5415126
--- /dev/null
+++ b/src/graph/include/all_alone.H1
@@ -0,0 +1,3 @@
+#include "spoon2D.H1"
+#include "spoonComp.H1"
+#include "viewAlone.H1"
diff --git a/src/graph/include/bitmaps/hand.bitmap b/src/graph/include/bitmaps/hand.bitmap
new file mode 100755
index 00000000..aa504daa
--- /dev/null
+++ b/src/graph/include/bitmaps/hand.bitmap
@@ -0,0 +1,8 @@
+#define hand_width 16
+#define hand_height 16
+#define hand_x_hot 5
+#define hand_y_hot 1
+static char hand_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0x90, 0x00, 0x10, 0x01, 0x10, 0x07, 0x10, 0x09,
+ 0x0c, 0x39, 0x1a, 0x51, 0x32, 0x50, 0x22, 0x40, 0x22, 0x40, 0x04, 0x60,
+ 0x04, 0x30, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/bitmaps/light11.bitmap b/src/graph/include/bitmaps/light11.bitmap
new file mode 100755
index 00000000..d79dd52c
--- /dev/null
+++ b/src/graph/include/bitmaps/light11.bitmap
@@ -0,0 +1,8 @@
+#define lightBitmap_width 16
+#define lightBitmap_height 16
+#define lightBitmap_x_hot 8
+#define lightBitmap_y_hot 0
+static char lightBitmap_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x40, 0xc8, 0x27, 0x20, 0x08,
+ 0x10, 0x10, 0x16, 0x10, 0x10, 0xd0, 0x10, 0x10, 0x24, 0x08, 0x42, 0x44,
+ 0x40, 0x84, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01};
diff --git a/src/graph/include/bitmaps/light11.mask b/src/graph/include/bitmaps/light11.mask
new file mode 100755
index 00000000..4fffa962
--- /dev/null
+++ b/src/graph/include/bitmaps/light11.mask
@@ -0,0 +1,8 @@
+#define lightMask_width 16
+#define lightMask_height 16
+#define lightMask_x_hot 8
+#define lightMask_y_hot 0
+static char lightMask_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x40, 0xc8, 0x27, 0x20, 0x08,
+ 0x10, 0x11, 0x96, 0x12, 0x90, 0xd2, 0x90, 0x10, 0x24, 0x09, 0x42, 0x45,
+ 0x40, 0x85, 0x80, 0x03, 0x80, 0x02, 0x00, 0x01};
diff --git a/src/graph/include/bitmaps/mouse11.bitmap b/src/graph/include/bitmaps/mouse11.bitmap
new file mode 100755
index 00000000..231c6630
--- /dev/null
+++ b/src/graph/include/bitmaps/mouse11.bitmap
@@ -0,0 +1,8 @@
+#define mouseBitmap_width 16
+#define mouseBitmap_height 16
+#define mouseBitmap_x_hot 8
+#define mouseBitmap_y_hot 0
+static char mouseBitmap_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x02, 0x40, 0x04, 0xc0, 0x06, 0x20, 0x08,
+ 0x20, 0x08, 0x30, 0x18, 0x50, 0x14, 0x58, 0x34, 0x90, 0x12, 0x20, 0x08,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/bitmaps/mouse11.mask b/src/graph/include/bitmaps/mouse11.mask
new file mode 100755
index 00000000..6e5621f4
--- /dev/null
+++ b/src/graph/include/bitmaps/mouse11.mask
@@ -0,0 +1,6 @@
+#define mouseMask_width 16
+#define mouseMask_height 16
+static char mouseMask_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0xe0, 0x0f,
+ 0xe0, 0x0f, 0xf0, 0x1f, 0xf0, 0x1f, 0xf8, 0x3f, 0xf0, 0x1f, 0xe0, 0x0f,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/bitmaps/spad11.bitmap b/src/graph/include/bitmaps/spad11.bitmap
new file mode 100755
index 00000000..0be6b15d
--- /dev/null
+++ b/src/graph/include/bitmaps/spad11.bitmap
@@ -0,0 +1,9 @@
+#define spadBitmap_width 30
+#define spadBitmap_height 16
+static char spadBitmap_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x20, 0x00, 0x00,
+ 0x12, 0x70, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0xa8, 0x39, 0xb7, 0x1d, 0x24, 0xa6, 0x59, 0x12,
+ 0x34, 0xa6, 0x4e, 0x12, 0x2c, 0xa6, 0x48, 0x12, 0x46, 0xa5, 0x48, 0x12,
+ 0x42, 0xa9, 0x48, 0x12, 0xc1, 0x58, 0x67, 0x36, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/bitmaps/spad11.mask b/src/graph/include/bitmaps/spad11.mask
new file mode 100755
index 00000000..05329be6
--- /dev/null
+++ b/src/graph/include/bitmaps/spad11.mask
@@ -0,0 +1,11 @@
+#define spad11_width 30
+#define spad11_height 16
+#define spad11_x_hot -1
+#define spad11_y_hot -1
+static char spad11_bits[] = {
+ 0x00, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x39, 0xb6, 0x1d,
+ 0x32, 0x26, 0x49, 0x12, 0x21, 0xa6, 0x50, 0x12, 0x21, 0xa6, 0x50, 0x12,
+ 0x61, 0xa5, 0x50, 0x12, 0x51, 0x29, 0x49, 0x12, 0xde, 0x58, 0x6e, 0x36,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,
+ 0x00, 0x20, 0x00, 0x00};
diff --git a/src/graph/include/bitmaps/volume.bitmap b/src/graph/include/bitmaps/volume.bitmap
new file mode 100755
index 00000000..c5b65e29
--- /dev/null
+++ b/src/graph/include/bitmaps/volume.bitmap
@@ -0,0 +1,8 @@
+#define volumeBitmap_width 16
+#define volumeBitmap_height 16
+#define volumeBitmap_x_hot 5
+#define volumeBitmap_y_hot 1
+static char volumeBitmap_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0x90, 0x00, 0x10, 0x01, 0x10, 0x07, 0x10, 0x09,
+ 0x0c, 0x39, 0x1a, 0x51, 0x32, 0x50, 0x22, 0x40, 0x22, 0x40, 0x04, 0x60,
+ 0x04, 0x30, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/bitmaps/volume.mask b/src/graph/include/bitmaps/volume.mask
new file mode 100755
index 00000000..98e377dc
--- /dev/null
+++ b/src/graph/include/bitmaps/volume.mask
@@ -0,0 +1,8 @@
+#define volumeMask_width 16
+#define volumeMask_height 16
+#define volumeMask_x_hot 5
+#define volumeMask_y_hot 1
+static char volumeMask_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xf0, 0x07, 0xf0, 0x0f,
+ 0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x7f,
+ 0xfc, 0x3f, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/bitmaps/volume2.bitmap b/src/graph/include/bitmaps/volume2.bitmap
new file mode 100755
index 00000000..36705a4d
--- /dev/null
+++ b/src/graph/include/bitmaps/volume2.bitmap
@@ -0,0 +1,8 @@
+#define volumeBitmap_width 16
+#define volumeBitmap_height 16
+#define volumeBitmap_x_hot 8
+#define volumeBitmap_y_hot 0
+static char volumeBitmap_bits[] = {
+ 0x00, 0x01, 0xc0, 0x03, 0x30, 0x0e, 0x0c, 0x18, 0x64, 0x36, 0x44, 0x62,
+ 0x14, 0x48, 0x74, 0x4e, 0xcc, 0x43, 0x18, 0x70, 0x30, 0x1c, 0xe0, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/bitmaps/volume2.mask b/src/graph/include/bitmaps/volume2.mask
new file mode 100755
index 00000000..f8cddbe0
--- /dev/null
+++ b/src/graph/include/bitmaps/volume2.mask
@@ -0,0 +1,8 @@
+#define volumeMask_width 16
+#define volumeMask_height 16
+#define volumeMask_x_hot 8
+#define volumeMask_y_hot 0
+static char volumeMask_bits[] = {
+ 0x00, 0x01, 0xc0, 0x03, 0x30, 0x0e, 0x0c, 0x18, 0x64, 0x36, 0x44, 0x62,
+ 0x14, 0x48, 0x74, 0x4e, 0xcc, 0x43, 0x18, 0x70, 0x30, 0x1c, 0xe0, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/buttons2d.H1 b/src/graph/include/buttons2d.H1
new file mode 100755
index 00000000..12e64992
--- /dev/null
+++ b/src/graph/include/buttons2d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int initButtons();
+#else
+extern int initButtons(buttonStruct * );
+#endif
diff --git a/src/graph/include/buttons3d.H1 b/src/graph/include/buttons3d.H1
new file mode 100755
index 00000000..12e64992
--- /dev/null
+++ b/src/graph/include/buttons3d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int initButtons();
+#else
+extern int initButtons(buttonStruct * );
+#endif
diff --git a/src/graph/include/cleanup.H1 b/src/graph/include/cleanup.H1
new file mode 100755
index 00000000..bd78e7a4
--- /dev/null
+++ b/src/graph/include/cleanup.H1
@@ -0,0 +1,13 @@
+#ifdef _NO_PROTO
+extern void brokenPipe();
+extern void endChild();
+extern void rmViewMgr();
+extern void closeChildViewport();
+extern void goodbye();
+#else
+extern void brokenPipe(int sig);
+extern void endChild(int sig);
+extern void rmViewMgr(viewManager * slotPtr);
+extern void closeChildViewport(viewManager * slotPtr);
+extern void goodbye(int sig);
+#endif
diff --git a/src/graph/include/closeView3d.H1 b/src/graph/include/closeView3d.H1
new file mode 100755
index 00000000..7f90c596
--- /dev/null
+++ b/src/graph/include/closeView3d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern void closeViewport();
+#else
+extern void closeViewport(void);
+#endif
diff --git a/src/graph/include/colors.h b/src/graph/include/colors.h
new file mode 100755
index 00000000..d2d659cc
--- /dev/null
+++ b/src/graph/include/colors.h
@@ -0,0 +1,84 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+/*
+ colors.h
+ created on 25 November 1992, Jim Wen
+ (same as the browser/src/color.h file - maybe should share?)
+ */
+
+/* The Hues */
+#define red0 0
+#define red1 1
+#define red2 2
+#define orange0 3
+#define orange1 4
+#define orange2 5
+#define tan0 6
+#define tan1 7
+#define tan2 8
+#define yellow0 9
+#define yellow1 10
+#define yellow2 11
+#define green0 12
+#define green1 13
+#define green2 14
+#define cyan0 15
+#define cyan1 16
+#define cyan2 17
+#define blue0 18
+#define blue1 19
+#define blue2 20
+#define indigo0 21
+#define indigo1 22
+#define indigo2 23
+#define violet0 24
+#define violet1 25
+#define violet2 26
+
+/*
+ The Shades
+ */
+#define dark 0
+#define dim 1
+#define normal 2
+#define bright 3
+#define pastel 3
+#define light 4
+
+/*
+ The macros
+ */
+#define moColor(h,s) ((mono)?foregroundColor:XSolidColor(h,s))
+#define moColor_BG(h,s) ((mono)?backgroundColor:XSolidColor(h,s))
diff --git a/src/graph/include/component.h b/src/graph/include/component.h
new file mode 100755
index 00000000..6d4f1324
--- /dev/null
+++ b/src/graph/include/component.h
@@ -0,0 +1,88 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+/*
+ Copyright The Numerical Algorithms Group Limited 1991.
+ */
+
+/*
+ This file contains the definitions for the generalized point
+ structures in 3D.
+ */
+
+#include "tube.h"
+
+/* viewman's and viewAlone's refPt */
+#define refPt(v,x) ((v).points + (x))
+/* view3D's refPt - allows reference into new, dynamically generated points
+ a function called traverse(n) is expected - it returns the nth point in
+ the resevoir. note that x should be zero based (if numOfPoints is 10,
+ then x=10 would access the first point on the resevoir list).
+ */
+#define refPt3D(v,x) ( (x)>(v).numOfPoints?traverse(resMax - ((x)-((v).numOfPoints-1))):(v).points + (x) )
+
+typedef struct _componentProp {
+ int closed,
+ solid;
+} componentProp;
+
+typedef struct _LPoint { /* meaning list of points */
+ componentProp prop;
+ int numOfPoints;
+ int *indices;
+} LPoint;
+
+typedef struct _LLPoint { /* meaning list of list of points */
+ /* for the current 3D stuff:
+ functions of 2 variables - closed is false (xmax does not close
+ back to xmin) parametric surfaces of one variable (tubes) - closed
+ is user defined (from AXIOM)
+ */
+ componentProp prop;
+ int numOfLists;
+ LPoint *lp;
+ int meshColor; /* not used */
+} LLPoint;
+
+
+typedef struct _LLLPoint { /* meaning list of list of list of points */
+ /* for the current 3D stuff -- that is functions of 2 variables and
+ parametric surfaces of one variable (tubes) -- there would be
+ only one component
+ */
+ int numOfComponents;
+ LLPoint *llp;
+} LLLPoint;
+
+
diff --git a/src/graph/include/component3d.H1 b/src/graph/include/component3d.H1
new file mode 100755
index 00000000..eccc3a0c
--- /dev/null
+++ b/src/graph/include/component3d.H1
@@ -0,0 +1,17 @@
+#ifdef _NO_PROTO
+extern void scaleComponents();
+extern void makeTriangle();
+extern void triangulate();
+extern void readComponentsFromViewman();
+extern void calcNormData();
+extern viewPoints * make3DComponents();
+extern void draw3DComponents();
+#else
+extern void scaleComponents(void);
+extern void makeTriangle(int , int , int );
+extern void triangulate(void);
+extern void readComponentsFromViewman(void);
+extern void calcNormData(void);
+extern viewPoints * make3DComponents(void);
+extern void draw3DComponents(int );
+#endif
diff --git a/src/graph/include/control2d.H1 b/src/graph/include/control2d.H1
new file mode 100755
index 00000000..69aad119
--- /dev/null
+++ b/src/graph/include/control2d.H1
@@ -0,0 +1,19 @@
+#ifdef _NO_PROTO
+extern void writeControlTitle();
+extern void makeMessageFromData();
+extern void writeControlMessage();
+extern void drawControlPanel();
+extern controlXY getControlXY();
+extern controlPanelStruct * makeControlPanel();
+extern void putControlPanelSomewhere();
+extern void clearControlMessage();
+#else
+extern void writeControlTitle(void );
+extern void makeMessageFromData(int );
+extern void writeControlMessage(void );
+extern void drawControlPanel(void );
+extern controlXY getControlXY(int );
+extern controlPanelStruct * makeControlPanel(void );
+extern void putControlPanelSomewhere(int );
+extern void clearControlMessage(void );
+#endif
diff --git a/src/graph/include/control3d.H1 b/src/graph/include/control3d.H1
new file mode 100755
index 00000000..ae8584e8
--- /dev/null
+++ b/src/graph/include/control3d.H1
@@ -0,0 +1,19 @@
+#ifdef _NO_PROTO
+extern void drawColorMap();
+extern void writeControlTitle();
+extern void clearControlMessage();
+extern void writeControlMessage();
+extern void drawControlPanel();
+extern controlXY getControlXY();
+extern controlPanelStruct * makeControlPanel();
+extern void putControlPanelSomewhere();
+#else
+extern void drawColorMap(void);
+extern void writeControlTitle(Window );
+extern void clearControlMessage(void);
+extern void writeControlMessage(void);
+extern void drawControlPanel(void);
+extern controlXY getControlXY(int );
+extern controlPanelStruct * makeControlPanel(void);
+extern void putControlPanelSomewhere(int );
+#endif
diff --git a/src/graph/include/fun2D.H1 b/src/graph/include/fun2D.H1
new file mode 100755
index 00000000..dae11b59
--- /dev/null
+++ b/src/graph/include/fun2D.H1
@@ -0,0 +1,9 @@
+#ifdef _NO_PROTO
+extern void funView2D();
+extern void sendGraphToView2D();
+extern void forkView2D();
+#else
+extern void funView2D(int viewCommand);
+extern void sendGraphToView2D(int i ,int there,viewManager * viewType,graphStateStruct * doGraphStateArray);
+extern void forkView2D(void);
+#endif
diff --git a/src/graph/include/fun3D.H1 b/src/graph/include/fun3D.H1
new file mode 100755
index 00000000..ada7b475
--- /dev/null
+++ b/src/graph/include/fun3D.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern void funView3D();
+extern void forkView3D();
+#else
+extern void funView3D(int viewCommand);
+extern void forkView3D(int typeOfViewport);
+#endif
diff --git a/src/graph/include/graph2d.H1 b/src/graph/include/graph2d.H1
new file mode 100755
index 00000000..2d5888d8
--- /dev/null
+++ b/src/graph/include/graph2d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern void getGraphFromViewman();
+extern void freeGraph();
+#else
+extern void getGraphFromViewman(int );
+extern void freeGraph(int );
+#endif
diff --git a/src/graph/include/illuminate3d.H1 b/src/graph/include/illuminate3d.H1
new file mode 100755
index 00000000..80b7c05f
--- /dev/null
+++ b/src/graph/include/illuminate3d.H1
@@ -0,0 +1,13 @@
+#ifdef _NO_PROTO
+extern float phong();
+extern int hueValue();
+extern int getHue();
+extern float Value();
+extern RGB hlsTOrgb();
+#else
+extern float phong(triple , float [3]);
+extern int hueValue(float );
+extern int getHue(float );
+extern float Value(float , float , float );
+extern RGB hlsTOrgb(float , float , float );
+#endif
diff --git a/src/graph/include/light11.bitmap b/src/graph/include/light11.bitmap
new file mode 100755
index 00000000..d79dd52c
--- /dev/null
+++ b/src/graph/include/light11.bitmap
@@ -0,0 +1,8 @@
+#define lightBitmap_width 16
+#define lightBitmap_height 16
+#define lightBitmap_x_hot 8
+#define lightBitmap_y_hot 0
+static char lightBitmap_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x40, 0xc8, 0x27, 0x20, 0x08,
+ 0x10, 0x10, 0x16, 0x10, 0x10, 0xd0, 0x10, 0x10, 0x24, 0x08, 0x42, 0x44,
+ 0x40, 0x84, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01};
diff --git a/src/graph/include/light11.mask b/src/graph/include/light11.mask
new file mode 100755
index 00000000..4fffa962
--- /dev/null
+++ b/src/graph/include/light11.mask
@@ -0,0 +1,8 @@
+#define lightMask_width 16
+#define lightMask_height 16
+#define lightMask_x_hot 8
+#define lightMask_y_hot 0
+static char lightMask_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x40, 0xc8, 0x27, 0x20, 0x08,
+ 0x10, 0x11, 0x96, 0x12, 0x90, 0xd2, 0x90, 0x10, 0x24, 0x09, 0x42, 0x45,
+ 0x40, 0x85, 0x80, 0x03, 0x80, 0x02, 0x00, 0x01};
diff --git a/src/graph/include/lightbut3d.H1 b/src/graph/include/lightbut3d.H1
new file mode 100755
index 00000000..84625013
--- /dev/null
+++ b/src/graph/include/lightbut3d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int initLightButtons();
+#else
+extern int initLightButtons(buttonStruct * );
+#endif
diff --git a/src/graph/include/lighting3d.H1 b/src/graph/include/lighting3d.H1
new file mode 100755
index 00000000..38ebf301
--- /dev/null
+++ b/src/graph/include/lighting3d.H1
@@ -0,0 +1,11 @@
+#ifdef _NO_PROTO
+extern int makeLightingPanel();
+extern void drawLightingAxes();
+extern void drawLightTransArrow();
+extern void drawLightingPanel();
+#else
+extern int makeLightingPanel(void);
+extern void drawLightingAxes(void);
+extern void drawLightTransArrow(void);
+extern void drawLightingPanel(void);
+#endif
diff --git a/src/graph/include/main2d.H1 b/src/graph/include/main2d.H1
new file mode 100755
index 00000000..7283dad6
--- /dev/null
+++ b/src/graph/include/main2d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern int main();
+extern void mergeDatabases();
+#else
+extern int main(void);
+extern void mergeDatabases(void);
+#endif
diff --git a/src/graph/include/main3d.H1 b/src/graph/include/main3d.H1
new file mode 100755
index 00000000..7283dad6
--- /dev/null
+++ b/src/graph/include/main3d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern int main();
+extern void mergeDatabases();
+#else
+extern int main(void);
+extern void mergeDatabases(void);
+#endif
diff --git a/src/graph/include/make2D.H1 b/src/graph/include/make2D.H1
new file mode 100755
index 00000000..26dcac5d
--- /dev/null
+++ b/src/graph/include/make2D.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern void makeView2DFromSpadData();
+#else
+extern void makeView2DFromSpadData(view2DStruct * viewdata , graphStateStruct graphState[]);
+#endif
diff --git a/src/graph/include/make3D.H1 b/src/graph/include/make3D.H1
new file mode 100755
index 00000000..22ee1d4f
--- /dev/null
+++ b/src/graph/include/make3D.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern void makeView3DFromSpadData();
+#else
+extern void makeView3DFromSpadData(view3DStruct * viewdata , int typeOfViewport);
+#endif
diff --git a/src/graph/include/makeGraph.H1 b/src/graph/include/makeGraph.H1
new file mode 100755
index 00000000..419d2408
--- /dev/null
+++ b/src/graph/include/makeGraph.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern graphStruct * makeGraphFromSpadData();
+extern void discardGraph();
+#else
+extern graphStruct * makeGraphFromSpadData(void);
+extern void discardGraph(graphStruct * theGraph);
+#endif
diff --git a/src/graph/include/mesh3d.H1 b/src/graph/include/mesh3d.H1
new file mode 100755
index 00000000..6f70458c
--- /dev/null
+++ b/src/graph/include/mesh3d.H1
@@ -0,0 +1,9 @@
+#ifdef _NO_PROTO
+extern void getMeshNormal();
+extern void normalizeVector();
+extern float dotProduct();
+#else
+extern void getMeshNormal(float , float , float , float , float , float , float , float , float , float , float , float [3]);
+extern void normalizeVector(float * );
+extern float dotProduct(float * , float * , int );
+#endif
diff --git a/src/graph/include/mode.h b/src/graph/include/mode.h
new file mode 100755
index 00000000..4d0c923b
--- /dev/null
+++ b/src/graph/include/mode.h
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define spadActionMode
+/* define spadEventMode */
+#define components
diff --git a/src/graph/include/mouse11.bitmap b/src/graph/include/mouse11.bitmap
new file mode 100755
index 00000000..231c6630
--- /dev/null
+++ b/src/graph/include/mouse11.bitmap
@@ -0,0 +1,8 @@
+#define mouseBitmap_width 16
+#define mouseBitmap_height 16
+#define mouseBitmap_x_hot 8
+#define mouseBitmap_y_hot 0
+static char mouseBitmap_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x02, 0x40, 0x04, 0xc0, 0x06, 0x20, 0x08,
+ 0x20, 0x08, 0x30, 0x18, 0x50, 0x14, 0x58, 0x34, 0x90, 0x12, 0x20, 0x08,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/mouse11.mask b/src/graph/include/mouse11.mask
new file mode 100755
index 00000000..6e5621f4
--- /dev/null
+++ b/src/graph/include/mouse11.mask
@@ -0,0 +1,6 @@
+#define mouseMask_width 16
+#define mouseMask_height 16
+static char mouseMask_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0xe0, 0x0f,
+ 0xe0, 0x0f, 0xf0, 0x1f, 0xf0, 0x1f, 0xf8, 0x3f, 0xf0, 0x1f, 0xe0, 0x0f,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/msort3d.H1 b/src/graph/include/msort3d.H1
new file mode 100755
index 00000000..a0acb789
--- /dev/null
+++ b/src/graph/include/msort3d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern poly * merge();
+extern poly * msort();
+#else
+extern poly * merge(poly * , poly * , int (*)(poly * , poly * ));
+extern poly * msort(poly * , int , int , int (*)(poly * , poly * ));
+#endif
diff --git a/src/graph/include/noX10.h b/src/graph/include/noX10.h
new file mode 100755
index 00000000..5c4e077c
--- /dev/null
+++ b/src/graph/include/noX10.h
@@ -0,0 +1,87 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#ifndef _X10_H_
+#define _X10_H_
+
+/* Used in XDraw and XDrawFilled */
+
+typedef struct _Vertex {
+ short x, y;
+ unsigned short flags;
+} Vertex;
+
+/* The meanings of the flag bits. If the bit is 1 the predicate is true */
+
+#define VertexRelative 0x0001 /* else absolute */
+#define VertexDontDraw 0x0002 /* else draw */
+#define VertexCurved 0x0004 /* else straight */
+#define VertexStartClosed 0x0008 /* else not */
+#define VertexEndClosed 0x0010 /* else not */
+
+/*
+ The VertexDrawLastPoint option has not been implemented in XDraw and
+ XDrawFilled so it shouldn't be defined.
+*/
+
+/*
+ XAssoc - Associations used in the XAssocTable data structure. The
+ associations are used as circular queue entries in the association table
+ which is contains an array of circular queues (buckets).
+ */
+typedef struct _XAssoc {
+ struct _XAssoc *next; /* Next object in this bucket. */
+ struct _XAssoc *prev; /* Previous obejct in this bucket. */
+ Display *display; /* Display which ownes the id. */
+ XID x_id; /* X Window System id. */
+ char *data; /* Pointer to untyped memory. */
+} XAssoc;
+
+/*
+ XAssocTable - X Window System id to data structure pointer association
+ table. An XAssocTable is a hash table whose buckets are circular
+ queues of XAssoc's. The XAssocTable is constructed from an array of
+ XAssoc's which are the circular queue headers (bucket headers).
+ An XAssocTable consists an XAssoc pointer that points to the first
+ bucket in the bucket array and an integer that indicates the number
+ of buckets in the array.
+ */
+typedef struct _XAssocTable {
+ XAssoc **buckets; /* Pointer to first bucket in bucket array.*/
+ int size; /* Table size (number of buckets). */
+} XAssocTable;
+
+
+#endif /* _X10_H_ */
+
diff --git a/src/graph/include/override.h b/src/graph/include/override.h
new file mode 100755
index 00000000..70b59368
--- /dev/null
+++ b/src/graph/include/override.h
@@ -0,0 +1,44 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define overrideManager False
+/* override_redirect setting for overriding the window manager's directives.
+ the window manager tends to stick its nose into too much - to the point
+ where you can't even say where to put a new window. overriding it allows
+ predictable placements of things like the control panel but also loses all
+ features all the window manager (possibly things like resizing). there is
+ no good solution to this, because certain window managers go as far as
+ not allowing placement of windows on top of other windows while others
+ do not allow windows to be resized unless they have window manager given
+ title bars. */
+
diff --git a/src/graph/include/pot2d.H1 b/src/graph/include/pot2d.H1
new file mode 100755
index 00000000..597c6ae7
--- /dev/null
+++ b/src/graph/include/pot2d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern mouseCoord getPotValue();
+#else
+extern mouseCoord getPotValue(short , short , short , short );
+#endif
diff --git a/src/graph/include/pot3d.H1 b/src/graph/include/pot3d.H1
new file mode 100755
index 00000000..cfcd8c03
--- /dev/null
+++ b/src/graph/include/pot3d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern mouseCoord getPotValue();
+extern mouseCoord getLinearPotValue();
+#else
+extern mouseCoord getPotValue(short , short , short , short );
+extern mouseCoord getLinearPotValue(short , short , short , short );
+#endif
diff --git a/src/graph/include/process2d.H1 b/src/graph/include/process2d.H1
new file mode 100755
index 00000000..dae65e2b
--- /dev/null
+++ b/src/graph/include/process2d.H1
@@ -0,0 +1,21 @@
+#ifdef _NO_PROTO
+extern void doPick();
+extern void doDrop();
+extern void clickedOnGraph();
+extern void buttonAction();
+extern void processEvents();
+extern void clickedOnGraphSelect();
+#ifdef _PROCESS2D_C
+static void drawControlPushButton();
+#endif
+#else
+extern void doPick(int , int );
+extern void doDrop(int , int );
+extern void clickedOnGraph(int , int );
+extern void buttonAction(int );
+extern void processEvents(void);
+extern void clickedOnGraphSelect(int , int );
+#ifdef _PROCESS2D_C
+static void drawControlPushButton(int , int );
+#endif
+#endif
diff --git a/src/graph/include/process3d.H1 b/src/graph/include/process3d.H1
new file mode 100755
index 00000000..8bfefafe
--- /dev/null
+++ b/src/graph/include/process3d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern void buttonAction();
+extern void processEvents();
+#else
+extern void buttonAction(int );
+extern void processEvents(void);
+#endif
diff --git a/src/graph/include/project3d.H1 b/src/graph/include/project3d.H1
new file mode 100755
index 00000000..99287bef
--- /dev/null
+++ b/src/graph/include/project3d.H1
@@ -0,0 +1,15 @@
+#ifdef _NO_PROTO
+extern void project();
+extern void projectAPoint();
+extern void projectAllPoints();
+extern void projectAllPolys();
+extern void projectAPoly();
+extern void projectStuff();
+#else
+extern void project(viewTriple * , XPoint * , int );
+extern void projectAPoint(viewTriple * );
+extern void projectAllPoints(void);
+extern void projectAllPolys(poly * );
+extern void projectAPoly(poly * );
+extern void projectStuff(float , float , float , int * , int * , float * );
+#endif
diff --git a/src/graph/include/purty/hand.bitmap b/src/graph/include/purty/hand.bitmap
new file mode 100755
index 00000000..aa504daa
--- /dev/null
+++ b/src/graph/include/purty/hand.bitmap
@@ -0,0 +1,8 @@
+#define hand_width 16
+#define hand_height 16
+#define hand_x_hot 5
+#define hand_y_hot 1
+static char hand_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0x90, 0x00, 0x10, 0x01, 0x10, 0x07, 0x10, 0x09,
+ 0x0c, 0x39, 0x1a, 0x51, 0x32, 0x50, 0x22, 0x40, 0x22, 0x40, 0x04, 0x60,
+ 0x04, 0x30, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/purty/light11.bitmap b/src/graph/include/purty/light11.bitmap
new file mode 100755
index 00000000..d79dd52c
--- /dev/null
+++ b/src/graph/include/purty/light11.bitmap
@@ -0,0 +1,8 @@
+#define lightBitmap_width 16
+#define lightBitmap_height 16
+#define lightBitmap_x_hot 8
+#define lightBitmap_y_hot 0
+static char lightBitmap_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x40, 0xc8, 0x27, 0x20, 0x08,
+ 0x10, 0x10, 0x16, 0x10, 0x10, 0xd0, 0x10, 0x10, 0x24, 0x08, 0x42, 0x44,
+ 0x40, 0x84, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01};
diff --git a/src/graph/include/purty/light11.mask b/src/graph/include/purty/light11.mask
new file mode 100755
index 00000000..4fffa962
--- /dev/null
+++ b/src/graph/include/purty/light11.mask
@@ -0,0 +1,8 @@
+#define lightMask_width 16
+#define lightMask_height 16
+#define lightMask_x_hot 8
+#define lightMask_y_hot 0
+static char lightMask_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x40, 0xc8, 0x27, 0x20, 0x08,
+ 0x10, 0x11, 0x96, 0x12, 0x90, 0xd2, 0x90, 0x10, 0x24, 0x09, 0x42, 0x45,
+ 0x40, 0x85, 0x80, 0x03, 0x80, 0x02, 0x00, 0x01};
diff --git a/src/graph/include/purty/mouse11.bitmap b/src/graph/include/purty/mouse11.bitmap
new file mode 100755
index 00000000..231c6630
--- /dev/null
+++ b/src/graph/include/purty/mouse11.bitmap
@@ -0,0 +1,8 @@
+#define mouseBitmap_width 16
+#define mouseBitmap_height 16
+#define mouseBitmap_x_hot 8
+#define mouseBitmap_y_hot 0
+static char mouseBitmap_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x02, 0x40, 0x04, 0xc0, 0x06, 0x20, 0x08,
+ 0x20, 0x08, 0x30, 0x18, 0x50, 0x14, 0x58, 0x34, 0x90, 0x12, 0x20, 0x08,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/purty/mouse11.mask b/src/graph/include/purty/mouse11.mask
new file mode 100755
index 00000000..6e5621f4
--- /dev/null
+++ b/src/graph/include/purty/mouse11.mask
@@ -0,0 +1,6 @@
+#define mouseMask_width 16
+#define mouseMask_height 16
+static char mouseMask_bits[] = {
+ 0x00, 0x01, 0x00, 0x01, 0x80, 0x03, 0xc0, 0x07, 0xc0, 0x07, 0xe0, 0x0f,
+ 0xe0, 0x0f, 0xf0, 0x1f, 0xf0, 0x1f, 0xf8, 0x3f, 0xf0, 0x1f, 0xe0, 0x0f,
+ 0xc0, 0x47, 0x00, 0x21, 0x80, 0x10, 0x00, 0x0f};
diff --git a/src/graph/include/purty/slicer.bitmap b/src/graph/include/purty/slicer.bitmap
new file mode 100755
index 00000000..6f871847
--- /dev/null
+++ b/src/graph/include/purty/slicer.bitmap
@@ -0,0 +1,86 @@
+#define slicer_width 50
+#define haha_X
+#ifdef haha
+#define slicer_height 120
+#else
+#define slicer_height 100
+#endif
+static char slicer_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff,
+ 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00 ,0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+
+#ifdef haha
+ ,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+#endif
+};
diff --git a/src/graph/include/purty/spadBitmap.bitmap b/src/graph/include/purty/spadBitmap.bitmap
new file mode 100755
index 00000000..f8b9d7d8
--- /dev/null
+++ b/src/graph/include/purty/spadBitmap.bitmap
@@ -0,0 +1,14 @@
+#define spadBitmap_width 34
+#define spadBitmap_height 20
+#define spadBitmap_x_hot 15
+#define spadBitmap_y_hot 10
+static char spadBitmap_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
+ 0xe6, 0xf8, 0x76, 0x00, 0x84, 0x98, 0x44, 0x49, 0x00, 0xc0, 0x98, 0x42,
+ 0x49, 0x00, 0xb8, 0x98, 0x42, 0x49, 0x00, 0x84, 0x95, 0x42, 0x49, 0x00,
+ 0x44, 0xa5, 0x22, 0x49, 0x00, 0x78, 0x63, 0x1d, 0xdb, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/purty/spadMask.mask b/src/graph/include/purty/spadMask.mask
new file mode 100755
index 00000000..40954629
--- /dev/null
+++ b/src/graph/include/purty/spadMask.mask
@@ -0,0 +1,14 @@
+#define spadMask_width 34
+#define spadMask_height 20
+#define spadMask_x_hot 15
+#define spadMask_y_hot 10
+static char spadMask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0xfe,
+ 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff,
+ 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01,
+ 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff,
+ 0xff, 0xff, 0x01, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/purty/volume.bitmap b/src/graph/include/purty/volume.bitmap
new file mode 100755
index 00000000..c5b65e29
--- /dev/null
+++ b/src/graph/include/purty/volume.bitmap
@@ -0,0 +1,8 @@
+#define volumeBitmap_width 16
+#define volumeBitmap_height 16
+#define volumeBitmap_x_hot 5
+#define volumeBitmap_y_hot 1
+static char volumeBitmap_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0x90, 0x00, 0x10, 0x01, 0x10, 0x07, 0x10, 0x09,
+ 0x0c, 0x39, 0x1a, 0x51, 0x32, 0x50, 0x22, 0x40, 0x22, 0x40, 0x04, 0x60,
+ 0x04, 0x30, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/purty/volume.mask b/src/graph/include/purty/volume.mask
new file mode 100755
index 00000000..98e377dc
--- /dev/null
+++ b/src/graph/include/purty/volume.mask
@@ -0,0 +1,8 @@
+#define volumeMask_width 16
+#define volumeMask_height 16
+#define volumeMask_x_hot 5
+#define volumeMask_y_hot 1
+static char volumeMask_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xf0, 0x07, 0xf0, 0x0f,
+ 0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x7f,
+ 0xfc, 0x3f, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/purty/volume.mask.B b/src/graph/include/purty/volume.mask.B
new file mode 100755
index 00000000..ed3e7929
--- /dev/null
+++ b/src/graph/include/purty/volume.mask.B
@@ -0,0 +1,8 @@
+#define volumeMask_width 16
+#define volumeMask_height 16
+#define volumeMask_x_hot 8
+#define volumeMask_y_hot 0
+static char volumeMask_bits[] = {
+ 0x00, 0x00, 0x60, 0x00, 0x90, 0x00, 0x10, 0x01, 0x10, 0x07, 0x10, 0x09,
+ 0x0c, 0x39, 0x1a, 0x51, 0x32, 0x50, 0x22, 0x40, 0x22, 0x40, 0x04, 0x60,
+ 0x04, 0x30, 0xf8, 0x1f, 0x04, 0x20, 0xf8, 0x1f};
diff --git a/src/graph/include/purty/volume2.bitmap b/src/graph/include/purty/volume2.bitmap
new file mode 100755
index 00000000..36705a4d
--- /dev/null
+++ b/src/graph/include/purty/volume2.bitmap
@@ -0,0 +1,8 @@
+#define volumeBitmap_width 16
+#define volumeBitmap_height 16
+#define volumeBitmap_x_hot 8
+#define volumeBitmap_y_hot 0
+static char volumeBitmap_bits[] = {
+ 0x00, 0x01, 0xc0, 0x03, 0x30, 0x0e, 0x0c, 0x18, 0x64, 0x36, 0x44, 0x62,
+ 0x14, 0x48, 0x74, 0x4e, 0xcc, 0x43, 0x18, 0x70, 0x30, 0x1c, 0xe0, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/purty/volume2.mask b/src/graph/include/purty/volume2.mask
new file mode 100755
index 00000000..f8cddbe0
--- /dev/null
+++ b/src/graph/include/purty/volume2.mask
@@ -0,0 +1,8 @@
+#define volumeMask_width 16
+#define volumeMask_height 16
+#define volumeMask_x_hot 8
+#define volumeMask_y_hot 0
+static char volumeMask_bits[] = {
+ 0x00, 0x01, 0xc0, 0x03, 0x30, 0x0e, 0x0c, 0x18, 0x64, 0x36, 0x44, 0x62,
+ 0x14, 0x48, 0x74, 0x4e, 0xcc, 0x43, 0x18, 0x70, 0x30, 0x1c, 0xe0, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/quit3d.H1 b/src/graph/include/quit3d.H1
new file mode 100755
index 00000000..cb5b1fda
--- /dev/null
+++ b/src/graph/include/quit3d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern int makeQuitPanel();
+extern void drawQuitPanel();
+#else
+extern int makeQuitPanel(void);
+extern void drawQuitPanel(void);
+#endif
diff --git a/src/graph/include/quitbut3d.H1 b/src/graph/include/quitbut3d.H1
new file mode 100755
index 00000000..d33590f5
--- /dev/null
+++ b/src/graph/include/quitbut3d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int initQuitButtons();
+#else
+extern int initQuitButtons(buttonStruct * );
+#endif
diff --git a/src/graph/include/readView.H1 b/src/graph/include/readView.H1
new file mode 100755
index 00000000..72c10092
--- /dev/null
+++ b/src/graph/include/readView.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int readViewport();
+#else
+extern int readViewport(viewManager * viewPort , void * info , int size);
+#endif
diff --git a/src/graph/include/save3d.H1 b/src/graph/include/save3d.H1
new file mode 100755
index 00000000..7f4e2241
--- /dev/null
+++ b/src/graph/include/save3d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern int makeSavePanel();
+extern void drawSavePanel();
+#else
+extern int makeSavePanel(void);
+extern void drawSavePanel(void);
+#endif
diff --git a/src/graph/include/savebut3d.H1 b/src/graph/include/savebut3d.H1
new file mode 100755
index 00000000..74f253f9
--- /dev/null
+++ b/src/graph/include/savebut3d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int initSaveButtons();
+#else
+extern int initSaveButtons(buttonStruct * );
+#endif
diff --git a/src/graph/include/smoothShade3d.H1 b/src/graph/include/smoothShade3d.H1
new file mode 100755
index 00000000..258638cd
--- /dev/null
+++ b/src/graph/include/smoothShade3d.H1
@@ -0,0 +1,37 @@
+#ifdef _NO_PROTO
+extern char get_cBuffer_axes();
+extern void put_cBuffer_axes();
+extern int get_cBuffer_indx();
+extern void put_cBuffer_indx();
+extern void put_zBuffer();
+extern float get_zBuffer();
+extern void put_imageX();
+extern void drawPhongSpan();
+extern void scanPhong();
+extern void boxTObuffer();
+extern void clipboxTObuffer();
+extern void axesTObuffer();
+extern void scanLines();
+extern void freePolyList();
+extern void showAxesLabels();
+extern void changeColorMap();
+extern void drawPhong();
+#else
+extern char get_cBuffer_axes(int );
+extern void put_cBuffer_axes(int , char );
+extern int get_cBuffer_indx(int );
+extern void put_cBuffer_indx(int , int );
+extern void put_zBuffer(int , float );
+extern float get_zBuffer(int );
+extern void put_imageX(int , char );
+extern void drawPhongSpan(triple , float [3] , int );
+extern void scanPhong(int );
+extern void boxTObuffer(void );
+extern void clipboxTObuffer(void );
+extern void axesTObuffer(void );
+extern void scanLines(int );
+extern void freePolyList(void );
+extern void showAxesLabels(int );
+extern void changeColorMap(void );
+extern void drawPhong(int );
+#endif
diff --git a/src/graph/include/spadAction2d.H1 b/src/graph/include/spadAction2d.H1
new file mode 100755
index 00000000..edf84047
--- /dev/null
+++ b/src/graph/include/spadAction2d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern int readViewman();
+extern int spadAction();
+#else
+extern int readViewman(void * , int );
+extern int spadAction(void);
+#endif
diff --git a/src/graph/include/spadAction3d.H1 b/src/graph/include/spadAction3d.H1
new file mode 100755
index 00000000..bff7f438
--- /dev/null
+++ b/src/graph/include/spadAction3d.H1
@@ -0,0 +1,9 @@
+#ifdef _NO_PROTO
+extern int readViewman();
+extern void scalePoint();
+extern int spadAction();
+#else
+extern int readViewman(void * , int );
+extern void scalePoint(viewTriple * );
+extern int spadAction(void);
+#endif
diff --git a/src/graph/include/spadBitmap.bitmap b/src/graph/include/spadBitmap.bitmap
new file mode 100755
index 00000000..f8b9d7d8
--- /dev/null
+++ b/src/graph/include/spadBitmap.bitmap
@@ -0,0 +1,14 @@
+#define spadBitmap_width 34
+#define spadBitmap_height 20
+#define spadBitmap_x_hot 15
+#define spadBitmap_y_hot 10
+static char spadBitmap_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
+ 0xe6, 0xf8, 0x76, 0x00, 0x84, 0x98, 0x44, 0x49, 0x00, 0xc0, 0x98, 0x42,
+ 0x49, 0x00, 0xb8, 0x98, 0x42, 0x49, 0x00, 0x84, 0x95, 0x42, 0x49, 0x00,
+ 0x44, 0xa5, 0x22, 0x49, 0x00, 0x78, 0x63, 0x1d, 0xdb, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/spadMask.mask b/src/graph/include/spadMask.mask
new file mode 100755
index 00000000..40954629
--- /dev/null
+++ b/src/graph/include/spadMask.mask
@@ -0,0 +1,14 @@
+#define spadMask_width 34
+#define spadMask_height 20
+#define spadMask_x_hot 15
+#define spadMask_y_hot 10
+static char spadMask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
+ 0x01, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0xfe,
+ 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff,
+ 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01,
+ 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff,
+ 0xff, 0xff, 0x01, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
+ 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00};
diff --git a/src/graph/include/spoon2D.H1 b/src/graph/include/spoon2D.H1
new file mode 100755
index 00000000..c6899a63
--- /dev/null
+++ b/src/graph/include/spoon2D.H1
@@ -0,0 +1,9 @@
+#ifdef _NO_PROTO
+extern void spoonView2D();
+extern void makeView2DFromFileData();
+extern void sendGraphToView2D();
+#else
+extern void spoonView2D(void);
+extern void makeView2DFromFileData(view2DStruct * );
+extern void sendGraphToView2D(int , int , viewManager * );
+#endif
diff --git a/src/graph/include/spoonComp.H1 b/src/graph/include/spoonComp.H1
new file mode 100755
index 00000000..23f10f1b
--- /dev/null
+++ b/src/graph/include/spoonComp.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern void spoonView3D();
+extern void makeView3DFromFileData();
+#else
+extern void spoonView3D(int );
+extern void makeView3DFromFileData(int );
+#endif
diff --git a/src/graph/include/sselect.H1 b/src/graph/include/sselect.H1
new file mode 100755
index 00000000..1982c98f
--- /dev/null
+++ b/src/graph/include/sselect.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int superSelect();
+#else
+extern int superSelect(int n , int * rd , int * wr , int * ex , char * timeout);
+#endif
diff --git a/src/graph/include/stuff2d.H1 b/src/graph/include/stuff2d.H1
new file mode 100755
index 00000000..e8488e88
--- /dev/null
+++ b/src/graph/include/stuff2d.H1
@@ -0,0 +1,7 @@
+#ifdef _NO_PROTO
+extern float absolute();
+extern void goodbye();
+#else
+extern float absolute(float);
+extern void goodbye(int);
+#endif
diff --git a/src/graph/include/stuff3d.H1 b/src/graph/include/stuff3d.H1
new file mode 100755
index 00000000..ffd16370
--- /dev/null
+++ b/src/graph/include/stuff3d.H1
@@ -0,0 +1,13 @@
+#ifdef _NO_PROTO
+extern viewTriple * traverse();
+extern float absolute();
+extern float get_random();
+extern triple norm_dist();
+extern void goodbye();
+#else
+extern viewTriple * traverse(int );
+extern float absolute(float );
+extern float get_random(void );
+extern triple norm_dist(void );
+extern void goodbye(int);
+#endif
diff --git a/src/graph/include/surface3d.H1 b/src/graph/include/surface3d.H1
new file mode 100755
index 00000000..20823a8e
--- /dev/null
+++ b/src/graph/include/surface3d.H1
@@ -0,0 +1,33 @@
+#ifdef _NO_PROTO
+extern void drawLineComponent();
+extern void drawOpaquePolygon();
+extern poly * copyPolygons();
+extern void minMaxPolygons();
+extern int polyCompare();
+extern void calcEyePoint();
+extern void drawRenderedPolygon();
+extern void freePointResevoir();
+extern void freeListOfPolygons();
+extern void drawPolygons();
+extern int lessThan();
+extern int greaterThan();
+extern int isNaN();
+extern int isNaNPoint();
+extern int equal();
+#else
+extern void drawLineComponent(poly * , int );
+extern void drawOpaquePolygon(poly * , GC , GC , int );
+extern poly * copyPolygons(poly * );
+extern void minMaxPolygons(poly * );
+extern int polyCompare(poly * , poly * );
+extern void calcEyePoint(void );
+extern void drawRenderedPolygon(poly * , int );
+extern void freePointResevoir(void);
+extern void freeListOfPolygons(poly * );
+extern void drawPolygons(int );
+extern int lessThan(float , float );
+extern int greaterThan(float , float );
+extern int isNaN(float );
+extern int isNaNPoint(float , float , float );
+extern int equal(float , float );
+#endif
diff --git a/src/graph/include/transform3d.H1 b/src/graph/include/transform3d.H1
new file mode 100755
index 00000000..dc8c5895
--- /dev/null
+++ b/src/graph/include/transform3d.H1
@@ -0,0 +1,15 @@
+#ifdef _NO_PROTO
+extern void matrixMultiply4x4();
+extern void vectorMatrix4();
+extern void ROTATE();
+extern void ROTATE1();
+extern void SCALE();
+extern void TRANSLATE();
+#else
+extern void matrixMultiply4x4(float [4][4] , float [4][4] , float [4][4]);
+extern void vectorMatrix4(float [4] , float [4][4] , float [4]);
+extern void ROTATE(float [4][4]);
+extern void ROTATE1(float [4][4]);
+extern void SCALE(float , float , float , float [4][4]);
+extern void TRANSLATE(float , float , float , float [4][4]);
+#endif
diff --git a/src/graph/include/tube.h b/src/graph/include/tube.h
new file mode 100755
index 00000000..8d664332
--- /dev/null
+++ b/src/graph/include/tube.h
@@ -0,0 +1,113 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#define openTube 1
+#define closedTube 0
+
+typedef struct _triple { /* used for normals */
+ float x,y,z;
+} triple;
+
+#include "rgb.h"
+
+typedef struct _viewTriple { /* used for points in 3 space */
+ float x,y,z,c,sc; /* c is color component */
+ float wx,wy,wz; /* world space coords */
+ float px,py,pz; /* as projected on the screen */
+ float norm[3];
+ struct _viewTriple *next; /* for new points allocated by splits,
+ keep in list for freeing */
+} viewTriple, *viewTriplePtr;
+
+/* the xxxPRIM's are primitiveType's as deduced from the
+ components received from AXIOM. the info may be
+ used in the hidden surface section */
+
+#define stillDontKnow 0
+#define pointComponent 1
+#define lineComponent 2
+#define polygonComponent 3
+#define surfaceComponent 4
+
+
+typedef struct _poly {
+ int num, sortNum,
+ split; /* how many times the polygon's been split */
+ int numpts;
+ int primitiveType;
+ int *indexPtr; /* the index referring to the offset from the
+ beginning of the points field in the view3DStruct
+ in view3D.h */
+ float N[3],planeConst,color; /* planeConst - for plane equ'n, N has
+ other 3 coeffs */
+ float pxmin,pxmax,pymin,pymax,pzmin,pzmax;
+ float xmin,xmax,ymin,ymax,zmin,zmax;
+ int moved; /* moved - for depth sort */
+ struct _poly *next;
+ int doNotStopDraw; /* for the quickDraw if depth info remains
+ the same between draws */
+ float normalFacingOut;
+ int partialClip, totalClip,
+ partialClipPz, totalClipPz;
+} poly;
+
+
+typedef struct _polyList {
+ int numPolys;
+ poly *polyIndx;
+ struct _polyList *next;
+} polyList;
+
+
+typedef struct _slice {
+ int keyoffset;
+ viewTriple *points;
+ struct _slice *next;
+} slice;
+
+
+typedef struct _tubeModel {
+ /* numslices are the number of pts on the curve */
+ int numslices, slicepts, numPolygons;
+ int openLoop; /* open or closed loop */
+ slice *slices;
+ poly *polygons;
+} tubeModel;
+
+
+typedef struct _pointInfo {
+ viewTriple *theVT;
+ int onVertex,segmentNum;
+ int indexNum;
+} pointInfo;
+
diff --git a/src/graph/include/view.h b/src/graph/include/view.h
new file mode 100755
index 00000000..52ecf42b
--- /dev/null
+++ b/src/graph/include/view.h
@@ -0,0 +1,90 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* This file is to be included by all the viewport files */
+
+#define check(code) checker(code,__LINE__,"")
+#define saymem(a,b,c) saymemWithLine(a,b,c,__LINE__)
+#define exitWithAck(ACK,ACKsize,i) \
+ check(write(Socket,&(ACK),sizeof(ACKsize))); exit(i);
+#define NIL(type) ((type *)NULL)
+
+#define oldNum 8 /* in the old system, we assumed an eight shade palette */
+#define oldOff 2
+
+#define monoColor(x) ((mono)?foregroundColor:XSolidColor((int)x/oldNum,(int)(x%oldNum)/oldOff))
+#define monoDither(x,y) ((mono)?foregroundColor:XSolidColor(x,y))
+#define notANumber (0.0/0.0)
+
+/* error messages */
+#define fontErrMess " Try getting the font or changing the .Xdefaults entry"
+
+/* opening fonts */
+
+/* getDef(v,s,d,x):
+ v, the character pointer for the default value
+ s, the .Xdefaults field
+ d, the value in case the field is undefined in .Xdefaults
+ x, a string specifying the prefix field (in .Xdefaults)
+ */
+
+#define getDef(v,s,d,x) {v=XGetDefault(dsply,x,s); if (v==NIL(char)) v=d;}
+
+/* getFont(daFont,daDefault,whichView):
+ assignTo, the font variable that will hold the font (globalFont)
+ daFont, the .Xdefault field name ("buttonFont")
+ daDefault, the default font (string) ("Rom12.500")
+ whichView, the .Xdefault prefix name ("view2D")
+ this is to be used in the files view2D/main.c and view3D/main.c where the
+ appropriate variables are already defined
+ */
+
+#define getFont(assignTo,daFont,daDefault,whichView) \
+getDef(xDefault,daFont,daDefault,whichView); \
+if ((assignTo = XLoadQueryFont(dsply,xDefault)) == NULL) \
+if ((assignTo = XLoadQueryFont(dsply,daDefault)) == NULL) { \
+if (strcmp(xDefault,daDefault)) /* strcmp returns 0 if equal */ \
+if (xDefault[0] == '\0') \
+fprintf(stderr, \
+" >>> Font error: No .Xdefault entry for %s.%s and could not get the %s font\n%s\n", \
+whichView,daFont,daDefault,fontErrMess); \
+else \
+fprintf(stderr, \
+" >>> Font error: Could get neither the %s nor the %s font\n%s\n",xDefault, \
+daDefault,fontErrMess); \
+else \
+fprintf(stderr, \
+" >>> Font error: Could not get the %s font.\n%s\n",xDefault,fontErrMess); \
+exitWithAck(RootWindow(dsply,scrn),Window,-1); \
+}
+
diff --git a/src/graph/include/view2D.h b/src/graph/include/view2D.h
new file mode 100755
index 00000000..3a1b06c2
--- /dev/null
+++ b/src/graph/include/view2D.h
@@ -0,0 +1,100 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <X11/Xlib.h>
+#define maxGraphs 9
+
+
+typedef struct _viewManager {
+ int viewType, /* specifies view3D, view2D, etc... */
+ PID, /* unique integer greater than zero */
+ processID, /* processID of child (PID could be the window ID) */
+ viewIn,viewOut; /* connection to viewport process */
+ char propertyName[14]; /* string pointing to the property name */
+ Window viewWindow;
+ struct _viewManager *nextViewport;
+} viewManager;
+
+typedef struct _viewsWithThisGraph {
+ viewManager *viewGr;
+ struct _viewsWithThisGraph *nextViewthing;
+} viewsWithThisGraph;
+
+
+typedef struct _pointStruct {
+ float x,y,hue,shade;
+} pointStruct;
+
+
+typedef struct _pointListStruct {
+ pointStruct *listOfPoints;
+ float hue, shade;
+ int pointColor, lineColor, pointSize,
+ numberOfPoints;
+} pointListStruct;
+
+
+typedef struct _graphStruct {
+ int key;
+ float xmin,xmax,ymin,ymax;
+ float xNorm,yNorm;
+ float spadUnitX,spadUnitY;
+ float unitX,unitY;
+ float originX,originY;
+ int numberOfLists;
+ pointListStruct *listOfListsOfPoints;
+ viewsWithThisGraph *views;
+ struct _graphStruct *nextGraph;
+} graphStruct;
+
+
+typedef struct _view2DStruct {
+ char *title;
+ int vX,vY,vW,vH,
+ showCP,
+ axesOn,unitsOn,pointsOn,linesOn,splineOn,
+ axesColor,unitsColor;
+ int graphKeyArray[maxGraphs];
+} view2DStruct;
+
+
+typedef struct _graphStateStruct {
+ float scaleX, scaleY, deltaX, deltaY, centerX, centerY;
+ int pointsOn, connectOn, splineOn, axesOn, unitsOn,
+ axesColor,unitsColor;
+ int showing, selected; /* these fields are not passed from Spad;
+ View2D initializes them */
+} graphStateStruct;
+
+
+/* need spline color, axes color, units color... */
diff --git a/src/graph/include/view3D.h b/src/graph/include/view3D.h
new file mode 100755
index 00000000..aea7cd9f
--- /dev/null
+++ b/src/graph/include/view3D.h
@@ -0,0 +1,98 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include "component.h"
+
+/* we now have two substructures (in the union, kind):
+ tubeModel (in tube.h) and fun2VarModel (below)
+ */
+#define maxGraphs 9
+
+typedef struct _fun2VarModel {
+ float *zArray,*cArray;
+ viewTriple *pointList;
+} fun2VarModel;
+
+union kindOf {
+ /* float *zArray; */
+ fun2VarModel fun2Var;
+ tubeModel tube;
+};
+
+typedef struct _view3DStruct {
+ int typeOf3D;
+ float xmin,xmax,ymin,ymax,zmin,zmax;
+ float cmin,cmax;
+ float scaleToView;
+ union kindOf kind;
+ int xnumber, ynumber, zSize;
+ char *title;
+ float deltaX,deltaY,scale,theta,phi;
+ float deltaZ; /***** not yet used *****/
+ float scaleX,scaleY,scaleZ;
+ float transX,transY,transZ; /* translate so that rotation can be done
+ about center of object volume */
+ int vX,vY,vW,vH;
+ int showCP,style,AxesOn,
+ hueOff,numOfHues,
+ diagonals;
+ float lightVec[3],translucency;
+ int scaleDown;
+ int perspective;
+ float eyeDistance;
+ int outlineRenderOn,box,clipbox,
+ clipStuff; /* actually clip the stuff outside the clip boundaries */
+ int numOfPoints;
+ viewTriple *points;
+ poly *polygons;
+ LLLPoint lllp;
+ int numPolygons;
+ int pointSize;
+ float distortX,distortY,distortZ;
+ float clipXmin,clipXmax, /* for object space clipping */
+ clipYmin,clipYmax,
+ clipZmin,clipZmax;
+ float clipPlane; /* for (frustrum hither plane) image space
+ clipping note that there is already a
+ clipOffset variable that is read in as a
+ global variable
+ */
+} view3DStruct;
+
+
+/* for drawing the region box */
+typedef struct _boxSideStruct {
+ viewTriplePtr pointsPtr[4]; /* see notes for definition of box */
+ int inside;
+} boxSideStruct;
+
diff --git a/src/graph/include/viewAlone.H1 b/src/graph/include/viewAlone.H1
new file mode 100755
index 00000000..def07621
--- /dev/null
+++ b/src/graph/include/viewAlone.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int main();
+#else
+extern int main(int , char * []);
+#endif
diff --git a/src/graph/include/viewCommand.h b/src/graph/include/viewCommand.h
new file mode 100755
index 00000000..249feedd
--- /dev/null
+++ b/src/graph/include/viewCommand.h
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* Commands that the viewports could send to the viewport manager */
+
+#define viewportClosing 1
diff --git a/src/graph/include/viewport2D.H1 b/src/graph/include/viewport2D.H1
new file mode 100755
index 00000000..634abb96
--- /dev/null
+++ b/src/graph/include/viewport2D.H1
@@ -0,0 +1,11 @@
+#ifdef _NO_PROTO
+extern void writeTitle();
+extern void drawTheViewport();
+extern viewPoints * makeViewport();
+extern viewPoints * makeView2D();
+#else
+extern void writeTitle(void);
+extern void drawTheViewport(int );
+extern viewPoints * makeViewport(char * , int , int , int , int , int );
+extern viewPoints * makeView2D(view2DStruct * );
+#endif
diff --git a/src/graph/include/viewport3d.H1 b/src/graph/include/viewport3d.H1
new file mode 100755
index 00000000..7cf42c2f
--- /dev/null
+++ b/src/graph/include/viewport3d.H1
@@ -0,0 +1,15 @@
+#ifdef _NO_PROTO
+extern void writeTitle();
+extern void drawPreViewport();
+extern void drawTheViewport();
+extern int keepDrawingViewport();
+extern viewPoints * makeViewport();
+extern void postMakeViewport();
+#else
+extern void writeTitle(void);
+extern void drawPreViewport(int );
+extern void drawTheViewport(int );
+extern int keepDrawingViewport(void);
+extern viewPoints * makeViewport(void);
+extern void postMakeViewport(void);
+#endif
diff --git a/src/graph/include/volume3d.H1 b/src/graph/include/volume3d.H1
new file mode 100755
index 00000000..e9245f31
--- /dev/null
+++ b/src/graph/include/volume3d.H1
@@ -0,0 +1,23 @@
+#ifdef _NO_PROTO
+extern int initVolumeButtons();
+extern void makeVolumePanel();
+extern void drawClipXBut();
+extern void drawClipYBut();
+extern void drawClipZBut();
+extern void drawClipVolume();
+extern void drawHitherControl();
+extern void drawEyeControl();
+extern void drawFrustrum();
+extern void drawVolumePanel();
+#else
+extern int initVolumeButtons(buttonStruct * );
+extern void makeVolumePanel(void );
+extern void drawClipXBut(void );
+extern void drawClipYBut(void );
+extern void drawClipZBut(void );
+extern void drawClipVolume(void );
+extern void drawHitherControl(void );
+extern void drawEyeControl(void );
+extern void drawFrustrum(void );
+extern void drawVolumePanel(void );
+#endif
diff --git a/src/graph/include/write.h b/src/graph/include/write.h
new file mode 100755
index 00000000..1deec4e1
--- /dev/null
+++ b/src/graph/include/write.h
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* These are types of files that the viewports would
+ be able to write out upon a command from AXIOM.
+ Note that the numbers in this list is also the order
+ in which they should appear in the AXIOM file (e.g. view3D.spad) */
+
+#define Pixmap 1
+#define Bitmap 2
+#define Postscript 3
+#define Image 4
diff --git a/src/graph/include/write2d.H1 b/src/graph/include/write2d.H1
new file mode 100755
index 00000000..2925821e
--- /dev/null
+++ b/src/graph/include/write2d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int writeViewport();
+#else
+extern int writeViewport(int );
+#endif
diff --git a/src/graph/include/write3d.H1 b/src/graph/include/write3d.H1
new file mode 100755
index 00000000..2925821e
--- /dev/null
+++ b/src/graph/include/write3d.H1
@@ -0,0 +1,5 @@
+#ifdef _NO_PROTO
+extern int writeViewport();
+#else
+extern int writeViewport(int );
+#endif