aboutsummaryrefslogtreecommitdiff
path: root/src/graph/viewman
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-03-09 03:47:21 +0000
committerdos-reis <gdr@axiomatics.org>2008-03-09 03:47:21 +0000
commit6e07ce8f0c6c77b61cfa2f8be54781160018ff91 (patch)
tree91e5069719c924bd58242e932bd585d3e676112b /src/graph/viewman
parent3f7d906f8cd6edd2597a49f629bd31914de8ca08 (diff)
downloadopen-axiom-6e07ce8f0c6c77b61cfa2f8be54781160018ff91.tar.gz
* graph/: Depamphletize.
* include/addfile.h: Move from hyper. * include/addfile.H1: Move external declarations into addfile.h. Remove.
Diffstat (limited to 'src/graph/viewman')
-rw-r--r--src/graph/viewman/Makefile.in16
-rw-r--r--src/graph/viewman/cleanup.c (renamed from src/graph/viewman/cleanup.c.pamphlet)146
-rw-r--r--src/graph/viewman/fun2D.c (renamed from src/graph/viewman/fun2D.c.pamphlet)84
-rw-r--r--src/graph/viewman/fun3D.c (renamed from src/graph/viewman/fun3D.c.pamphlet)84
-rw-r--r--[-rwxr-xr-x]src/graph/viewman/globalsM.h52
-rw-r--r--src/graph/viewman/make2D.c85
-rw-r--r--src/graph/viewman/make2D.c.pamphlet105
-rw-r--r--src/graph/viewman/make3D.c (renamed from src/graph/viewman/make3D.c.pamphlet)84
-rw-r--r--src/graph/viewman/makeGraph.c (renamed from src/graph/viewman/makeGraph.c.pamphlet)84
-rw-r--r--src/graph/viewman/readView.c66
-rw-r--r--src/graph/viewman/readView.c.pamphlet86
-rw-r--r--src/graph/viewman/sselect.c103
-rw-r--r--src/graph/viewman/sselect.c.pamphlet123
-rw-r--r--src/graph/viewman/viewman.c (renamed from src/graph/viewman/viewman.c.pamphlet)96
-rw-r--r--[-rwxr-xr-x]src/graph/viewman/viewman.h0
15 files changed, 514 insertions, 700 deletions
diff --git a/src/graph/viewman/Makefile.in b/src/graph/viewman/Makefile.in
index 07578c6f..cc857bc6 100644
--- a/src/graph/viewman/Makefile.in
+++ b/src/graph/viewman/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, Gabriel Dos Reis.
+# Copyright (C) 2007-2008, Gabriel Dos Reis.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -40,12 +40,10 @@ build_libdir = $(abs_top_builddir)/src/lib
bin_PROGRAMS = viewman$(EXEEXT)
-viewman_sources = cleanup.c fun2D.c fun3D.c make2D.c make3D.c \
+viewman_SOURCES = cleanup.c fun2D.c fun3D.c make2D.c make3D.c \
makeGraph.c readView.c sselect.c viewman.c
-viewman_SOURCES = $(addsuffix .pamphlet, $(viewman_sources))
-
-viewman_objects = $(viewman_sources:.c=.lo)
+viewman_objects = $(viewman_SOURCES:.c=.lo)
viewman_headers = $(srcdir)/viewman.h \
$(addprefix $(axiom_src_srcdir)/graph/include/,\
@@ -57,8 +55,6 @@ viewman_headers = $(srcdir)/viewman.h \
viewman_DEPENDENCIES =
viewman_LDFLAGS = $(axiom_target_libdir)/libspad.la
-pamphlets = Makefile.pamphlet $(viewman_SOURCES)
-
subdir = src/graph/viewman/
AXIOM_CFLAGS = ${CCF} ${AXIOM_X11_CFLAGS} -I${LINC} -I${GINC} -I$(srcdir) \
@@ -75,7 +71,6 @@ stamp: $(axiom_target_libdir)/viewman$(EXEEXT)
$(STAMP) stamp
-.PRECIOUS: %.c
.PRECIOUS: %.lo
%.lo: $(viewman_HEADERS)
@@ -83,9 +78,6 @@ stamp: $(axiom_target_libdir)/viewman$(EXEEXT)
%.lo: %.c $(axiom_c_macros_h)
$(COMPILE) -o $@ $(CFLAGS) $(AXIOM_CFLAGS) $<
-%.c: $(srcdir)/%.c.pamphlet
- $(axiom_build_document) --tangle --output=$@ $<
-
$(axiom_target_libdir)/viewman$(EXEEXT): $(viewman_objects) $(viewman_DEPENDENCIES)
$(LINK) -o $@ $(viewman_objects) $(viewman_LDFLAGS) \
$(AXIOM_X11_LDFLAGS)
@@ -93,7 +85,7 @@ $(axiom_target_libdir)/viewman$(EXEEXT): $(viewman_objects) $(viewman_DEPENDENCI
mostlyclean-local:
clean-local: mostlyclean-local
- @rm -f $(viewman_sources) $(viewman_objects)
+ @rm -f $(viewman_objects)
@rm -f $(axiom_target_libdir)/viewman$(EXEEXT)
distclean-local: clean-local
diff --git a/src/graph/viewman/cleanup.c.pamphlet b/src/graph/viewman/cleanup.c
index 24103128..73cb0a94 100644
--- a/src/graph/viewman/cleanup.c.pamphlet
+++ b/src/graph/viewman/cleanup.c
@@ -1,51 +1,37 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman cleanup.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
/*
-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 (C) 1991-2002, The Numerical Algorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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.
*/
-@
-<<*>>=
-<<license>>
#define _CLEANUP_C
#include "axiom-c-macros.h"
@@ -122,8 +108,8 @@ rmViewMgr(viewManager *slotPtr)
somePort=(someOtherPort=somePort)->nextViewport)
{}
assert ((somePort == 0) ||
- (somePort == viewports) ||
- (somePort == someOtherPort->nextViewport));
+ (somePort == viewports) ||
+ (somePort == someOtherPort->nextViewport));
if (somePort) {
if (somePort == viewports) viewports=viewports->nextViewport;
@@ -136,45 +122,45 @@ rmViewMgr(viewManager *slotPtr)
if (code == -1) break; /* read failure - give up */
if (throwAway) { /* zero means no graph */
- for (someGraph = someOtherGraph = graphList;
+ for (someGraph = someOtherGraph = graphList;
(someGraph != 0) && (someGraph->key != throwAway);
- someGraph=(someOtherGraph=someGraph)->nextGraph)
- {
- }
+ someGraph=(someOtherGraph=someGraph)->nextGraph)
+ {
+ }
/* someGraph is 0 if not found */
- /* someGraph == graphList if found at first */
- /* otherwise someGraph == someOtherGraph->nextGraph */
- assert( (someGraph == 0) ||
- (someGraph == graphList) ||
- (someGraph == someOtherGraph->nextGraph));
+ /* someGraph == graphList if found at first */
+ /* otherwise someGraph == someOtherGraph->nextGraph */
+ assert( (someGraph == 0) ||
+ (someGraph == graphList) ||
+ (someGraph == someOtherGraph->nextGraph));
if (someGraph) { /* if found (should always be true) */
- for(someView=someOtherView=someGraph->views;
- (someView !=0 ) && (someView->viewGr != slotPtr);
- someView=(someOtherView=someView)->nextViewthing)
- {
- }
- /* similarly */
- assert( (someView == 0) ||
- (someView == someGraph->views) ||
- (someView == someOtherView->nextViewthing));
+ for(someView=someOtherView=someGraph->views;
+ (someView !=0 ) && (someView->viewGr != slotPtr);
+ someView=(someOtherView=someView)->nextViewthing)
+ {
+ }
+ /* similarly */
+ assert( (someView == 0) ||
+ (someView == someGraph->views) ||
+ (someView == someOtherView->nextViewthing));
if (someView) { /* if found (should always be true) */
- if (someView == someGraph->views)
- /* first */
- someGraph->views = someGraph->views->nextViewthing;
- else
- someOtherView->nextViewthing = someView->nextViewthing;
+ if (someView == someGraph->views)
+ /* first */
+ someGraph->views = someGraph->views->nextViewthing;
+ else
+ someOtherView->nextViewthing = someView->nextViewthing;
free(someView); /* remove this viewport
- from list */
+ from list */
}
- /* if now nothing is pointing to this graph , remove the graph from the list*/
+ /* if now nothing is pointing to this graph , remove the graph from the list*/
if (someGraph->views == 0) {
- if (someGraph == graphList)
- graphList = graphList->nextGraph;
- else
- someOtherGraph->nextGraph = someGraph->nextGraph;
+ if (someGraph == graphList)
+ graphList = graphList->nextGraph;
+ else
+ someOtherGraph->nextGraph = someGraph->nextGraph;
discardGraph(someGraph); /* free the graph */
}
} /* if someGraph */
@@ -246,9 +232,3 @@ goodbye(int sig)
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/fun2D.c.pamphlet b/src/graph/viewman/fun2D.c
index 6cc08f47..f2cdda03 100644
--- a/src/graph/viewman/fun2D.c.pamphlet
+++ b/src/graph/viewman/fun2D.c
@@ -1,51 +1,37 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman fun2D.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
/*
-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 (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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.
*/
-@
-<<*>>=
-<<license>>
#define _FUN2D_C
#include "axiom-c-macros.h"
@@ -404,9 +390,3 @@ sendGraphToView2D(int i,int there,viewManager *viewport,graphStateStruct *doGrap
}
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/fun3D.c.pamphlet b/src/graph/viewman/fun3D.c
index f840fb0b..d50f06b4 100644
--- a/src/graph/viewman/fun3D.c.pamphlet
+++ b/src/graph/viewman/fun3D.c
@@ -1,51 +1,37 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman fun3D.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
/*
-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 (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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.
*/
-@
-<<*>>=
-<<license>>
#define _FUN3D_C
#include "axiom-c-macros.h"
@@ -387,9 +373,3 @@ forkView3D(int typeOfViewport)
} /* forkView3D() */
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/globalsM.h b/src/graph/viewman/globalsM.h
index 019ecc3a..e7e3846b 100755..100644
--- a/src/graph/viewman/globalsM.h
+++ b/src/graph/viewman/globalsM.h
@@ -1,34 +1,36 @@
/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
+ Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights resrved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
+ 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 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.
+ - 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.
+ - 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 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.
*/
extern viewManager *viewports,*slot,*stepSlot;
diff --git a/src/graph/viewman/make2D.c b/src/graph/viewman/make2D.c
new file mode 100644
index 00000000..a4beba4e
--- /dev/null
+++ b/src/graph/viewman/make2D.c
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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 _MAKE2D_C
+#include "axiom-c-macros.h"
+
+#include "viewman.h"
+
+#include "sockio.h"
+#include "make2D.H1"
+
+void
+#ifdef _NO_PROTO
+makeView2DFromSpadData(viewdata,graphState)
+ view2DStruct *viewdata;
+ graphStateStruct graphState[];
+#else
+makeView2DFromSpadData(view2DStruct *viewdata,graphStateStruct graphState[])
+#endif
+{
+
+ int i;
+
+ viewdata->title = get_string(spadSock);
+
+ viewdata->vX = get_int(spadSock);
+ viewdata->vY = get_int(spadSock);
+ viewdata->vW = get_int(spadSock);
+ viewdata->vH = get_int(spadSock);
+
+ viewdata->showCP = get_int(spadSock);
+
+ for (i=0; i<maxGraphs; i++) {
+ viewdata->graphKeyArray[i] = get_int(spadSock);
+ if (viewdata->graphKeyArray[i]) {
+
+ graphState[i].scaleX = get_float(spadSock);
+ graphState[i].scaleY = get_float(spadSock);
+ graphState[i].deltaX = get_float(spadSock);
+ graphState[i].deltaY = get_float(spadSock);
+ graphState[i].pointsOn = get_int(spadSock);
+ graphState[i].connectOn = get_int(spadSock);
+ graphState[i].splineOn = get_int(spadSock);
+ graphState[i].axesOn = get_int(spadSock);
+ graphState[i].axesColor = get_int(spadSock);
+ graphState[i].unitsOn = get_int(spadSock);
+ graphState[i].unitsColor = get_int(spadSock);
+ graphState[i].showing = get_int(spadSock);
+ graphState[i].selected = 1; /* always default to selected? */
+
+ }
+ }
+}
diff --git a/src/graph/viewman/make2D.c.pamphlet b/src/graph/viewman/make2D.c.pamphlet
deleted file mode 100644
index 0f4a3e3e..00000000
--- a/src/graph/viewman/make2D.c.pamphlet
+++ /dev/null
@@ -1,105 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman make2D.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
-/*
-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.
-*/
-@
-<<*>>=
-<<license>>
-
-#define _MAKE2D_C
-#include "axiom-c-macros.h"
-
-#include "viewman.h"
-
-#include "sockio.h"
-#include "make2D.H1"
-
-void
-#ifdef _NO_PROTO
-makeView2DFromSpadData(viewdata,graphState)
- view2DStruct *viewdata;
- graphStateStruct graphState[];
-#else
-makeView2DFromSpadData(view2DStruct *viewdata,graphStateStruct graphState[])
-#endif
-{
-
- int i;
-
- viewdata->title = get_string(spadSock);
-
- viewdata->vX = get_int(spadSock);
- viewdata->vY = get_int(spadSock);
- viewdata->vW = get_int(spadSock);
- viewdata->vH = get_int(spadSock);
-
- viewdata->showCP = get_int(spadSock);
-
- for (i=0; i<maxGraphs; i++) {
- viewdata->graphKeyArray[i] = get_int(spadSock);
- if (viewdata->graphKeyArray[i]) {
-
- graphState[i].scaleX = get_float(spadSock);
- graphState[i].scaleY = get_float(spadSock);
- graphState[i].deltaX = get_float(spadSock);
- graphState[i].deltaY = get_float(spadSock);
- graphState[i].pointsOn = get_int(spadSock);
- graphState[i].connectOn = get_int(spadSock);
- graphState[i].splineOn = get_int(spadSock);
- graphState[i].axesOn = get_int(spadSock);
- graphState[i].axesColor = get_int(spadSock);
- graphState[i].unitsOn = get_int(spadSock);
- graphState[i].unitsColor = get_int(spadSock);
- graphState[i].showing = get_int(spadSock);
- graphState[i].selected = 1; /* always default to selected? */
-
- }
- }
-}
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/make3D.c.pamphlet b/src/graph/viewman/make3D.c
index 61d84c82..7cac382b 100644
--- a/src/graph/viewman/make3D.c.pamphlet
+++ b/src/graph/viewman/make3D.c
@@ -1,51 +1,37 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman make3D.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
/*
-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 (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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.
*/
-@
-<<*>>=
-<<license>>
#define _MAKE3D_C
#include "axiom-c-macros.h"
@@ -177,9 +163,3 @@ makeView3DFromSpadData(view3DStruct *viewdata,int typeOfViewport)
}
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/makeGraph.c.pamphlet b/src/graph/viewman/makeGraph.c
index 39e9b2c6..8f8fc540 100644
--- a/src/graph/viewman/makeGraph.c.pamphlet
+++ b/src/graph/viewman/makeGraph.c
@@ -1,51 +1,37 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman makeGraph.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
/*
-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 (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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.
*/
-@
-<<*>>=
-<<license>>
#define _MAKEGRAPH_C
#include "axiom-c-macros.h"
@@ -156,9 +142,3 @@ discardGraph (graphStruct *theGraph)
free(theGraph);
}
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/readView.c b/src/graph/viewman/readView.c
new file mode 100644
index 00000000..ba65b435
--- /dev/null
+++ b/src/graph/viewman/readView.c
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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 _READVIEW_C
+#include "axiom-c-macros.h"
+
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include "viewman.h"
+
+#include "cleanup.H1"
+
+int
+#ifdef _NO_PROTO
+readViewport (viewPort,info,size)
+ viewManager *viewPort;
+ void *info;
+ int size;
+#else
+readViewport (viewManager *viewPort,void *info,int size)
+#endif
+{
+
+ int canRead;
+
+again:
+ if ((canRead=read(viewPort->viewIn,info,size)) > 0) return(canRead);
+ if (errno==EINTR || errno==EAGAIN) goto again;
+ return(-1);
+}
+
+
diff --git a/src/graph/viewman/readView.c.pamphlet b/src/graph/viewman/readView.c.pamphlet
deleted file mode 100644
index 36614400..00000000
--- a/src/graph/viewman/readView.c.pamphlet
+++ /dev/null
@@ -1,86 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman readView.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
-/*
-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.
-*/
-@
-<<*>>=
-<<license>>
-
-#define _READVIEW_C
-#include "axiom-c-macros.h"
-
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-
-#include "viewman.h"
-
-#include "cleanup.H1"
-
-int
-#ifdef _NO_PROTO
-readViewport (viewPort,info,size)
- viewManager *viewPort;
- void *info;
- int size;
-#else
-readViewport (viewManager *viewPort,void *info,int size)
-#endif
-{
-
- int canRead;
-
-again:
- if ((canRead=read(viewPort->viewIn,info,size)) > 0) return(canRead);
- if (errno==EINTR || errno==EAGAIN) goto again;
- return(-1);
-}
-
-
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/sselect.c b/src/graph/viewman/sselect.c
new file mode 100644
index 00000000..1cb584c5
--- /dev/null
+++ b/src/graph/viewman/sselect.c
@@ -0,0 +1,103 @@
+/*
+ Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ 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 _SSELECT_C
+#include "axiom-c-macros.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/wait.h>
+#include <signal.h>
+
+#include "viewman.h"
+#include "bsdsignal.h"
+
+#include "sockio.h"
+#include "bsdsignal.H1"
+#include "cleanup.H1"
+#include "sselect.H1"
+
+/*******************************************
+ * int superSelect(n, rd, wr, ex, timeout) *
+ * *
+ * superselect! if select returns a -1 *
+ * due to an interrupt (EINTR), this *
+ * routine checks to see if it's a *
+ * child viewport that has closed. *
+ * Expected global variables: *
+ * int checkClosedChild *
+ *******************************************/
+
+int
+#ifdef _NO_PROTO
+superSelect(n, rd, wr, ex, timeout)
+ int n;
+ int *rd, *wr, *ex;
+ char *timeout;
+#else
+superSelect(int n, int *rd, int *wr, int *ex, char *timeout)
+#endif
+{
+
+ int waiting;
+ viewManager *viewport;
+ int ret_val;
+
+ ret_val = select(n, (void *)rd, (void *)wr, (void *)ex, (void *)timeout);
+ while (ret_val == -1 && errno == EINTR) {
+ /* checkClosedChild gets set by the SIGCHLD handler */
+ if (checkClosedChild) {
+ while ((waiting = wait(0)) == -1 );
+ viewport = viewports;
+ while ((viewport) && (viewport->PID != waiting))
+ viewport = viewport->nextViewport;
+ if (viewport) {
+ /* we shouldn't really be doing this since child is dead */
+ /* rmViewMgr(viewport); */
+ /* flush(spadSock); */
+ /* send_int(spadSock,1); acknowledge to spad */
+ checkClosedChild = no;
+#if defined(BSDplatform) || defined(MACOSXplatform)
+ bsdSignal(SIGCHLD,endChild,DontRestartSystemCalls);
+#else
+ bsdSignal(SIGCLD,endChild,DontRestartSystemCalls);
+#endif
+ }
+ }
+ ret_val = select(n, (void *)rd, (void *)wr, (void *)ex, (void *)timeout);
+ }
+ return ret_val;
+}
diff --git a/src/graph/viewman/sselect.c.pamphlet b/src/graph/viewman/sselect.c.pamphlet
deleted file mode 100644
index 929ced90..00000000
--- a/src/graph/viewman/sselect.c.pamphlet
+++ /dev/null
@@ -1,123 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman sselect.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
-/*
-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.
-*/
-@
-<<*>>=
-<<license>>
-
-#define _SSELECT_C
-#include "axiom-c-macros.h"
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-#include <signal.h>
-
-#include "viewman.h"
-#include "bsdsignal.h"
-
-#include "sockio.h"
-#include "bsdsignal.H1"
-#include "cleanup.H1"
-#include "sselect.H1"
-
-/*******************************************
- * int superSelect(n, rd, wr, ex, timeout) *
- * *
- * superselect! if select returns a -1 *
- * due to an interrupt (EINTR), this *
- * routine checks to see if it's a *
- * child viewport that has closed. *
- * Expected global variables: *
- * int checkClosedChild *
- *******************************************/
-
-int
-#ifdef _NO_PROTO
-superSelect(n, rd, wr, ex, timeout)
- int n;
- int *rd, *wr, *ex;
- char *timeout;
-#else
-superSelect(int n, int *rd, int *wr, int *ex, char *timeout)
-#endif
-{
-
- int waiting;
- viewManager *viewport;
- int ret_val;
-
- ret_val = select(n, (void *)rd, (void *)wr, (void *)ex, (void *)timeout);
- while (ret_val == -1 && errno == EINTR) {
- /* checkClosedChild gets set by the SIGCHLD handler */
- if (checkClosedChild) {
- while ((waiting = wait(0)) == -1 );
- viewport = viewports;
- while ((viewport) && (viewport->PID != waiting))
- viewport = viewport->nextViewport;
- if (viewport) {
- /* we shouldn't really be doing this since child is dead */
- /* rmViewMgr(viewport); */
- /* flush(spadSock); */
- /* send_int(spadSock,1); acknowledge to spad */
- checkClosedChild = no;
-#if defined(BSDplatform) || defined(MACOSXplatform)
- bsdSignal(SIGCHLD,endChild,DontRestartSystemCalls);
-#else
- bsdSignal(SIGCLD,endChild,DontRestartSystemCalls);
-#endif
- }
- }
- ret_val = select(n, (void *)rd, (void *)wr, (void *)ex, (void *)timeout);
- }
- return ret_val;
-}
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/viewman.c.pamphlet b/src/graph/viewman/viewman.c
index f90fe853..63136731 100644
--- a/src/graph/viewman/viewman.c.pamphlet
+++ b/src/graph/viewman/viewman.c
@@ -1,51 +1,37 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/graph/viewman viewman.c}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
/*
-Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-All rights reserved.
+ Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+ All rights reserved.
+ Copyright (C) 2007-2008, Gabriel Dos Reis.
+ All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
+ 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 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.
+ - 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.
+ - 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 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.
*/
-@
-<<*>>=
-<<license>>
#define _VIEWMAN_C
#include "axiom-c-macros.h"
@@ -166,19 +152,19 @@ main (void)
fprintf(stderr,"Reading child viewport...\n");
#endif
readViewport(slot,&viewCommand,intSize);
-
+
switch (viewCommand) {
-
+
case pick2D:
#ifdef DEBUG
fprintf(stderr,"viewman: Doing 2D pick\n");
#endif
picked = yes;
-
+
readViewport(slot,&currentGraph,intSize); /* get the graph to pick */
readViewport(slot,&currentGraphState,sizeof(graphStateStruct));
break;
-
+
case drop2D:
#ifdef DEBUG
fprintf(stderr,"viewman: Doing 2D drop\n");
@@ -192,7 +178,7 @@ main (void)
fprintf(stderr,"The viewport manager cannot drop a graph because nothing has been picked yet.\n");
}
break;
-
+
case viewportClosing:
#ifdef DEBUG
fprintf(stderr,"viewman: closing viewport\n");
@@ -201,7 +187,7 @@ main (void)
break;
}; /* switch */
-
+
}; /* if reading slot->viewIn */
stepSlot = slot;
slot = slot->nextViewport;
@@ -223,18 +209,18 @@ main (void)
#endif
if (viewCommand == makeViewport)
forkView3D(view3DType);
- else
- funView3D(viewCommand);
+ else
+ funView3D(viewCommand);
break;
-
+
case viewTubeType:
#ifdef DEBUG
fprintf(stderr,"viewman: viewing a tube\n");
#endif
if (viewCommand == makeViewport)
forkView3D(viewTubeType);
- else
+ else
funView3D(viewCommand);
break;
@@ -252,7 +238,7 @@ main (void)
case view2DType:
#ifdef DEBUG
- fprintf(stderr,"viewman: forking 2D\n");
+ fprintf(stderr,"viewman: forking 2D\n");
#endif
if (viewCommand == makeViewport) {
forkView2D();
@@ -268,9 +254,3 @@ main (void)
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/graph/viewman/viewman.h b/src/graph/viewman/viewman.h
index 3935f087..3935f087 100755..100644
--- a/src/graph/viewman/viewman.h
+++ b/src/graph/viewman/viewman.h