From 6a0809d42bbfb8ae3c00431c69bff92f38e5739c Mon Sep 17 00:00:00 2001
From: dos-reis <gdr@axiomatics.org>
Date: Sat, 8 Mar 2008 19:09:18 +0000
Subject: 	* include/sockio.h: Rename from sockio-c.H1. 	*
 clef/edible.c: Don't include useproto.h.  Include sockio.h 	*
 graph/view3D/surface3d.c.pamphlet: Likewise. 	*
 graph/viewman/fun2D.c.pamphlet: Likewise. 	*
 graph/viewman/fun3D.c.pamphlet: Likewise. 	*
 graph/viewman/make2D.c.pamphlet: Likewise. 	*
 graph/viewman/make3D.c.pamphlet: Likewise. 	*
 graph/viewman/makeGraph.c.pamphlet: Likewise. 	*
 graph/viewman/sselect.c.pamphlet: Likewise. 	*
 graph/viewman/viewman.c.pamphlet: Likewise. 	* graph/viewman/viewman.h:
 Likewise. 	* hyper/ReadBitmap.c: Likewise. 	* hyper/addfile.c:
 Likewise. 	* hyper/cond.c: Likewise. 	* hyper/debug.c: Likewise. 
 * hyper/dialog.c: Likewise. 	* hyper/display.c: Likewise. 	*
 hyper/event.c: Likewise. 	* hyper/ex2ht.c: Likewise. 	*
 hyper/extent1.c: Likewise. 	* hyper/extent2.c: Likewise. 	*
 hyper/form-ext.c: Likewise. 	* hyper/group.c: Likewise. 	*
 hyper/halloc.c: Likewise. 	* hyper/hash.c: Likewise. 	*
 hyper/htadd.c: Likewise. 	* hyper/hterror.c: Likewise. 	*
 hyper/htinp.c: Likewise. 	* hyper/hyper.c: Likewise. 	*
 hyper/initx.c: Likewise. 	* hyper/input.c: Likewise. 	*
 hyper/item.c: Likewise. 	* hyper/keyin.c: Likewise. 	* hyper/lex.c:
 Likewise. 	* hyper/macro.c: Likewise. 	* hyper/mem.c: Likewise. 
 * hyper/parse-aux.c: Likewise. 	* hyper/parse-input.c: Likewise. 
 * hyper/parse-paste.c: Likewise. 	* hyper/parse-types.c: Likewise. 
 * hyper/parse.c: Likewise. 	* hyper/scrollbar.c: Likewise. 	*
 hyper/show-types.c: Likewise. 	* hyper/spadbuf.c: Likewise. 	*
 hyper/spadint.c: Likewise. 	* hyper/titlebar.c: Likewise. 	*
 lib/sockio-c.c: Likewise. 	* sman/session.c: Likewise. 	* sman/sman.c:
 Likewise. 	* include/useproto.h: Remove.

---
 src/ChangeLog                          |  53 +++++++++
 src/clef/edible.c                      |   7 +-
 src/graph/view3D/process3d.c.pamphlet  |   2 +-
 src/graph/view3D/surface3d.c.pamphlet  |   2 +-
 src/graph/viewman/fun2D.c.pamphlet     |   2 +-
 src/graph/viewman/fun3D.c.pamphlet     |   2 +-
 src/graph/viewman/make2D.c.pamphlet    |   2 +-
 src/graph/viewman/make3D.c.pamphlet    |   3 +-
 src/graph/viewman/makeGraph.c.pamphlet |   3 +-
 src/graph/viewman/sselect.c.pamphlet   |   3 +-
 src/graph/viewman/viewman.c.pamphlet   |   3 +-
 src/graph/viewman/viewman.h            |  63 +++++------
 src/hyper/ReadBitmap.c                 |  65 ++++++------
 src/hyper/addfile.c                    |   3 +-
 src/hyper/cond.c                       |   5 +-
 src/hyper/debug.c                      |   2 +-
 src/hyper/dialog.c                     |   3 +-
 src/hyper/display.c                    |   5 +-
 src/hyper/event.c                      |   6 +-
 src/hyper/ex2ht.c                      |   2 +-
 src/hyper/extent1.c                    |   3 +-
 src/hyper/extent2.c                    |   5 +-
 src/hyper/form-ext.c                   |   3 +-
 src/hyper/group.c                      |   5 +-
 src/hyper/halloc.c                     |   2 +-
 src/hyper/hash.c                       |   2 +-
 src/hyper/htadd.c                      |   3 +-
 src/hyper/hterror.c                    |   3 +-
 src/hyper/htinp.c                      |   5 +-
 src/hyper/hyper.c                      |   7 +-
 src/hyper/initx.c                      |   4 +-
 src/hyper/input.c                      |   4 +-
 src/hyper/item.c                       |   2 +-
 src/hyper/keyin.c                      |   4 +-
 src/hyper/lex.c                        |   5 +-
 src/hyper/macro.c                      |   4 +-
 src/hyper/mem.c                        |   4 +-
 src/hyper/parse-aux.c                  |   4 +-
 src/hyper/parse-input.c                |   4 +-
 src/hyper/parse-paste.c                |   4 +-
 src/hyper/parse-types.c                |   4 +-
 src/hyper/parse.c                      |   4 +-
 src/hyper/scrollbar.c                  |   4 +-
 src/hyper/show-types.c                 |   4 +-
 src/hyper/spadbuf.c                    |   5 +-
 src/hyper/spadint.c                    |   6 +-
 src/hyper/titlebar.c                   |   4 +-
 src/include/com.h                      | 145 ++++++-------------------
 src/include/sockio-c.H1                |  64 -----------
 src/include/sockio.h                   | 189 +++++++++++++++++++++++++++++++++
 src/include/useproto.h                 |  72 -------------
 src/include/view.h                     |  64 +++++------
 src/lib/sockio-c.c                     |   3 +-
 src/sman/session.c                     |   4 +-
 src/sman/sman.c                        |   4 +-
 src/sman/spadclient.c                  |  55 +++++-----
 56 files changed, 497 insertions(+), 447 deletions(-)
 delete mode 100644 src/include/sockio-c.H1
 create mode 100644 src/include/sockio.h
 delete mode 100644 src/include/useproto.h

(limited to 'src')

diff --git a/src/ChangeLog b/src/ChangeLog
index 901055a9..80a4b9ba 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,56 @@
+2008-03-08  Gabriel Dos Reis  <gdr@cs.tamu.edu>
+
+	* include/sockio.h: Rename from sockio-c.H1.
+	* clef/edible.c: Don't include useproto.h.  Include sockio.h
+	* graph/view3D/surface3d.c.pamphlet: Likewise.
+	* graph/viewman/fun2D.c.pamphlet: Likewise.
+	* graph/viewman/fun3D.c.pamphlet: Likewise.
+	* graph/viewman/make2D.c.pamphlet: Likewise.
+	* graph/viewman/make3D.c.pamphlet: Likewise.
+	* graph/viewman/makeGraph.c.pamphlet: Likewise.
+	* graph/viewman/sselect.c.pamphlet: Likewise.
+	* graph/viewman/viewman.c.pamphlet: Likewise.
+	* graph/viewman/viewman.h: Likewise.
+	* hyper/ReadBitmap.c: Likewise.
+	* hyper/addfile.c: Likewise.
+	* hyper/cond.c: Likewise.
+	* hyper/debug.c: Likewise.
+	* hyper/dialog.c: Likewise.
+	* hyper/display.c: Likewise.
+	* hyper/event.c: Likewise.
+	* hyper/ex2ht.c: Likewise.
+	* hyper/extent1.c: Likewise.
+	* hyper/extent2.c: Likewise.
+	* hyper/form-ext.c: Likewise.
+	* hyper/group.c: Likewise.
+	* hyper/halloc.c: Likewise.
+	* hyper/hash.c: Likewise.
+	* hyper/htadd.c: Likewise.
+	* hyper/hterror.c: Likewise.
+	* hyper/htinp.c: Likewise.
+	* hyper/hyper.c: Likewise.
+	* hyper/initx.c: Likewise.
+	* hyper/input.c: Likewise.
+	* hyper/item.c: Likewise.
+	* hyper/keyin.c: Likewise.
+	* hyper/lex.c: Likewise.
+	* hyper/macro.c: Likewise.
+	* hyper/mem.c: Likewise.
+	* hyper/parse-aux.c: Likewise.
+	* hyper/parse-input.c: Likewise.
+	* hyper/parse-paste.c: Likewise.
+	* hyper/parse-types.c: Likewise.
+	* hyper/parse.c: Likewise.
+	* hyper/scrollbar.c: Likewise.
+	* hyper/show-types.c: Likewise.
+	* hyper/spadbuf.c: Likewise.
+	* hyper/spadint.c: Likewise.
+	* hyper/titlebar.c: Likewise.
+	* lib/sockio-c.c: Likewise.
+	* sman/session.c: Likewise.
+	* sman/sman.c: Likewise.
+	* include/useproto.h: Remove.
+
 2008-03-07  Gabriel Dos Reis  <gdr@cs.tamu.edu>
 
 	* hyper/: De-pamphletize.
diff --git a/src/clef/edible.c b/src/clef/edible.c
index f9093f58..bfe76a91 100644
--- a/src/clef/edible.c
+++ b/src/clef/edible.c
@@ -1,5 +1,7 @@
 /*
-    Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+    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
@@ -32,7 +34,7 @@
 */
 
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -51,6 +53,7 @@
 
 
 #include "axiom-c-macros.h"
+#include "sockio.h"
 #include "edible.h"
 #include "com.h"
 #include "bsdsignal.h"
diff --git a/src/graph/view3D/process3d.c.pamphlet b/src/graph/view3D/process3d.c.pamphlet
index 3fdc608f..d6174388 100644
--- a/src/graph/view3D/process3d.c.pamphlet
+++ b/src/graph/view3D/process3d.c.pamphlet
@@ -49,7 +49,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define _PROCESS3D_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
 
 #include <string.h>
 #include <stdlib.h>
@@ -65,6 +64,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "mode.h"
 #include "process.h"
 #include "draw.h"
+#include "sockio.h"
 #include "com.h"
 
 
diff --git a/src/graph/view3D/surface3d.c.pamphlet b/src/graph/view3D/surface3d.c.pamphlet
index cb2bacc4..030f03bf 100644
--- a/src/graph/view3D/surface3d.c.pamphlet
+++ b/src/graph/view3D/surface3d.c.pamphlet
@@ -49,7 +49,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define _SURFACE3D_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
 
 #include <string.h>
 #include <math.h>
@@ -58,6 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "header.h"
 #include "draw.h"
 #include "mode.h"   /* for #define components */
+#include "sockio.h"
 #include "com.h"
 
 #include "XSpadFill.H1"
diff --git a/src/graph/viewman/fun2D.c.pamphlet b/src/graph/viewman/fun2D.c.pamphlet
index 6556ac17..576e2696 100644
--- a/src/graph/viewman/fun2D.c.pamphlet
+++ b/src/graph/viewman/fun2D.c.pamphlet
@@ -62,7 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "actions.h"
 
 #include "util.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "fun2D.H1"
 #include "readView.H1"
 #include "make2D.H1"
diff --git a/src/graph/viewman/fun3D.c.pamphlet b/src/graph/viewman/fun3D.c.pamphlet
index bb88e710..c8005182 100644
--- a/src/graph/viewman/fun3D.c.pamphlet
+++ b/src/graph/viewman/fun3D.c.pamphlet
@@ -61,7 +61,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "actions.h"
   
 #include "util.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "fun3D.H1"
 #include "make3D.H1"
 #include "readView.H1"
diff --git a/src/graph/viewman/make2D.c.pamphlet b/src/graph/viewman/make2D.c.pamphlet
index 668a0aae..35069f4c 100644
--- a/src/graph/viewman/make2D.c.pamphlet
+++ b/src/graph/viewman/make2D.c.pamphlet
@@ -53,7 +53,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "viewman.h"
 
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "make2D.H1"
 
 void 
diff --git a/src/graph/viewman/make3D.c.pamphlet b/src/graph/viewman/make3D.c.pamphlet
index b2eb99ed..61d84c82 100644
--- a/src/graph/viewman/make3D.c.pamphlet
+++ b/src/graph/viewman/make3D.c.pamphlet
@@ -49,14 +49,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define _MAKE3D_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
 
 #include <stdlib.h>
 
 #include "viewman.h"
 #include "mode.h"
 
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "make3D.H1"
 
 void 
diff --git a/src/graph/viewman/makeGraph.c.pamphlet b/src/graph/viewman/makeGraph.c.pamphlet
index 66caa9c3..39e9b2c6 100644
--- a/src/graph/viewman/makeGraph.c.pamphlet
+++ b/src/graph/viewman/makeGraph.c.pamphlet
@@ -49,14 +49,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define _MAKEGRAPH_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
 
 #include <stdlib.h>
 #include <stdio.h>
 
 #include "viewman.h"
 
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "makeGraph.H1"
 
 graphStruct *
diff --git a/src/graph/viewman/sselect.c.pamphlet b/src/graph/viewman/sselect.c.pamphlet
index 6236fa01..929ced90 100644
--- a/src/graph/viewman/sselect.c.pamphlet
+++ b/src/graph/viewman/sselect.c.pamphlet
@@ -49,7 +49,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define _SSELECT_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
 
 #include <stdio.h>
 #include <errno.h>
@@ -60,7 +59,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "viewman.h"
 #include "bsdsignal.h"
 
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "bsdsignal.H1"
 #include "cleanup.H1"
 #include "sselect.H1"
diff --git a/src/graph/viewman/viewman.c.pamphlet b/src/graph/viewman/viewman.c.pamphlet
index 6398a0b4..f90fe853 100644
--- a/src/graph/viewman/viewman.c.pamphlet
+++ b/src/graph/viewman/viewman.c.pamphlet
@@ -49,7 +49,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #define _VIEWMAN_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
 
 #include <unistd.h>
 #include <sys/time.h>
@@ -70,7 +69,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "bsdsignal.H1"
 #include "util.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "fun2D.H1"
 #include "fun3D.H1"
 #include "makeGraph.H1"
diff --git a/src/graph/viewman/viewman.h b/src/graph/viewman/viewman.h
index 3c54c576..3935f087 100755
--- a/src/graph/viewman/viewman.h
+++ b/src/graph/viewman/viewman.h
@@ -1,34 +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.
+  Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.
+  All rights reserved.
+  Copyriht (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.
 */
 
 #include "view2D.h"
@@ -46,5 +48,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define no 0
 
 
+#include "sockio.h"
 #include "com.h"
 #include "globalsM.h"
diff --git a/src/hyper/ReadBitmap.c b/src/hyper/ReadBitmap.c
index 7eb09303..578c8e3c 100644
--- a/src/hyper/ReadBitmap.c
+++ b/src/hyper/ReadBitmap.c
@@ -1,41 +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.
+  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 _READBITMAP_C
 
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
+#include "sockio.h"
 #include "hyper.h"
 
 #include "all_hyper_proto.H1"
diff --git a/src/hyper/addfile.c b/src/hyper/addfile.c
index c7df3f1a..2eef5664 100644
--- a/src/hyper/addfile.c
+++ b/src/hyper/addfile.c
@@ -34,9 +34,10 @@
 */
 
 #define _ADDFILE_C
-#include "useproto.h"
+
 #include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 #include "addfile.h"
 
diff --git a/src/hyper/cond.c b/src/hyper/cond.c
index c619d9e0..d60e7a82 100644
--- a/src/hyper/cond.c
+++ b/src/hyper/cond.c
@@ -42,13 +42,14 @@
  ****************************************************************************/
 #define _COND_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 
 #include "all_hyper_proto.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 
 
 void
diff --git a/src/hyper/debug.c b/src/hyper/debug.c
index 98c7d3c8..2b0d1836 100644
--- a/src/hyper/debug.c
+++ b/src/hyper/debug.c
@@ -35,7 +35,7 @@
 
 #define  _DEBUG_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
 #ifdef free
diff --git a/src/hyper/dialog.c b/src/hyper/dialog.c
index f955e783..a65b3ae8 100644
--- a/src/hyper/dialog.c
+++ b/src/hyper/dialog.c
@@ -42,9 +42,10 @@
  ****************************************************************************/
 #define _DIALOG_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 #include "keyin.h"
 #include "display.h"
diff --git a/src/hyper/display.c b/src/hyper/display.c
index 9ffe6c96..7e9d364a 100644
--- a/src/hyper/display.c
+++ b/src/hyper/display.c
@@ -50,11 +50,12 @@
  *      use the value of page->y_off as an offset into the scrolling
  *      region to compute what is actually to be displayed on the page.
  */
+
 #define _DISPLAY_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 
 #include "extent.h"
 #include "hyper.h"
diff --git a/src/hyper/event.c b/src/hyper/event.c
index 5066fc1e..1813576e 100644
--- a/src/hyper/event.c
+++ b/src/hyper/event.c
@@ -35,10 +35,10 @@
 
 #define _EVENT_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 
 #include <X11/X.h>
@@ -64,7 +64,7 @@
 #include "group.h"
 
 #include "all_hyper_proto.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 
 jmp_buf env;
 Window gActiveWindow;
diff --git a/src/hyper/ex2ht.c b/src/hyper/ex2ht.c
index e09106bb..0d21673e 100644
--- a/src/hyper/ex2ht.c
+++ b/src/hyper/ex2ht.c
@@ -38,7 +38,7 @@
 
 #define _EX2HT_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/hyper/extent1.c b/src/hyper/extent1.c
index a18dbfd8..2c89944e 100644
--- a/src/hyper/extent1.c
+++ b/src/hyper/extent1.c
@@ -42,10 +42,11 @@
  ****************************************************************************/
 #define _EXTENT1_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
 
+#include "sockio.h"
 #include "extent.h"
 #include "hyper.h"
 #include "group.h"
diff --git a/src/hyper/extent2.c b/src/hyper/extent2.c
index 5a7a6848..40ed44a6 100644
--- a/src/hyper/extent2.c
+++ b/src/hyper/extent2.c
@@ -40,12 +40,13 @@
  * Copyright The Numerical Algorithms Group Limited 1991, 1992, 1993.
  *
  ****************************************************************************/
+
 #define _EXTENT2_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "extent.h"
 #include "group.h"
 #include "titlebar.h"
diff --git a/src/hyper/form-ext.c b/src/hyper/form-ext.c
index f33babfd..db817355 100644
--- a/src/hyper/form-ext.c
+++ b/src/hyper/form-ext.c
@@ -35,9 +35,10 @@
 
 #define _FORM_EXT_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
+#include "sockio.h"
 #include "extent.h"
 #include "group.h"
 #include "scrollbar.h"
diff --git a/src/hyper/group.c b/src/hyper/group.c
index 700ba42e..de347b7e 100644
--- a/src/hyper/group.c
+++ b/src/hyper/group.c
@@ -40,11 +40,12 @@
  * Copyright The Numerical Algorithms Group Limited 1991, 1992, 1993.
  *
  ****************************************************************************/
+
 #define _GROUP_C
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "group.h"
 #include "initx.h"
 
diff --git a/src/hyper/halloc.c b/src/hyper/halloc.c
index 2c923850..acdfb87e 100644
--- a/src/hyper/halloc.c
+++ b/src/hyper/halloc.c
@@ -35,7 +35,7 @@
 
 #define _HALLOC_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/hyper/hash.c b/src/hyper/hash.c
index 515c935c..a9a6c00e 100644
--- a/src/hyper/hash.c
+++ b/src/hyper/hash.c
@@ -35,7 +35,7 @@
 
 #define _HASH_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
 #include <stdio.h>
diff --git a/src/hyper/htadd.c b/src/hyper/htadd.c
index 02ec8f84..36595751 100644
--- a/src/hyper/htadd.c
+++ b/src/hyper/htadd.c
@@ -38,7 +38,8 @@
 
 #define _HTADD_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
+#include "sockio.h"
 #include "hyper.h"
 #include <sys/stat.h>
 #include <errno.h>
diff --git a/src/hyper/hterror.c b/src/hyper/hterror.c
index 8cd1e665..f5831f83 100644
--- a/src/hyper/hterror.c
+++ b/src/hyper/hterror.c
@@ -37,9 +37,10 @@
 #define HTERROR
 
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
+#include "sockio.h"
 #include "lex.h"
 #include "parse.h"
 
diff --git a/src/hyper/htinp.c b/src/hyper/htinp.c
index 30d975ad..5c129de8 100644
--- a/src/hyper/htinp.c
+++ b/src/hyper/htinp.c
@@ -35,20 +35,21 @@
 
 #define _HTINP_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
 #include <sys/stat.h>
 #include <sys/signal.h>
 #include <setjmp.h>
 
+#include "sockio.h"
 #include "hyper.h"
 #include "group.h"
 #include "parse.h"
 #include "bsdsignal.h"
 
 #include "all_hyper_proto.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "bsdsignal.H1"
 
 extern char **input_file_list;
diff --git a/src/hyper/hyper.c b/src/hyper/hyper.c
index 627c3ca3..1b71b76e 100644
--- a/src/hyper/hyper.c
+++ b/src/hyper/hyper.c
@@ -42,11 +42,12 @@
 /* #define DEBUG         1 */
 
 /* Include all the needed include files  */
+
 #define _HYPER_C
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 
 #include <sys/signal.h>
@@ -62,7 +63,7 @@
 #include "bsdsignal.h"
 
 #include "all_hyper_proto.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "bsdsignal.H1"
 /*
  * Here is a flag used to tell me whether I made a good connection to the
diff --git a/src/hyper/initx.c b/src/hyper/initx.c
index b2f85e59..7565e54c 100644
--- a/src/hyper/initx.c
+++ b/src/hyper/initx.c
@@ -45,9 +45,9 @@
 
 #define _INITX_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "initx.h"
 
 #include <unistd.h>
diff --git a/src/hyper/input.c b/src/hyper/input.c
index 725b9ace..36901184 100644
--- a/src/hyper/input.c
+++ b/src/hyper/input.c
@@ -35,9 +35,9 @@
 
 #define _INPUT_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "hyper.h"
 
 #include "all_hyper_proto.H1"
diff --git a/src/hyper/item.c b/src/hyper/item.c
index 18311ec8..8ba00b43 100644
--- a/src/hyper/item.c
+++ b/src/hyper/item.c
@@ -34,7 +34,7 @@
 */
 
 #include "axiom-c-macros.h"
-#include "useproto.h"
+#include "sockio.h"
 #define _ITEM_C
 #include "debug.h"
 #include "extent.h"
diff --git a/src/hyper/keyin.c b/src/hyper/keyin.c
index b6d2004e..27639c14 100644
--- a/src/hyper/keyin.c
+++ b/src/hyper/keyin.c
@@ -42,10 +42,10 @@
  ****************************************************************************/
 #define _KEYIN_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 #include "keyin.h"
 #include "event.h"
diff --git a/src/hyper/lex.c b/src/hyper/lex.c
index 6b4bf6d5..67de1459 100644
--- a/src/hyper/lex.c
+++ b/src/hyper/lex.c
@@ -58,8 +58,9 @@
  */
 #define _LEX_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
+#include "sockio.h"
 
 int useAscii;
 
@@ -70,7 +71,7 @@ int useAscii;
 #include "lex.h"
 
 #include "all_hyper_proto.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 
 
 #include <ctype.h>
diff --git a/src/hyper/macro.c b/src/hyper/macro.c
index 80bd3dc6..7d681c78 100644
--- a/src/hyper/macro.c
+++ b/src/hyper/macro.c
@@ -35,9 +35,9 @@
 
 #define _MACRO_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "parse.h"
 #include "hyper.h"
 
diff --git a/src/hyper/mem.c b/src/hyper/mem.c
index 6f2cb646..e38e90ca 100644
--- a/src/hyper/mem.c
+++ b/src/hyper/mem.c
@@ -41,10 +41,10 @@
  *
  ****************************************************************************/
 #define _MEM_C
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 #include "group.h"
 #include "event.h"
diff --git a/src/hyper/parse-aux.c b/src/hyper/parse-aux.c
index 09972872..b8938693 100644
--- a/src/hyper/parse-aux.c
+++ b/src/hyper/parse-aux.c
@@ -35,9 +35,9 @@
 
 #include "axiom-c-macros.h"
 #define _PARSE_AUX_C
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "parse.h"
 #include "addfile.h"
 #include "lex.h"
diff --git a/src/hyper/parse-input.c b/src/hyper/parse-input.c
index bdaee8da..961fe623 100644
--- a/src/hyper/parse-input.c
+++ b/src/hyper/parse-input.c
@@ -42,9 +42,9 @@
   RadioBox.
   ****/
 
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "parse.h"
 #include "lex.h"
 #include "hyper.h"
diff --git a/src/hyper/parse-paste.c b/src/hyper/parse-paste.c
index 3cd35b1f..264c773b 100644
--- a/src/hyper/parse-paste.c
+++ b/src/hyper/parse-paste.c
@@ -42,10 +42,10 @@
  ****************************************************************************/
 #define _PARSE_PASTE_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "parse.h"
 #include "hyper.h"
 #include "display.h"
diff --git a/src/hyper/parse-types.c b/src/hyper/parse-types.c
index 047423e9..2e42a205 100644
--- a/src/hyper/parse-types.c
+++ b/src/hyper/parse-types.c
@@ -42,9 +42,9 @@
  ****************************************************************************/
 #define _PARSE_TYPES_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "parse.h"
 #include "parse-types.h"
 #include "hyper.h"
diff --git a/src/hyper/parse.c b/src/hyper/parse.c
index 92703cc6..f2282270 100644
--- a/src/hyper/parse.c
+++ b/src/hyper/parse.c
@@ -34,9 +34,9 @@
 */
 
 #define _PARSE_C
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "parse.h"
 #include "parse-paste.h"
 #include "parse-types.h"
diff --git a/src/hyper/scrollbar.c b/src/hyper/scrollbar.c
index 734054aa..ae0a92a8 100644
--- a/src/hyper/scrollbar.c
+++ b/src/hyper/scrollbar.c
@@ -42,9 +42,9 @@
  ****************************************************************************/
 #define _SCROLLBAR_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
+#include "sockio.h"
 #include "extent.h"
 #include "display.h"
 #include "group.h"
diff --git a/src/hyper/show-types.c b/src/hyper/show-types.c
index 50413414..0d355c38 100644
--- a/src/hyper/show-types.c
+++ b/src/hyper/show-types.c
@@ -42,10 +42,10 @@
  ****************************************************************************/
 #define _SHOW_TYPES_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
-#include "debug.h"
 
+#include "debug.h"
 
+#include "sockio.h"
 #include "hyper.h"
 #include "display.h"
 #include "extent.h"
diff --git a/src/hyper/spadbuf.c b/src/hyper/spadbuf.c
index 46f6dbd4..42b3f482 100644
--- a/src/hyper/spadbuf.c
+++ b/src/hyper/spadbuf.c
@@ -35,7 +35,7 @@
 
 #define _SPADBUF_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
 #include <termios.h>
@@ -52,12 +52,13 @@
 #endif
 
 #include "bsdsignal.h"
+#include "sockio.h"
 #include "edible.h"
 #include "com.h"
 
 #include "spadbuf.H1"
 #include "bsdsignal.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "edin.H1"
 #include "wct.H1"
 #include "prt.H1"
diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c
index eb90c2fa..da149b8d 100644
--- a/src/hyper/spadint.c
+++ b/src/hyper/spadint.c
@@ -38,17 +38,17 @@
 /* Communication interface for external AXIOM buffers */
 #define _SPADINT_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
 #include <signal.h>
-
+#include "sockio.h"
 #include "hyper.h"
 #include "parse.h"
 #include "bsdsignal.h"
 
 #include "all_hyper_proto.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "bsdsignal.H1"
 
 
diff --git a/src/hyper/titlebar.c b/src/hyper/titlebar.c
index 51ff3696..e3ea0f56 100644
--- a/src/hyper/titlebar.c
+++ b/src/hyper/titlebar.c
@@ -42,11 +42,11 @@
  ****************************************************************************/
 #define _TITLEBAR_C
 #include "axiom-c-macros.h"
-#include "useproto.h"
+
 #include "debug.h"
 
 #include <stdlib.h>
-
+#include "sockio.h"
 #include "titlebar.h"
 #include "display.h"
 #include "group.h"
diff --git a/src/include/com.h b/src/include/com.h
index 9dfca2d1..520e4aae 100644
--- a/src/include/com.h
+++ b/src/include/com.h
@@ -1,121 +1,40 @@
 /*
-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 resrved.
+
+  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 AXIOM_COM_H_INCLUDED
 #define AXIOM_COM_H_INCLUDED
-
-#ifdef __MINGW32__
-#  include <winsock2.h>
-#else
-#  include <sys/types.h>
-#  include <sys/socket.h>
-#  include <netinet/in.h>
-#endif
-
-#include "axiom-c-macros.h"
-
-/* On Windows, a socket identifier is not a file descriptor.  It is
-   represented by an integer type, but that integer type is not just
-   plain int as in the Unix world.  It is an unsigned integer.
-   Consequently, we abstract over that variation, using the typedef
-   axiom_socket.  */
-
-#ifdef __MINGW32__
-typedef SOCKET axiom_socket;
-#else
-typedef int axiom_socket;
-#endif
-
-
-/* Close a socket communication endpoint.  */
-extern void axiom_close_socket(axiom_socket);
-
-typedef struct {
-  axiom_socket socket;  /* socket number returned by "socket" call */
-  int type;             /* socket type (AF_UNIX or AF_INET) */
-  int purpose;          /* can be SessionManager, GraphicsServer, etc. */
-  int pid;              /* process ID of connected socket */
-  int frame;            /* spad interpreter frame (for interpreter windows) */
-  axiom_socket remote;  /* file descriptor of remote socket */
-  union {
-    struct sockaddr u_addr;
-    struct sockaddr_in i_addr;
-  } addr;
-  char *host_name;      /* name of foreign host if type == AF_INET */
-} Sock;
-
-
-#define MaxClients      150
-
-/* possible socket types (purpose) */
-
-#define SessionManager  1
-#define ViewportServer  2
-#define MenuServer      3
-#define SessionIO       4
-#define BaloonServer    5
-#define InterpWindow    6
-#define KillSpad        7
-#define DebugWindow     8  /* used for nagman */
-#define Forker          9
-#define AV              10 /*Simon's algebraic viewer */
-
-#define Acknowledge     255
-
-/* Timeout value for connection to remote socket */
-
-#define Forever 0
-
-/* Socket name for local AXIOM server and session manager */
-
-#define SpadServer              "/tmp/.d"
-#define SessionServer           "/tmp/.s"
-#define SessionIOName           "/tmp/.i"
-#define MenuServerName          "/tmp/.h"
-#define ForkServerName          "/tmp/.f"
-
-
-#define MASK_SIZE       (NBBY*sizeof(fd_set))
-
-
-/* table of dedicated socket types */
-
-extern Sock *purpose_table[];
-extern Sock server[];
-extern Sock clients[];
-extern fd_set socket_mask;
-extern fd_set server_mask;
-
 /* Commands sent over the AXIOM session manager or menu socket */
 
 #define CreateFrame             1
diff --git a/src/include/sockio-c.H1 b/src/include/sockio-c.H1
deleted file mode 100644
index cc8360a3..00000000
--- a/src/include/sockio-c.H1
+++ /dev/null
@@ -1,64 +0,0 @@
-extern int get_int(Sock * );
-extern char * get_string(Sock * );
-extern double get_float(Sock * );
-extern Sock * connect_to_local_server(char *  , int  , int );
-extern int sread(Sock *  , char *  , int  , char * );
-extern double plus_infinity(void );
-extern double minus_infinity(void );
-extern double NANQ(void );
-extern void sigpipe_handler(int );
-extern int wait_for_client_read(Sock *  , char *  , int  , char * );
-extern int wait_for_client_write(Sock *  , char *  , int  , char * );
-extern int swrite(Sock *  , char *  , int  , char * );
-extern int sselect(int  , fd_set *  , fd_set *  , fd_set *  , void * );
-extern int fill_buf(Sock *  , char *  , int  , char * );
-extern int sock_get_int(int );
-extern int get_ints(Sock *  , int *  , int );
-extern int sock_get_ints(int  , int *  , int );
-extern int send_int(Sock *  , int );
-extern int sock_send_int(int  , int );
-extern int send_ints(Sock *  , int *  , int );
-extern int sock_send_ints(int  , int *  , int );
-extern int send_string(Sock *  , char * );
-extern int send_string_len(Sock *  , char *  , int );
-extern int sock_send_string(int  , char * );
-extern int sock_send_string_len(int  , char *  , int );
-extern int send_strings(Sock *  , char * *  , int );
-extern int sock_send_strings(int  , char * *  , int );
-extern char * sock_get_string(int );
-extern char * get_string_buf(Sock *  , char *  , int );
-extern char * sock_get_string_buf(int  , char *  , int );
-extern int get_strings(Sock *  , char * *  , int );
-extern int sock_get_strings(int  , char * *  , int );
-extern int send_float(Sock *  , double );
-extern int sock_send_float(int  , double );
-extern int send_sfloats(Sock *  , float *  , int );
-extern int sock_send_sfloats(int  , float *  , int );
-extern int send_floats(Sock *  , double *  , int );
-extern int sock_send_floats(int  , double *  , int );
-extern double sock_get_float(int );
-extern int get_sfloats(Sock *  , float *  , int );
-extern int sock_get_sfloats(int  , float *  , int );
-extern int get_floats(Sock *  , double *  , int );
-extern int sock_get_floats(int  , double *  , int );
-extern int wait_for_client_kill(Sock *  , int );
-extern int sock_get_remote_fd(int );
-extern int send_signal(Sock *  , int );
-extern int sock_send_signal(int  , int );
-extern int send_wakeup(Sock * );
-extern int sock_send_wakeup(int );
-extern Sock * connect_to_local_server_new(char *  , int  , int );
-extern void remote_stdio(Sock * );
-extern void init_purpose_table(void );
-extern int make_server_number(void );
-extern void close_socket(axiom_socket, char * );
-extern int make_server_name(char *  , char * );
-extern int open_server(char * );
-extern int accept_connection(Sock * );
-extern void get_socket_type(Sock * );
-extern int sock_accept_connection(int );
-extern void redirect_stdio(Sock * );
-extern void init_socks(void );
-extern int server_switch(void );
-extern void flush_stdout(void );
-extern void print_line(char * );
diff --git a/src/include/sockio.h b/src/include/sockio.h
new file mode 100644
index 00000000..5b4f7d9f
--- /dev/null
+++ b/src/include/sockio.h
@@ -0,0 +1,189 @@
+/*
+  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.
+*/
+
+#ifndef OPENAXIOM_SOCKIO_included
+#define OPENAXIOM_SOCKIO_included
+
+
+#ifdef __MINGW32__
+#  include <winsock2.h>
+#else
+#  include <sys/types.h>
+#  include <sys/socket.h>
+#  include <netinet/in.h>
+#endif
+
+#include "axiom-c-macros.h"
+
+/* On Windows, a socket identifier is not a file descriptor.  It is
+   represented by an integer type, but that integer type is not just
+   plain int as in the Unix world.  It is an unsigned integer.
+   Consequently, we abstract over that variation, using the typedef
+   axiom_socket.  */
+
+#ifdef __MINGW32__
+typedef SOCKET axiom_socket;
+#else
+typedef int axiom_socket;
+#endif
+
+
+/* Close a socket communication endpoint.  */
+extern void axiom_close_socket(axiom_socket);
+
+typedef struct {
+  axiom_socket socket;  /* socket number returned by "socket" call */
+  int type;             /* socket type (AF_UNIX or AF_INET) */
+  int purpose;          /* can be SessionManager, GraphicsServer, etc. */
+  int pid;              /* process ID of connected socket */
+  int frame;            /* spad interpreter frame (for interpreter windows) */
+  axiom_socket remote;  /* file descriptor of remote socket */
+  union {
+    struct sockaddr u_addr;
+    struct sockaddr_in i_addr;
+  } addr;
+  char *host_name;      /* name of foreign host if type == AF_INET */
+} Sock;
+
+
+extern int get_int(Sock*);
+extern char* get_string(Sock*);
+extern double get_float(Sock*);
+extern Sock* connect_to_local_server(char*, int, int);
+extern int sread(Sock*, char*, int, char*);
+extern double plus_infinity(void);
+extern double minus_infinity(void);
+extern double NANQ(void);
+extern void sigpipe_handler(int);
+extern int wait_for_client_read(Sock*, char*, int, char*);
+extern int wait_for_client_write(Sock*, char*, int, char*);
+extern int swrite(Sock*, char*, int, char*);
+extern int sselect(int, fd_set*, fd_set*, fd_set*, void*);
+extern int fill_buf(Sock*, char*, int, char*);
+extern int sock_get_int(int);
+extern int get_ints(Sock*, int*, int);
+extern int sock_get_ints(int, int*, int);
+extern int send_int(Sock*, int);
+extern int sock_send_int(int, int);
+extern int send_ints(Sock*, int*, int);
+extern int sock_send_ints(int, int*, int);
+extern int send_string(Sock*, char*);
+extern int send_string_len(Sock*, char*, int);
+extern int sock_send_string(int, char*);
+extern int sock_send_string_len(int, char*, int);
+extern int send_strings(Sock*, char**, int);
+extern int sock_send_strings(int, char**, int);
+extern char* sock_get_string(int);
+extern char* get_string_buf(Sock*, char*, int);
+extern char* sock_get_string_buf(int, char*, int);
+extern int get_strings(Sock*, char**, int);
+extern int sock_get_strings(int, char**, int);
+extern int send_float(Sock*, double);
+extern int sock_send_float(int, double);
+extern int send_sfloats(Sock*, float*, int);
+extern int sock_send_sfloats(int, float*, int);
+extern int send_floats(Sock*, double*, int);
+extern int sock_send_floats(int, double*, int);
+extern double sock_get_float(int);
+extern int get_sfloats(Sock*, float*, int);
+extern int sock_get_sfloats(int, float*, int);
+extern int get_floats(Sock*, double*, int);
+extern int sock_get_floats(int, double*, int);
+extern int wait_for_client_kill(Sock*, int);
+extern int sock_get_remote_fd(int);
+extern int send_signal(Sock*, int);
+extern int sock_send_signal(int, int);
+extern int send_wakeup(Sock*);
+extern int sock_send_wakeup(int);
+extern Sock* connect_to_local_server_new(char*, int, int);
+extern void remote_stdio(Sock*);
+extern void init_purpose_table(void);
+extern int make_server_number(void);
+extern void close_socket(axiom_socket, char*);
+extern int make_server_name(char*, char*);
+extern int open_server(char*);
+extern int accept_connection(Sock*);
+extern void get_socket_type(Sock*);
+extern int sock_accept_connection(int);
+extern void redirect_stdio(Sock*);
+extern void init_socks(void);
+extern int server_switch(void);
+extern void flush_stdout(void);
+extern void print_line(char*);
+
+
+#define MaxClients      150
+
+/* possible socket types (purpose) */
+
+#define SessionManager  1
+#define ViewportServer  2
+#define MenuServer      3
+#define SessionIO       4
+#define BaloonServer    5
+#define InterpWindow    6
+#define KillSpad        7
+#define DebugWindow     8  /* used for nagman */
+#define Forker          9
+#define AV              10 /*Simon's algebraic viewer */
+
+#define Acknowledge     255
+
+/* Timeout value for connection to remote socket */
+
+#define Forever 0
+
+/* Socket name for local AXIOM server and session manager */
+
+#define SpadServer              "/tmp/.d"
+#define SessionServer           "/tmp/.s"
+#define SessionIOName           "/tmp/.i"
+#define MenuServerName          "/tmp/.h"
+#define ForkServerName          "/tmp/.f"
+
+
+#define MASK_SIZE       (NBBY*sizeof(fd_set))
+
+
+/* table of dedicated socket types */
+
+extern Sock *purpose_table[];
+extern Sock server[];
+extern Sock clients[];
+extern fd_set socket_mask;
+extern fd_set server_mask;
+
+
+#endif /* OPENAXIOM_SOCKIO_included */
diff --git a/src/include/useproto.h b/src/include/useproto.h
deleted file mode 100644
index 4aa61ebc..00000000
--- a/src/include/useproto.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-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 _USEPROTO_H_
-#define _USEPROTO_H_ 1
-
-#if defined(SGIplatform) || defined(LINUXplatform) || defined(HPplatform) || defined(RIOSplatform) || defined(RIOS4platform) || defined(SUN4OS5platform) || defined(MACOSXplatform) || defined(BSDplatform) 
-#ifdef _NO_PROTO
-#undef _NO_PROTO
-#endif
-#ifndef NeedFunctionPrototypes
-#define NeedFunctionPrototypes 1
-#endif
-#endif /*SGIplatform ... */
-
-
-#if defined(ALPHAplatform)
-#ifdef __STDC__
-
-#ifdef _NO_PROTO
-#undef _NO_PROTO
-#endif
-#ifndef NeedFunctionPrototypes
-#define NeedFunctionPrototypes 1
-#endif
-
-#else 
-
-#define _NO_PROTO
-#undef NeedFunctionPrototypes
-
-#endif
-#endif /* ALPHA */
-
-
-
-#ifdef SUNplatform
-#define _NO_PROTO
-#define const   
-#endif
-
-#endif /* _USEPROTO_H_ */
diff --git a/src/include/view.h b/src/include/view.h
index 63c1572c..196a6019 100644
--- a/src/include/view.h
+++ b/src/include/view.h
@@ -1,40 +1,40 @@
 /*
-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.
 */
 
 /* This file is to be included by all the viewport files */
 
-#include "useproto.h"
-
 #define check(code) checker(code,__LINE__,errorStr)
 #define saymem(a,b,c) saymemWithLine(a,b,c,__LINE__)
 #define exitWithAck(ACK,ACKsize,i) check(write(Socket,&(ACK),sizeof(ACKsize)));  exit(i);
diff --git a/src/lib/sockio-c.c b/src/lib/sockio-c.c
index 31c849bb..9ad31365 100644
--- a/src/lib/sockio-c.c
+++ b/src/lib/sockio-c.c
@@ -51,6 +51,7 @@
 #define _ISOC99_SOURCE
 #include <math.h>
 
+#include "sockio.h"
 #include "com.h"
 #include "bsdsignal.h"
 
@@ -85,7 +86,7 @@ int still_reading  = 0;
 
 
 #include "bsdsignal.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 
 /* The function sleep() is not available under Windows.  Instead, they
    have Sleep(); with capital S, please.  Furthermore, it does not
diff --git a/src/sman/session.c b/src/sman/session.c
index 1294fe1a..cd1b2697 100644
--- a/src/sman/session.c
+++ b/src/sman/session.c
@@ -46,9 +46,11 @@
 #ifdef SGIplatform
 #include <bstring.h>
 #endif
+
+#include "sockio.h"
 #include "com.h"
 #include "bsdsignal.h"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "bsdsignal.H1"
 #include "session.H1"
 
diff --git a/src/sman/sman.c b/src/sman/sman.c
index 6b68f76e..0bc443e9 100644
--- a/src/sman/sman.c
+++ b/src/sman/sman.c
@@ -1,7 +1,6 @@
 /*
   Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
   All rights reserved.
-
   Copyright (C) 2007-2008, Gabriel Dos Reis.
   All rights reserved.
 
@@ -49,12 +48,13 @@
 #include <signal.h>
 
 
+#include "sockio.h"
 #include "com.h"
 #include "bsdsignal.h"
 #include "sman.h"
 
 #include "bsdsignal.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "openpty.H1"
 #include "utils.h"
 
diff --git a/src/sman/spadclient.c b/src/sman/spadclient.c
index a41fee2a..94b3bc9c 100644
--- a/src/sman/spadclient.c
+++ b/src/sman/spadclient.c
@@ -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 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.
 */
 
 
@@ -38,11 +40,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <signal.h>
 
 #include "axiom-c-macros.h"
+#include "sockio.h"
 #include "com.h"
 #include "bsdsignal.h"
 
 #include "bsdsignal.H1"
-#include "sockio-c.H1"
+#include "sockio.h"
 #include "spadclient.H1"
 
 Sock *sock;
-- 
cgit v1.2.3