aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog31
-rw-r--r--src/graph/view2D/main2d.c10
-rw-r--r--src/graph/view2D/process2d.c8
-rw-r--r--src/graph/view2D/viewport2D.c2
-rw-r--r--src/graph/view3D/component3d.c10
-rw-r--r--src/graph/view3D/main3d.c14
-rw-r--r--src/graph/view3D/spadAction3d.c2
-rw-r--r--src/graph/view3D/testcol.c14
-rw-r--r--src/graph/view3D/viewport3d.c4
-rw-r--r--src/graph/viewman/globalsM.h6
-rw-r--r--src/graph/viewman/makeGraph.c2
-rw-r--r--src/graph/viewman/viewman.c14
-rw-r--r--src/hyper/htadd.c4
-rw-r--r--src/hyper/hterror.c6
-rw-r--r--src/hyper/hyper.c10
-rw-r--r--src/hyper/hyper.h6
-rw-r--r--src/hyper/lex.c6
-rw-r--r--src/hyper/parse.c2
-rw-r--r--src/hyper/spadbuf.c2
-rw-r--r--src/hyper/spadint.c34
-rw-r--r--src/include/com.h22
-rw-r--r--src/include/hterror.H12
-rw-r--r--src/include/sockio.h88
-rw-r--r--src/include/spadint.H14
-rw-r--r--src/lib/sockio-c.c121
-rw-r--r--src/lib/spadcolors.c8
-rw-r--r--src/sman/session.c78
-rw-r--r--src/sman/sman.c10
-rw-r--r--src/sman/spadclient.c2
29 files changed, 278 insertions, 244 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 06ddc202..e9cb3f3a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,34 @@
+2008-04-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * sman/spadclient.c: Cleanup.
+ * sman/sman.c: Likewise.
+ * sman/session.c: Likewise.
+ * lib/spadcolors.c: Likewise.
+ * lib/sockio-c.c: Likewise.
+ * include/spadint.H1: Likewise.
+ * include/sockio.h: Likewise.
+ * include/hterror.H1: Likewise.
+ * include/com.h: Likewise.
+ * hyper/spadint.c: Likewise.
+ * hyper/spadbuf.c: Likewise.
+ * hyper/parse.c: Likewise.
+ * hyper/lex.c: Likewise.
+ * hyper/hyper.h: Likewise.
+ * hyper/hyper.c: Likewise.
+ * hyper/hterror.c: Likewise.
+ * hyper/htadd.c: Likewise.
+ * graph/viewman/viewman.c: Likewise.
+ * graph/viewman/makeGraph.c: Likewise.
+ * graph/viewman/globalsM.h: Likewise.
+ * graph/view3D/viewport3d.c: Likewise.
+ * graph/view3D/testcol.c: Likewise.
+ * graph/view3D/spadAction3d.c: Likewise.
+ * graph/view3D/main3d.c: Likewise.
+ * graph/view3D/component3d.c: Likewise.
+ * graph/view2D/viewport2D.c: Likewise.
+ * graph/view2D/process2d.c: Likewise.
+ * graph/view2D/main2d.c: Likewise.
+
2008-04-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
* lisp/core.lisp.in (|pathBasename|): New.
diff --git a/src/graph/view2D/main2d.c b/src/graph/view2D/main2d.c
index 90405883..fcdcf929 100644
--- a/src/graph/view2D/main2d.c
+++ b/src/graph/view2D/main2d.c
@@ -99,8 +99,8 @@ int followMouse = no,
ack = 1,
someInt,
drawMore,
- spadMode=no, /* yes if receiving AXIOM command and calling drawViewport */
- spadDraw=no, /* yes if drawing viewport because of a AXIOM command */
+ spadMode=no, /* yes if receiving OpenAxiom command and calling drawViewport */
+ spadDraw=no, /* yes if drawing viewport because of a OpenAxiom command */
pointsON = yes, /* these would affect the choices in buttons.c */
connectON = yes,
splineON = no,
@@ -114,7 +114,7 @@ int followMouse = no,
queriedGraph = 0, /* current graph queried */
picking=0,
dropping=0,
- viewAloned, /** if not connected to AXIOM **/
+ viewAloned, /** if not connected to OpenAxiom **/
mono,
totalColors,
totalSolid,
@@ -171,7 +171,7 @@ main(void)
/**** link Xwindows to viewports - X10 feature ****/
table = XCreateAssocTable(nbuckets);
- /**** Create AXIOM color map ****/
+ /**** Create OpenAxiom color map ****/
totalColors = XInitSpadFill(dsply,scrn,&colorMap,
&totalHues,&totalSolidShades,
&totalDitheredAndSolids,&totalShades);
@@ -417,7 +417,7 @@ main(void)
i = 123;
code=check(write(Socket,&i,intSize));
- /* Check if I am getting stuff from AXIOM or, if I am viewAlone. */
+ /* Check if I am getting stuff from OpenAxiom or, if I am viewAlone. */
readViewman(&viewAloned,intSize);
readViewman(&viewData,sizeof(view2DStruct));
readViewman(&i,intSize);
diff --git a/src/graph/view2D/process2d.c b/src/graph/view2D/process2d.c
index 97f641ef..595e5a1c 100644
--- a/src/graph/view2D/process2d.c
+++ b/src/graph/view2D/process2d.c
@@ -1,5 +1,5 @@
/*
- 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.
@@ -16,7 +16,7 @@
the documentation and/or other materials provided with the
distribution.
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ - 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.
@@ -193,7 +193,7 @@ buttonAction (int bKey)
case pick2D:
if (viewAloned) {
- sprintf(control->message,"%s","Cannot pick without AXIOM!");
+ sprintf(control->message,"%s","Cannot pick without OpenAxiom!");
writeControlMessage();
XSync(dsply,False);
}
@@ -207,7 +207,7 @@ buttonAction (int bKey)
case drop2D:
if (viewAloned) {
- sprintf(control->message,"%s","Cannot drop without AXIOM!");
+ sprintf(control->message,"%s","Cannot drop without OpenAxiom!");
writeControlMessage();
XSync(dsply,False);
} else {
diff --git a/src/graph/view2D/viewport2D.c b/src/graph/view2D/viewport2D.c
index a5934018..0ce5de88 100644
--- a/src/graph/view2D/viewport2D.c
+++ b/src/graph/view2D/viewport2D.c
@@ -630,7 +630,7 @@ makeViewport(char *title,int vX,int vY,int vW,int vH,int showCP)
(void) XSetWMProtocols(dsply, viewTitleWindow, &wm_delete_window, 1);
XSetNormalHints(dsply,viewTitleWindow,&titleSizeHints);
- XSetStandardProperties(dsply,viewTitleWindow,"AXIOM 2D",viewport->title,
+ XSetStandardProperties(dsply,viewTitleWindow,"OpenAxiom 2D",viewport->title,
None,NULL,0,&titleSizeHints);
viewport->titleWindow = viewTitleWindow;
diff --git a/src/graph/view3D/component3d.c b/src/graph/view3D/component3d.c
index a4d0622c..2b361295 100644
--- a/src/graph/view3D/component3d.c
+++ b/src/graph/view3D/component3d.c
@@ -76,7 +76,7 @@ scaleComponents (void)
yRange = viewData.ymax - viewData.ymin;
zRange = viewData.zmax - viewData.zmin;
- /* We scale down, normalize the data, if it is coming from AXIOM
+ /* We scale down, normalize the data, if it is coming from OpenAxiom
(handled by viewman). If the data is coming from a file (handled by
viewAlone) then it should already been scaled down.
*/
@@ -113,7 +113,7 @@ scaleComponents (void)
/* We now normalize all the points in this program. The information
needed to link the normalized set of points back to the real object
- space scale created in AXIOM is held in viewData.scaleToView. */
+ space scale created in OpenAxiom is held in viewData.scaleToView. */
viewData.xmin *= viewData.scaleToView;
viewData.xmax *= viewData.scaleToView;
viewData.ymin *= viewData.scaleToView;
@@ -329,7 +329,7 @@ readComponentsFromViewman (void)
maxLength = anLPoint->numOfPoints;
for (k=0; k<anLPoint->numOfPoints; k++,anIndex++) {
readViewman(anIndex,intSize);
- /* AXIOM arrays are one based, C arrays are zero based */
+ /* OpenAxiom arrays are one based, C arrays are zero based */
if (!viewAloned) (*anIndex)--;
}
} /* for LPoints in LLPoints (j) */
@@ -410,7 +410,7 @@ calcNormData (void)
points is. For 3D explicit equations of two variables, the closed
boolean for this level is False and the closed boolean for each sublist
is False as well. For 3D parameterized curves of one variable, the
- closed boolean for this level is defined by the user from AXIOM ,
+ closed boolean for this level is defined by the user from OpenAxiom ,
(which defaults to False) and the closed boolean for each sublist is True.
*/
@@ -544,7 +544,7 @@ draw3DComponents (int dFlag)
((anLLPoint->lp+1)->numOfPoints > 2))
componentType = polygonComponent;
}
- /* Check for corrupt data and NaN data is made in AXIOM . */
+ /* Check for corrupt data and NaN data is made in OpenAxiom . */
if (componentType == stillDontKnow)
componentType = surfaceComponent;
diff --git a/src/graph/view3D/main3d.c b/src/graph/view3D/main3d.c
index a3d2e3a0..313e9040 100644
--- a/src/graph/view3D/main3d.c
+++ b/src/graph/view3D/main3d.c
@@ -102,12 +102,12 @@ int mono, totalColors, totalSolid, totalDithered, totalHues,
int drawMore;
-int spadMode=no, /* yes if receiving AXIOM command and
+int spadMode=no, /* yes if receiving OpenAxiom command and
calling drawViewport */
spadDraw=no; /* yes if drawing viewport for
- an AXIOM command */
+ an OpenAxiom command */
int spadSignalReceived=0; /* yes if current state is a result of
- a signal from AXIOM */
+ a signal from OpenAxiom */
int inNextEvent=no; /* true just before a call to
XNextEvent */
jmp_buf jumpFlag;
@@ -181,7 +181,7 @@ int finishedList=no, zoomed=yes, translated = yes,
gotToggle = no;
poly *quickList;
- /** if not connected to AXIOM **/
+ /** if not connected to OpenAxiom **/
int viewAloned;
/** for drawing the box **/
@@ -273,7 +273,7 @@ main(void)
/**** link Xwindows to viewports - X10 feature ****/
table = XCreateAssocTable(nbuckets);
- /**** Create AXIOM color map ****/
+ /**** Create OpenAxiom color map ****/
totalShades = 0;
totalColors = XInitSpadFill(dsply,scrn,&colorMap,
&totalHues,&totalSolidShades,
@@ -520,7 +520,7 @@ main(void)
i = 123; /* Used in viewman, what is this for? */
code = check(write(Socket,&i,intSize));
- /* Check if I am getting stuff from AXIOM or, if I am viewAlone. */
+ /* Check if I am getting stuff from OpenAxiom or, if I am viewAlone. */
readViewman(&viewAloned,intSize);
readViewman(&viewData,sizeof(view3DStruct));
readViewman(&i,intSize);
@@ -541,7 +541,7 @@ main(void)
switch (viewData.typeOf3D) {
/* Currently, the view3DType information doesn't get sent from
- AXIOM - all surfaces are alike regardless of how they
+ OpenAxiom - all surfaces are alike regardless of how they
were created. We may revert back to receiving this information
in case we want to take advantage of certain properties of
certain surfaces (e.g. z=f(x,y)). */
diff --git a/src/graph/view3D/spadAction3d.c b/src/graph/view3D/spadAction3d.c
index 4c5dcfc8..64530676 100644
--- a/src/graph/view3D/spadAction3d.c
+++ b/src/graph/view3D/spadAction3d.c
@@ -199,7 +199,7 @@ spadAction (void)
if (viewport->haveControl) drawControlPanel();
break;
-/* Non-uniform scaling is not in AXIOM yet. */
+/* Non-uniform scaling is not in OpenAxiom yet. */
/* Neither is object or origin rotation. */
case perspectiveOnOff:
diff --git a/src/graph/view3D/testcol.c b/src/graph/view3D/testcol.c
index 9c3a58d9..c783943f 100644
--- a/src/graph/view3D/testcol.c
+++ b/src/graph/view3D/testcol.c
@@ -116,12 +116,12 @@ int someInt;
int drawMore;
-int spadMode=no, /* yes if receiving AXIOM command and
+int spadMode=no, /* yes if receiving OpenAxiom command and
calling drawViewport */
spadDraw=no; /* yes if drawing viewport for
- an AXIOM command */
+ an OpenAxiom command */
int spadSignalReceived=0; /* yes if current state is a result of
- a signal from AXIOM */
+ a signal from OpenAxiom */
int inNextEvent=no; /* true just before a call to
XNextEvent */
jmp_buf jumpFlag;
@@ -195,7 +195,7 @@ int finishedList=no, zoomed=yes, translated = yes,
gotToggle = no;
poly *quickList;
- /** if not connected to AXIOM **/
+ /** if not connected to OpenAxiom **/
int viewAloned;
/** for drawing the box **/
@@ -276,7 +276,7 @@ main(void)
/**** link Xwindows to viewports - X10 feature ****/
table = XCreateAssocTable(nbuckets);
- /**** Create AXIOM color map ****/
+ /**** Create OpenAxiom color map ****/
totalShades = 0;
totalColors = XInitSpadFill(dsply,scrn,&colorMap,
&totalHues,&totalSolidShades,
@@ -550,10 +550,10 @@ main(void)
XSetNormalHints(dsply,viewTitleWindow,&titleSizeHints);
if (strlen(viewport->title) < 30)
- XSetStandardProperties(dsply,viewTitleWindow,"AXIOM 3D",viewport->title,
+ XSetStandardProperties(dsply,viewTitleWindow,"OpenAxiom 3D",viewport->title,
None,NULL,0,&titleSizeHints);
else
- XSetStandardProperties(dsply,viewTitleWindow,"AXIOM 3D","3D AXIOM Graph",
+ XSetStandardProperties(dsply,viewTitleWindow,"OpenAxiom 3D","3D OpenAxiom Graph",
None,NULL,0,&titleSizeHints);
viewport->titleWindow = viewTitleWindow;
diff --git a/src/graph/view3D/viewport3d.c b/src/graph/view3D/viewport3d.c
index 23f060cc..3b7482c2 100644
--- a/src/graph/view3D/viewport3d.c
+++ b/src/graph/view3D/viewport3d.c
@@ -683,10 +683,10 @@ makeViewport (void)
XSetNormalHints(dsply,viewTitleWindow,&titleSizeHints);
if (strlen(viewport->title) < 30)
- XSetStandardProperties(dsply,viewTitleWindow,"AXIOM 3D",viewport->title,
+ XSetStandardProperties(dsply,viewTitleWindow,"OpenAxiom 3D",viewport->title,
None,NULL,0,&titleSizeHints);
else
- XSetStandardProperties(dsply,viewTitleWindow,"AXIOM 3D","3D AXIOM Graph",
+ XSetStandardProperties(dsply,viewTitleWindow,"OpenAxiom 3D","3D OpenAxiom Graph",
None,NULL,0,&titleSizeHints);
viewport->titleWindow = viewTitleWindow;
diff --git a/src/graph/viewman/globalsM.h b/src/graph/viewman/globalsM.h
index e7e3846b..cce83265 100644
--- a/src/graph/viewman/globalsM.h
+++ b/src/graph/viewman/globalsM.h
@@ -1,5 +1,5 @@
/*
- 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 resrved.
@@ -16,7 +16,7 @@
the documentation and/or other materials provided with the
distribution.
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ - 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.
@@ -34,7 +34,7 @@
*/
extern viewManager *viewports,*slot,*stepSlot;
-extern Sock *spadSock;
+extern openaxiom_sio* spadSock;
extern int viewType, viewCommand;
extern fd_set filedes;
extern int acknow;
diff --git a/src/graph/viewman/makeGraph.c b/src/graph/viewman/makeGraph.c
index 69e0a656..d4188a41 100644
--- a/src/graph/viewman/makeGraph.c
+++ b/src/graph/viewman/makeGraph.c
@@ -93,7 +93,7 @@ makeGraphFromSpadData(void)
pL->listOfPoints = p; /** point to current point list **/
for (j=0; j<pL->numberOfPoints; j++) {
- p->x = get_float(spadSock); /* get numbers from AXIOM */
+ p->x = get_float(spadSock); /* get numbers from OpenAxiom */
p->y = get_float(spadSock);
p->hue = get_float(spadSock) - 1; /* make zero based */
p->shade = get_float(spadSock) - 1;
diff --git a/src/graph/viewman/viewman.c b/src/graph/viewman/viewman.c
index 96a6e13f..fca67796 100644
--- a/src/graph/viewman/viewman.c
+++ b/src/graph/viewman/viewman.c
@@ -1,5 +1,5 @@
/*
- 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.
@@ -16,7 +16,7 @@
the documentation and/or other materials provided with the
distribution.
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ - 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.
@@ -65,7 +65,7 @@ XEvent viewmanEvent;
viewManager *viewports,
*slot,
*stepSlot;
-Sock *spadSock;
+openaxiom_sio* spadSock;
int viewType,
viewCommand,
acknow,
@@ -95,15 +95,15 @@ main (void)
bsdSignal(OPENAXIOM_SIGCHLD,endChild,RestartSystemCalls);
bsdSignal(SIGTERM,goodbye,DontRestartSystemCalls);
- /* Connect up to AXIOM server */
+ /* Connect up to OpenAxiom server */
spadSock = connect_to_local_server(SpadServer,ViewportServer,Forever);
if (spadSock == NULL) {
- fprintf(stderr,"The viewport manager couldn't connect to AXIOM\n");
+ fprintf(stderr,"The viewport manager couldn't connect to OpenAxiom\n");
exit(-1);
}
#ifdef DEBUG
else
- fprintf(stderr,"viewman: Connected to AXIOM\n");
+ fprintf(stderr,"viewman: Connected to OpenAxiom\n");
#endif
/******** initialize ********/
@@ -112,7 +112,7 @@ main (void)
/******** getting stuff from spad and viewports ********
********* the viewports have priority over ****
- *** AXIOM. ***/
+ *** OpenAxiom. ***/
while (1) {
FD_ZERO(&filedes); /* zero out file descriptor */
FD_SET(spadSock->socket,&filedes);
diff --git a/src/hyper/htadd.c b/src/hyper/htadd.c
index 534d9c55..1b650c01 100644
--- a/src/hyper/htadd.c
+++ b/src/hyper/htadd.c
@@ -79,8 +79,8 @@ extern int line_number; /* keeps track of which line a page starts on
* including a line number counter into
* HyperDoc. */
/* for compatibility with HyperDoc */
-Sock *spad_socket = NULL;
-Sock *session_server = NULL;
+openaxiom_sio *spad_socket = NULL;
+openaxiom_sio *session_server = NULL;
int MenuServerOpened;
Display *gXDisplay;
int gXScreenNumber;
diff --git a/src/hyper/hterror.c b/src/hyper/hterror.c
index f5831f83..46852c46 100644
--- a/src/hyper/hterror.c
+++ b/src/hyper/hterror.c
@@ -204,18 +204,18 @@ token_name(int type)
}
}
void
-htperror(char *msg, int errno)
+htperror(char *msg, int erno)
{
char obuff[256];
/* The first thing I do is create the error message */
- if (errno <= Numerrors) {
+ if (erno <= Numerrors) {
sprintf(obuff, "%s:%s\n", msg, errmess[errno]);
}
else {
sprintf(obuff, "%s:\n", msg);
- fprintf(stderr, "Unknown error type %d\n", errno);
+ fprintf(stderr, "Unknown error type %d\n", erno);
}
fprintf(stderr, "%s", obuff);
diff --git a/src/hyper/hyper.c b/src/hyper/hyper.c
index 152ccc35..dbbd4f88 100644
--- a/src/hyper/hyper.c
+++ b/src/hyper/hyper.c
@@ -116,7 +116,7 @@ int gmake_record_file= 0; /* true when making record files from ht */
int gverify_record_file = 0; /* true when verifying record files from ht */
int gverify_dates = 0; /* true when we want hypertex to verify ht.db dates */
-Sock *session_server; /* socket connecting to session manager */
+openaxiom_sio *session_server; /* socket connecting to session manager */
int gIsAxiomServer = 0; /* true iff HyperDoc is acting as a */
/* an Axiom server */
@@ -402,7 +402,7 @@ make_server_connections(void)
*/
if (open_server(MenuServerName) == -2) {
- fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
+ fprintf(stderr, "(HyperDoc) Warning: Not connected to OpenAxiom Server!\n");
MenuServerOpened = 0;
} else {
atexit(&clean_socket);
@@ -437,16 +437,16 @@ make_server_connections(void)
spad_socket = connect_to_local_server(SpadServer,
MenuServer, wait_time);
if (gIsAxiomServer && spad_socket == NULL)
- fprintf(stderr, "(HyperDoc) Error opening AXIOM server. Retrying ...\n");
+ fprintf(stderr, "(HyperDoc) Error opening OpenAxiom server. Retrying ...\n");
else
i = 11;
}
if (! spad_socket) {
- fprintf(stderr, "(HyperDoc) Couldn't connect to AXIOM server!\n");
+ fprintf(stderr, "(HyperDoc) Couldn't connect to OpenAxiom server!\n");
if (!gIsAxiomServer)
MenuServerOpened = 0;
else {
- fprintf(stderr, "(HyperDoc) Couldn't connect to AXIOM server!\n");
+ fprintf(stderr, "(HyperDoc) Couldn't connect to OpenAxiom server!\n");
exit(-1);
}
}
diff --git a/src/hyper/hyper.h b/src/hyper/hyper.h
index 20d7e468..48e142bc 100644
--- a/src/hyper/hyper.h
+++ b/src/hyper/hyper.h
@@ -301,7 +301,7 @@ typedef struct hyperdoc_page {
TextNode *header; /* formatted version of page */
TextNode *scrolling; /* Top of scrolling region */
TextNode *footer; /* top of non-scrolling region at bottom */
- Sock *sock; /* socket connection for spad buffer */
+ openaxiom_sio *sock; /* socket connection for spad buffer */
HashTable *fLinkHashTable; /* active link hash table */
ButtonList *s_button_list; /* active buttons on page */
ButtonList *button_list; /* active buttons on page */
@@ -411,8 +411,8 @@ extern int gSwitch_to_mono;
extern unsigned long * spadColors;
extern int gIsEndOfOutput;
extern HDWindow *gWindow;
-extern Sock *session_server;
-extern Sock *spad_socket;
+extern openaxiom_sio *session_server;
+extern openaxiom_sio *spad_socket;
extern HashTable gFileHashTable;
extern HashTable gImageHashTable; /* A global hash table for images */
extern Cursor gNormalCursor; /* The normal mouse cursor */
diff --git a/src/hyper/lex.c b/src/hyper/lex.c
index 67de1459..66cfdada 100644
--- a/src/hyper/lex.c
+++ b/src/hyper/lex.c
@@ -856,19 +856,19 @@ spad_busy(void)
return get_int(session_server);
}
-/* connect to AXIOM , return 0 if succesful, 1 if not */
+/* connect to OpenAxiom , return 0 if succesful, 1 if not */
int
connect_spad(void)
{
if (!MenuServerOpened) {
- fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
+ fprintf(stderr, "(HyperDoc) Warning: Not connected to OpenAxiom Server!\n");
LoudBeepAtTheUser();
return NotConnected;
}
if (spad_socket == NULL) {
spad_socket = connect_to_local_server(SpadServer, MenuServer, Forever);
if (spad_socket == NULL) {
- fprintf(stderr, "(HyperDoc) Warning: Could not connect to AXIOM Server!\n");
+ fprintf(stderr, "(HyperDoc) Warning: Could not connect to OpenAxiom Server!\n");
LoudBeepAtTheUser();
return NotConnected;
}
diff --git a/src/hyper/parse.c b/src/hyper/parse.c
index f2282270..aa270212 100644
--- a/src/hyper/parse.c
+++ b/src/hyper/parse.c
@@ -56,7 +56,7 @@
TextNode *curr_node; /* current node being parsed. It is to be the
* next one filled */
HashTable *gLinkHashTable; /* the hash table of active link windows */
-TextNode *cur_spadcom; /* The current AXIOM command */
+TextNode *cur_spadcom; /* The current OpenAxiom command */
short int gParserMode; /* Parser mode flag */
short int gParserRegion; /* Parser Region flag scrolling etc */
diff --git a/src/hyper/spadbuf.c b/src/hyper/spadbuf.c
index b8795723..5ff51315 100644
--- a/src/hyper/spadbuf.c
+++ b/src/hyper/spadbuf.c
@@ -89,7 +89,7 @@ char buff[MAXLINE]; /* Buffers for collecting input and */
int buff_flag[MAXLINE]; /* flags for whether buff chars
are printing or non-printing */
int (*old_handler) ();
-Sock *session_sock, *menu_sock;
+openaxiom_sio *session_sock, *menu_sock;
char *buff_name = NULL; /* name for the aixterm */
/*
diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c
index 8969ab34..842b4c4a 100644
--- a/src/hyper/spadint.c
+++ b/src/hyper/spadint.c
@@ -35,7 +35,7 @@
/* Still a problem with close_client */
-/* Communication interface for external AXIOM buffers */
+/* Communication interface for external OpenAxiom buffers */
#define _SPADINT_C
#include "axiom-c-macros.h"
@@ -51,15 +51,15 @@
#include "sockio.h"
-typedef struct sock_list { /* linked list of Sock */
- Sock Socket;
+typedef struct sock_list { /* linked list of openaxiom_sio */
+ openaxiom_sio Socket;
struct sock_list *next;
} Sock_List;
Sock_List *plSock = (Sock_List *) 0;
-Sock *spad_socket = (Sock *) 0; /* to_server socket for SpadServer */
+openaxiom_sio *spad_socket = (openaxiom_sio *) 0; /* to_server socket for SpadServer */
-/* issue a AXIOM command to the buffer associated with a page */
+/* issue a OpenAxiom command to the buffer associated with a page */
void
issue_spadcommand(HyperDocPage *page, TextNode *command, int immediate,
int type)
@@ -95,7 +95,7 @@ issue_spadcommand(HyperDocPage *page, TextNode *command, int immediate,
gIsEndOfOutput = 0;
}
static void
-send_pile(Sock *sock,char * str)
+send_pile(openaxiom_sio *sock,char * str)
{
FILE *f;
char name[512], command[512];
@@ -243,12 +243,12 @@ clear_execution_marks(HashTable *depend_hash)
}
}
-Sock *
-accept_menu_connection(Sock *server_sock)
+openaxiom_sio *
+accept_menu_connection(openaxiom_sio *server_sock)
{
int sock_fd /*, session, ret_code*/;
Sock_List *pls;
- /*Sock local_sock;*/
+ /*openaxiom_sio local_sock;*/
/* Could only be InterpWindow */
@@ -259,7 +259,7 @@ accept_menu_connection(Sock *server_sock)
return 0;
}
(pls->Socket).socket = sock_fd;
- get_socket_type((Sock *) pls);
+ get_socket_type((openaxiom_sio *) pls);
#ifdef DEBUG
fprintf(stderr,
@@ -281,7 +281,7 @@ accept_menu_connection(Sock *server_sock)
/* need to maintain socket_mask since we roll our own accept */
FD_SET(plSock->Socket.socket, &socket_mask);
- return (Sock *) plSock;
+ return (openaxiom_sio *) plSock;
}
static void
@@ -289,13 +289,13 @@ accept_menu_server_connection(HyperDocPage *page)
{
/*
- * TTT thinks this code should just provide a Sock to the page. The only
- * client assumed is a spadbuf. Since spadbuf was invoked with the page
- * name, it just passes it back here as a check (get_string line).
+ * TTT thinks this code should just provide a openaxiom_sio to the page.
+ * The only client assumed is a spadbuf. Since spadbuf was invoked with
+ * the page name, it just passes it back here as a check (get_string line).
*/
int ret_code/*, i*/;
fd_set rd;
- Sock *sock;
+ openaxiom_sio *sock;
char *buf_name;
HyperDocPage *npage;
@@ -626,7 +626,7 @@ print_to_string1(TextNode *command,int * sizeBuf)
}
/*
- * Send a lisp or spad command to the AXIOM server for execution , if
+ * Send a lisp or spad command to the OpenAxiom server for execution , if
* type is link, then we wait for a HyperDoc card to be returned
*/
@@ -779,7 +779,7 @@ switch_frames(void)
return;
}
if (gWindow->fAxiomFrame == -1) {
- fprintf(stderr, "(HyperDoc) No AXIOM frame associated with top level window!\n");
+ fprintf(stderr, "(HyperDoc) No OpenAxiom frame associated with top level window!\n");
return;
}
send_int(session_server, SwitchFrames);
diff --git a/src/include/com.h b/src/include/com.h
index 520e4aae..d5258fc2 100644
--- a/src/include/com.h
+++ b/src/include/com.h
@@ -1,5 +1,5 @@
/*
- 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 resrved.
@@ -16,7 +16,7 @@
the documentation and/or other materials provided with the
distribution.
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ - 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.
@@ -58,22 +58,4 @@
#define TestLine 101
-/* It is idiomatic in the Unix/POSIX world to use the standard
- read() and write() functions on sockets. However, in the Windows
- world, that is invalid. Consequently, portability suggests that
- we restrict ourselves to the POSIX standard functions recv() and
- send(). */
-
-static inline int
-axiom_write(Sock* s, const char* buf, size_t n)
-{
- return send(s->socket, buf, n, 0);
-}
-
-static inline int
-axiom_read(Sock* s, char* buf, size_t n)
-{
- return recv(s->socket, buf, n, 0);
-}
-
#endif
diff --git a/src/include/hterror.H1 b/src/include/hterror.H1
index 128f8711..cf4f99d4 100644
--- a/src/include/hterror.H1
+++ b/src/include/hterror.H1
@@ -3,4 +3,4 @@ extern void jump(void );
extern void print_token(void );
extern void token_name(int type);
extern void print_next_ten_tokens(void );
-extern void htperror(char * msg , int errno);
+extern void htperror(char *, int);
diff --git a/src/include/sockio.h b/src/include/sockio.h
index aaa1c5f5..0f1a7ebd 100644
--- a/src/include/sockio.h
+++ b/src/include/sockio.h
@@ -55,90 +55,90 @@
axiom_socket. */
#ifdef __MINGW32__
-typedef SOCKET axiom_socket;
+typedef SOCKET openaxiom_socket;
#else
-typedef int axiom_socket;
+typedef int openaxiom_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 */
+typedef struct openaxiom_sio {
+ openaxiom_socket socket; /* descriptor of this socket I/O endpoint. */
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 */
+ int frame; /* spad interpreter frame. */
+ openaxiom_socket remote; /* descriptor of socket at the other endpoint. */
union {
struct sockaddr u_addr;
struct sockaddr_in i_addr;
} addr;
char *host_name; /* name of foreign host if type == AF_INET */
-} Sock;
+} openaxiom_sio;
-OPENAXIOM_EXPORT int get_int(Sock*);
-OPENAXIOM_EXPORT char* get_string(Sock*);
-OPENAXIOM_EXPORT double get_float(Sock*);
-OPENAXIOM_EXPORT Sock* connect_to_local_server(char*, int, int);
-OPENAXIOM_EXPORT int sread(Sock*, char*, int, char*);
+/* Close a socket communication endpoint. */
+OPENAXIOM_EXPORT void axiom_close_socket(openaxiom_socket);
+
+OPENAXIOM_EXPORT int get_int(openaxiom_sio*);
+OPENAXIOM_EXPORT char* get_string(openaxiom_sio*);
+OPENAXIOM_EXPORT double get_float(openaxiom_sio*);
+OPENAXIOM_EXPORT openaxiom_sio* connect_to_local_server(char*, int, int);
+OPENAXIOM_EXPORT int sread(openaxiom_sio*, char*, int, char*);
OPENAXIOM_EXPORT double plus_infinity(void);
OPENAXIOM_EXPORT double minus_infinity(void);
OPENAXIOM_EXPORT double NANQ(void);
OPENAXIOM_EXPORT void sigpipe_handler(int);
-OPENAXIOM_EXPORT int wait_for_client_read(Sock*, char*, int, char*);
-OPENAXIOM_EXPORT int wait_for_client_write(Sock*, char*, int, char*);
-OPENAXIOM_EXPORT int swrite(Sock*, char*, int, char*);
+OPENAXIOM_EXPORT int wait_for_client_read(openaxiom_sio*, char*, int, char*);
+OPENAXIOM_EXPORT int wait_for_client_write(openaxiom_sio*, char*, int, char*);
+OPENAXIOM_EXPORT int swrite(openaxiom_sio*, char*, int, char*);
OPENAXIOM_EXPORT int sselect(int, fd_set*, fd_set*, fd_set*, void*);
-OPENAXIOM_EXPORT int fill_buf(Sock*, char*, int, char*);
+OPENAXIOM_EXPORT int fill_buf(openaxiom_sio*, char*, int, char*);
OPENAXIOM_EXPORT int sock_get_int(int);
-OPENAXIOM_EXPORT int get_ints(Sock*, int*, int);
+OPENAXIOM_EXPORT int get_ints(openaxiom_sio*, int*, int);
OPENAXIOM_EXPORT int sock_get_ints(int, int*, int);
-OPENAXIOM_EXPORT int send_int(Sock*, int);
+OPENAXIOM_EXPORT int send_int(openaxiom_sio*, int);
OPENAXIOM_EXPORT int sock_send_int(int, int);
-OPENAXIOM_EXPORT int send_ints(Sock*, int*, int);
+OPENAXIOM_EXPORT int send_ints(openaxiom_sio*, int*, int);
OPENAXIOM_EXPORT int sock_send_ints(int, int*, int);
-OPENAXIOM_EXPORT int send_string(Sock*, char*);
-OPENAXIOM_EXPORT int send_string_len(Sock*, char*, int);
+OPENAXIOM_EXPORT int send_string(openaxiom_sio*, char*);
+OPENAXIOM_EXPORT int send_string_len(openaxiom_sio*, char*, int);
OPENAXIOM_EXPORT int sock_send_string(int, char*);
OPENAXIOM_EXPORT int sock_send_string_len(int, char*, int);
-OPENAXIOM_EXPORT int send_strings(Sock*, char**, int);
+OPENAXIOM_EXPORT int send_strings(openaxiom_sio*, char**, int);
OPENAXIOM_EXPORT int sock_send_strings(int, char**, int);
OPENAXIOM_EXPORT char* sock_get_string(int);
-OPENAXIOM_EXPORT char* get_string_buf(Sock*, char*, int);
+OPENAXIOM_EXPORT char* get_string_buf(openaxiom_sio*, char*, int);
OPENAXIOM_EXPORT char* sock_get_string_buf(int, char*, int);
-OPENAXIOM_EXPORT int get_strings(Sock*, char**, int);
+OPENAXIOM_EXPORT int get_strings(openaxiom_sio*, char**, int);
OPENAXIOM_EXPORT int sock_get_strings(int, char**, int);
-OPENAXIOM_EXPORT int send_float(Sock*, double);
+OPENAXIOM_EXPORT int send_float(openaxiom_sio*, double);
OPENAXIOM_EXPORT int sock_send_float(int, double);
-OPENAXIOM_EXPORT int send_sfloats(Sock*, float*, int);
+OPENAXIOM_EXPORT int send_sfloats(openaxiom_sio*, float*, int);
OPENAXIOM_EXPORT int sock_send_sfloats(int, float*, int);
-OPENAXIOM_EXPORT int send_floats(Sock*, double*, int);
+OPENAXIOM_EXPORT int send_floats(openaxiom_sio*, double*, int);
OPENAXIOM_EXPORT int sock_send_floats(int, double*, int);
OPENAXIOM_EXPORT double sock_get_float(int);
-OPENAXIOM_EXPORT int get_sfloats(Sock*, float*, int);
+OPENAXIOM_EXPORT int get_sfloats(openaxiom_sio*, float*, int);
OPENAXIOM_EXPORT int sock_get_sfloats(int, float*, int);
-OPENAXIOM_EXPORT int get_floats(Sock*, double*, int);
+OPENAXIOM_EXPORT int get_floats(openaxiom_sio*, double*, int);
OPENAXIOM_EXPORT int sock_get_floats(int, double*, int);
-OPENAXIOM_EXPORT int wait_for_client_kill(Sock*, int);
+OPENAXIOM_EXPORT int wait_for_client_kill(openaxiom_sio*, int);
OPENAXIOM_EXPORT int sock_get_remote_fd(int);
-OPENAXIOM_EXPORT int send_signal(Sock*, int);
+OPENAXIOM_EXPORT int send_signal(openaxiom_sio*, int);
OPENAXIOM_EXPORT int sock_send_signal(int, int);
-OPENAXIOM_EXPORT int send_wakeup(Sock*);
+OPENAXIOM_EXPORT int send_wakeup(openaxiom_sio*);
OPENAXIOM_EXPORT int sock_send_wakeup(int);
-OPENAXIOM_EXPORT Sock* connect_to_local_server_new(char*, int, int);
-OPENAXIOM_EXPORT void remote_stdio(Sock*);
+OPENAXIOM_EXPORT openaxiom_sio* connect_to_local_server_new(char*, int, int);
+OPENAXIOM_EXPORT void remote_stdio(openaxiom_sio*);
OPENAXIOM_EXPORT void init_purpose_table(void);
OPENAXIOM_EXPORT int make_server_number(void);
-OPENAXIOM_EXPORT void close_socket(axiom_socket, char*);
+OPENAXIOM_EXPORT void close_socket(openaxiom_socket, char*);
OPENAXIOM_EXPORT int make_server_name(char*, char*);
OPENAXIOM_EXPORT int open_server(char*);
-OPENAXIOM_EXPORT int accept_connection(Sock*);
-OPENAXIOM_EXPORT void get_socket_type(Sock*);
+OPENAXIOM_EXPORT int accept_connection(openaxiom_sio*);
+OPENAXIOM_EXPORT void get_socket_type(openaxiom_sio*);
OPENAXIOM_EXPORT int sock_accept_connection(int);
-OPENAXIOM_EXPORT void redirect_stdio(Sock*);
+OPENAXIOM_EXPORT void redirect_stdio(openaxiom_sio*);
OPENAXIOM_EXPORT void init_socks(void);
OPENAXIOM_EXPORT int server_switch(void);
OPENAXIOM_EXPORT void flush_stdout(void);
@@ -180,9 +180,9 @@ OPENAXIOM_EXPORT void print_line(char*);
/* table of dedicated socket types */
-OPENAXIOM_EXPORT extern Sock *purpose_table[];
-OPENAXIOM_EXPORT extern Sock server[];
-OPENAXIOM_EXPORT extern Sock clients[];
+OPENAXIOM_EXPORT extern openaxiom_sio *purpose_table[];
+OPENAXIOM_EXPORT extern openaxiom_sio server[];
+OPENAXIOM_EXPORT extern openaxiom_sio clients[];
OPENAXIOM_EXPORT extern fd_set socket_mask;
OPENAXIOM_EXPORT extern fd_set server_mask;
diff --git a/src/include/spadint.H1 b/src/include/spadint.H1
index adace30d..e1ba6165 100644
--- a/src/include/spadint.H1
+++ b/src/include/spadint.H1
@@ -2,7 +2,7 @@ extern HyperDocPage * issue_server_command(HyperLink * link);
extern HyperDocPage * issue_unixlink(TextNode * node);
extern char * print_to_string(TextNode * command);
extern void issue_spadcommand(HyperDocPage * page , TextNode * command , int immediate , int type);
-extern Sock * accept_menu_connection(Sock * server_sock);
+extern openaxiom_sio * accept_menu_connection(openaxiom_sio * server_sock);
extern char * print_to_string1(TextNode * command , int * sizeBuf);
extern int issue_serverpaste(TextNode * command);
extern void issue_unixcommand(TextNode * node);
@@ -17,7 +17,7 @@ extern char * print_source_to_string(TextNode * command);
static void start_user_buffer(HyperDocPage * page);
static void clear_execution_marks(HashTable * depend_hash);
static void issue_dependent_commands(HyperDocPage * page , TextNode * command , int type);
-static void send_pile(Sock * sock , char * str);
+static void send_pile(openaxiom_sio * sock , char * str);
static void mark_as_executed(HyperDocPage * page , TextNode * command , int type);
static void accept_menu_server_connection(HyperDocPage * page);
static void switch_frames(void );
diff --git a/src/lib/sockio-c.c b/src/lib/sockio-c.c
index ec50a3f6..7c3fc4c8 100644
--- a/src/lib/sockio-c.c
+++ b/src/lib/sockio-c.c
@@ -64,22 +64,22 @@
implementation and Windows documentation don't always agree. */
#if HAVE_AF_LOCAL
-# define AXIOM_AF_LOCAL AF_LOCAL
+# define OPENAXIOM_AF_LOCAL AF_LOCAL
#elif HAVE_AF_UNIX
-# define AXIOM_AF_LOCAL AF_UNIX
+# define OPENAXIOM_AF_LOCAL AF_UNIX
#else
# error "needs one of AF_LOCAL or AF_UNIX"
#endif
/* socket description of spad clients */
-OPENAXIOM_EXPORT Sock clients[MaxClients];
+OPENAXIOM_EXPORT openaxiom_sio clients[MaxClients];
/* AF_LOCAL and AF_INET sockets for server */
-OPENAXIOM_EXPORT Sock server[2];
+OPENAXIOM_EXPORT openaxiom_sio server[2];
/* table of dedicated socket types */
-OPENAXIOM_EXPORT Sock *purpose_table[TotalMaxPurposes];
+OPENAXIOM_EXPORT openaxiom_sio *purpose_table[TotalMaxPurposes];
/* bit mask of active sockets */
OPENAXIOM_EXPORT fd_set socket_mask;
@@ -141,7 +141,7 @@ axiom_load_socket_module()
/* Get a socket identifier to a local server. We take whatever protocol
is the default for the address family in the SOCK_STREAM type. */
-static inline axiom_socket
+static inline openaxiom_socket
axiom_communication_link(int family)
{
axiom_load_socket_module();
@@ -152,7 +152,7 @@ axiom_communication_link(int family)
/* Returns 1 if SOCKET is an invalid socket. Otherwise return 0. */
static inline int
-is_invalid_socket(const Sock* s)
+is_invalid_socket(const openaxiom_sio* s)
{
#ifdef __WIN32__
return s->socket == INVALID_SOCKET;
@@ -164,7 +164,7 @@ is_invalid_socket(const Sock* s)
/* Returns 1 if SOCKET is a valid socket. Otherwise return 0. */
static inline int
-is_valid_socket(const Sock* s)
+is_valid_socket(const openaxiom_sio* s)
{
#ifdef __WIN32__
return s->socket != INVALID_SOCKET;
@@ -181,7 +181,7 @@ is_valid_socket(const Sock* s)
requires cleanup. */
void
-axiom_close_socket(axiom_socket s)
+axiom_close_socket(openaxiom_socket s)
{
#ifdef __WIN32__
shutdown(s, SD_BOTH);
@@ -192,6 +192,25 @@ axiom_close_socket(axiom_socket s)
#endif
}
+/* It is idiomatic in the Unix/POSIX world to use the standard
+ read() and write() functions on sockets. However, in the Windows
+ world, that is invalid. Consequently, portability suggests that
+ we restrict ourselves to the POSIX standard functions recv() and
+ send(). */
+
+static inline int
+axiom_write(openaxiom_sio* s, const char* buf, size_t n)
+{
+ return send(s->socket, buf, n, 0);
+}
+
+static inline int
+axiom_read(openaxiom_sio* s, char* buf, size_t n)
+{
+ return recv(s->socket, buf, n, 0);
+}
+
+
/* Return 1 is the last call was cancelled. */
static inline int
@@ -224,7 +243,7 @@ sigpipe_handler(int sig)
}
OPENAXIOM_EXPORT int
-wait_for_client_read(Sock *sock, char *buf, int buf_size, char *msg)
+wait_for_client_read(openaxiom_sio *sock, char *buf, int buf_size, char *msg)
{
int ret_val;
switch(sock->purpose) {
@@ -241,7 +260,7 @@ wait_for_client_read(Sock *sock, char *buf, int buf_size, char *msg)
}
OPENAXIOM_EXPORT int
-wait_for_client_write(Sock *sock,char *buf,int buf_size,char *msg)
+wait_for_client_write(openaxiom_sio *sock,char *buf,int buf_size,char *msg)
{
int ret_val;
switch(sock->purpose) {
@@ -258,7 +277,7 @@ wait_for_client_write(Sock *sock,char *buf,int buf_size,char *msg)
}
OPENAXIOM_EXPORT int
-sread(Sock *sock, char *buf, int buf_size, char *msg)
+sread(openaxiom_sio *sock, char *buf, int buf_size, char *msg)
{
int ret_val;
char err_msg[256];
@@ -283,7 +302,7 @@ sread(Sock *sock, char *buf, int buf_size, char *msg)
}
OPENAXIOM_EXPORT int
-swrite(Sock *sock,char *buf,int buf_size,char *msg)
+swrite(openaxiom_sio *sock,char *buf,int buf_size,char *msg)
{
int ret_val;
char err_msg[256];
@@ -319,7 +338,7 @@ sselect(int n,fd_set *rd, fd_set *wr, fd_set *ex, void *timeout)
}
OPENAXIOM_EXPORT int
-fill_buf(Sock *sock,char *buf, int len, char *msg)
+fill_buf(openaxiom_sio *sock,char *buf, int len, char *msg)
{
int bytes = 0, ret_val;
while(bytes < len) {
@@ -331,7 +350,7 @@ fill_buf(Sock *sock,char *buf, int len, char *msg)
}
OPENAXIOM_EXPORT int
-get_int(Sock *sock)
+get_int(openaxiom_sio *sock)
{
int val = -1, len;
len = fill_buf(sock, (char *)&val, sizeof(int), "integer");
@@ -356,7 +375,7 @@ sock_get_int(int purpose)
}
OPENAXIOM_EXPORT int
-get_ints(Sock *sock, int *vals, int num)
+get_ints(openaxiom_sio *sock, int *vals, int num)
{
int i;
for(i=0; i<num; i++)
@@ -373,7 +392,7 @@ sock_get_ints(int purpose, int *vals, int num)
}
OPENAXIOM_EXPORT int
-send_int(Sock *sock,int val)
+send_int(openaxiom_sio *sock,int val)
{
int ret_val;
ret_val = swrite(sock, (char *)&val, sizeof(int), NULL);
@@ -392,7 +411,7 @@ sock_send_int(int purpose,int val)
}
OPENAXIOM_EXPORT int
-send_ints(Sock *sock, int *vals, int num)
+send_ints(openaxiom_sio *sock, int *vals, int num)
{
int i;
for(i=0; i<num; i++)
@@ -410,7 +429,7 @@ sock_send_ints(int purpose, int *vals, int num)
}
OPENAXIOM_EXPORT int
-send_string_len(Sock *sock,char *str,int len)
+send_string_len(openaxiom_sio *sock,char *str,int len)
{
int val;
if (len > 1023) {
@@ -435,7 +454,7 @@ send_string_len(Sock *sock,char *str,int len)
}
OPENAXIOM_EXPORT int
-send_string(Sock *sock, char *str)
+send_string(openaxiom_sio *sock, char *str)
{
int val, len = strlen(str);
send_int(sock, len+1);
@@ -464,7 +483,7 @@ sock_send_string_len(int purpose, char * str, int len)
}
OPENAXIOM_EXPORT int
-send_strings(Sock *sock, char ** vals, int num)
+send_strings(openaxiom_sio *sock, char ** vals, int num)
{
int i;
for(i=0; i<num; i++)
@@ -482,7 +501,7 @@ sock_send_strings(int purpose, char **vals, int num)
}
OPENAXIOM_EXPORT char *
-get_string(Sock *sock)
+get_string(openaxiom_sio *sock)
{
int val, len;
char *buf;
@@ -510,7 +529,7 @@ sock_get_string(int purpose)
OPENAXIOM_EXPORT char *
-get_string_buf(Sock *sock, char *buf, int buf_len)
+get_string_buf(openaxiom_sio *sock, char *buf, int buf_len)
{
int val;
if(!str_len) str_len = get_int(sock);
@@ -539,7 +558,7 @@ sock_get_string_buf(int purpose, char * buf, int buf_len)
}
OPENAXIOM_EXPORT int
-get_strings(Sock *sock,char **vals,int num)
+get_strings(openaxiom_sio *sock,char **vals,int num)
{
int i;
for(i=0; i<num; i++)
@@ -556,7 +575,7 @@ sock_get_strings(int purpose, char ** vals, int num)
}
OPENAXIOM_EXPORT int
-send_float(Sock *sock, double num)
+send_float(openaxiom_sio *sock, double num)
{
int val;
val = swrite(sock, (char *)&num, sizeof(double), NULL);
@@ -575,7 +594,7 @@ sock_send_float(int purpose, double num)
}
OPENAXIOM_EXPORT int
-send_sfloats(Sock *sock, float *vals,int num)
+send_sfloats(openaxiom_sio *sock, float *vals,int num)
{
int i;
for(i=0; i<num; i++)
@@ -593,7 +612,7 @@ sock_send_sfloats(int purpose, float * vals, int num)
}
OPENAXIOM_EXPORT int
-send_floats(Sock *sock, double *vals, int num)
+send_floats(openaxiom_sio *sock, double *vals, int num)
{
int i;
for(i=0; i<num; i++)
@@ -611,7 +630,7 @@ sock_send_floats(int purpose, double *vals, int num)
}
OPENAXIOM_EXPORT double
-get_float(Sock *sock)
+get_float(openaxiom_sio *sock)
{
int val;
double num = -1.0;
@@ -631,7 +650,7 @@ sock_get_float(int purpose)
}
OPENAXIOM_EXPORT int
-get_sfloats(Sock *sock, float *vals, int num)
+get_sfloats(openaxiom_sio *sock, float *vals, int num)
{
int i;
for(i=0; i<num; i++)
@@ -649,7 +668,7 @@ sock_get_sfloats(int purpose,float * vals, int num)
}
OPENAXIOM_EXPORT int
-get_floats(Sock *sock,double *vals,int num)
+get_floats(openaxiom_sio *sock,double *vals,int num)
{
int i;
for(i=0; i<num; i++)
@@ -667,7 +686,7 @@ sock_get_floats(int purpose, double *vals, int num)
}
OPENAXIOM_EXPORT int
-wait_for_client_kill(Sock *sock, int sig)
+wait_for_client_kill(openaxiom_sio *sock, int sig)
{
int ret_val;
switch(sock->purpose) {
@@ -693,7 +712,7 @@ sock_get_remote_fd(int purpose)
}
OPENAXIOM_EXPORT int
-send_signal(Sock *sock, int sig)
+send_signal(openaxiom_sio *sock, int sig)
{
int ret_val;
#if HAVE_DECL_KILL
@@ -720,7 +739,7 @@ sock_send_signal(int purpose,int sig)
}
OPENAXIOM_EXPORT int
-send_wakeup(Sock *sock)
+send_wakeup(openaxiom_sio *sock)
{
#ifdef SIGUSR1
return send_signal(sock, SIGUSR1);
@@ -737,21 +756,21 @@ sock_send_wakeup(int purpose)
return -1;
}
-OPENAXIOM_EXPORT Sock *
+OPENAXIOM_EXPORT openaxiom_sio *
connect_to_local_server_new(char *server_name, int purpose, int time_out)
{
int max_con=(time_out == 0 ? 1000000 : time_out), i, code=-1;
- Sock *sock;
+ openaxiom_sio *sock;
char name[256];
make_server_name(name, server_name);
- sock = (Sock *) calloc(sizeof(Sock), 1);
+ sock = (openaxiom_sio *) calloc(sizeof(openaxiom_sio), 1);
if (sock == NULL) {
perror("allocating socket space");
return NULL;
}
- sock->socket = axiom_communication_link(AXIOM_AF_LOCAL);
+ sock->socket = axiom_communication_link(OPENAXIOM_AF_LOCAL);
if (is_invalid_socket(sock)) {
perror("opening client socket");
free(sock);
@@ -760,7 +779,7 @@ connect_to_local_server_new(char *server_name, int purpose, int time_out)
memset(server[1].addr.u_addr.sa_data, 0,
sizeof(server[1].addr.u_addr.sa_data));
- sock->addr.u_addr.sa_family = AXIOM_AF_LOCAL;
+ sock->addr.u_addr.sa_family = OPENAXIOM_AF_LOCAL;
strcpy(sock->addr.u_addr.sa_data, name);
for(i=0; i<max_con; i++) {
code = connect(sock->socket, &sock->addr.u_addr,
@@ -789,15 +808,15 @@ connect_to_local_server_new(char *server_name, int purpose, int time_out)
return sock;
}
-OPENAXIOM_EXPORT Sock *
+OPENAXIOM_EXPORT openaxiom_sio *
connect_to_local_server(char *server_name, int purpose, int time_out)
{
int max_con=(time_out == 0 ? 1000000 : time_out), i, code=-1;
- Sock *sock;
+ openaxiom_sio *sock;
char name[256];
make_server_name(name, server_name);
- sock = (Sock *) calloc(sizeof(Sock), 1);
+ sock = (openaxiom_sio *) calloc(sizeof(openaxiom_sio), 1);
if (sock == NULL) {
perror("allocating socket space");
return NULL;
@@ -805,7 +824,7 @@ connect_to_local_server(char *server_name, int purpose, int time_out)
sock->purpose = purpose;
/* create the socket */
- sock->socket = axiom_communication_link(AXIOM_AF_LOCAL);
+ sock->socket = axiom_communication_link(OPENAXIOM_AF_LOCAL);
if (is_invalid_socket(sock)) {
perror("opening client socket");
free(sock);
@@ -814,7 +833,7 @@ connect_to_local_server(char *server_name, int purpose, int time_out)
/* connect socket using name specified in command line */
memset(server[1].addr.u_addr.sa_data, 0,
sizeof(server[1].addr.u_addr.sa_data));
- sock->addr.u_addr.sa_family = AXIOM_AF_LOCAL;
+ sock->addr.u_addr.sa_family = OPENAXIOM_AF_LOCAL;
strcpy(sock->addr.u_addr.sa_data, name);
for(i=0; i<max_con; i++) {
code = connect(sock->socket, &sock->addr.u_addr,
@@ -845,7 +864,7 @@ connect_to_local_server(char *server_name, int purpose, int time_out)
/* act as terminal session for sock connected to stdin and stdout of another
process */
OPENAXIOM_EXPORT void
-remote_stdio(Sock *sock)
+remote_stdio(openaxiom_sio *sock)
{
char buf[1024];
fd_set rd;
@@ -902,7 +921,7 @@ make_server_number(void)
}
OPENAXIOM_EXPORT void
-close_socket(axiom_socket socket_num, char *name)
+close_socket(openaxiom_socket socket_num, char *name)
{
axiom_close_socket(socket_num);
#ifndef RTplatform
@@ -969,13 +988,13 @@ open_server(char *server_name)
listen(server[0].socket,5);
} */
/* Next create the local domain socket */
- server[1].socket = axiom_communication_link(AXIOM_AF_LOCAL);
+ server[1].socket = axiom_communication_link(OPENAXIOM_AF_LOCAL);
if (is_invalid_socket(&server[1])) {
perror("opening local server socket");
server[1].socket = 0;
return -2;
} else {
- server[1].addr.u_addr.sa_family = AXIOM_AF_LOCAL;
+ server[1].addr.u_addr.sa_family = OPENAXIOM_AF_LOCAL;
memset(server[1].addr.u_addr.sa_data, 0,
sizeof(server[1].addr.u_addr.sa_data));
strcpy(server[1].addr.u_addr.sa_data, name);
@@ -998,12 +1017,12 @@ open_server(char *server_name)
}
OPENAXIOM_EXPORT int
-accept_connection(Sock *sock)
+accept_connection(openaxiom_sio *sock)
{
int client;
for(client=0; client<MaxClients && clients[client].socket != 0; client++);
if (client == MaxClients) {
- printf("Ran out of client Sock structures\n");
+ printf("Ran out of client openaxiom_sio structures\n");
return -1;
}
clients[client].socket = accept(sock->socket, 0, 0);
@@ -1019,7 +1038,7 @@ accept_connection(Sock *sock)
/* reads a the socket purpose declaration for classification */
OPENAXIOM_EXPORT void
-get_socket_type(Sock *sock)
+get_socket_type(openaxiom_sio *sock)
{
sock->pid = get_int(sock);
sock->purpose = get_int(sock);
@@ -1065,7 +1084,7 @@ sock_accept_connection(int purpose)
/* direct stdin and stdout from the given socket */
OPENAXIOM_EXPORT void
-redirect_stdio(Sock *sock)
+redirect_stdio(openaxiom_sio *sock)
{
int fd;
/* setbuf(stdout, NULL); */
diff --git a/src/lib/spadcolors.c b/src/lib/spadcolors.c
index 4cd79e09..4b240482 100644
--- a/src/lib/spadcolors.c
+++ b/src/lib/spadcolors.c
@@ -173,7 +173,7 @@ HLStoRGB(HLS hls)
* int makeColors(dsply,scrn,colorMap,total_Shades) *
* *
* This routine tries to allocate an adequate color *
- * map to be used by all the AXIOM applications *
+ * map to be used by all the OpenAxiom applications *
* that are to be run under X Windows that use *
* colors that may be user-definable (e.g. viewports, *
* HyperTeX, etc). All these application should call *
@@ -293,7 +293,7 @@ makeColors(Display *dsply, int scrn, Colormap *colorMap,
free(*colorIndex);
fprintf(stderr,
" > Warning: cannot allocate all the necessary colors - switching to monochrome mode\n");
- *colorIndex = (unsigned long *) saymem("while allocating the colormap for AXIOM ", 2, sizeof(unsigned long));
+ *colorIndex = (unsigned long *) saymem("while allocating the colormap for OpenAxiom ", 2, sizeof(unsigned long));
(*colorIndex)[0] = BlackPixel(dsply, scrn);
(*colorIndex)[1] = WhitePixel(dsply, scrn);
return (-1);
@@ -362,7 +362,7 @@ makePermVector(Display *dsply, int scrn, unsigned long **permIndex)
* int makeNewColorMap(dsply,colorMap,smoothHue) *
* *
* This routine tries to allocate an adequate color *
- * map to be used by the AXIOM smooth shading *
+ * map to be used by the OpenAxiom smooth shading *
* application that is to be run under X Windows. *
* The colors are allocated from available space in *
* the colorMap and returned in the array pixels. *
@@ -471,7 +471,7 @@ FreePixels(Display *dsply, Colormap colorMap, int num)
* *
* Use either makeNewColormap() OR AllocCells(). *
* This routine tries to allocate an adequate color *
- * map to be used by the AXIOM smooth shading *
+ * map to be used by the OpenAxiom smooth shading *
* application that is to be run under X Windows. *
* The colors are allocated from available space in *
* the colorMap and returned in the array pixels. *
diff --git a/src/sman/session.c b/src/sman/session.c
index 8376e9ca..27082d4e 100644
--- a/src/sman/session.c
+++ b/src/sman/session.c
@@ -53,26 +53,26 @@ static void usr2_handler(int);
static void term_handler(int);
static void close_client(int);
static void read_SpadServer_command(void);
-static int test_sock_for_process(Sock*);
+static int test_sock_for_process(openaxiom_sio*);
static void read_menu_client_command(void);
static void read_from_spad_io(void);
static void kill_spad(void);
-static int accept_session_connection(Sock*);
-static void read_from_session(Sock*);
+static int accept_session_connection(openaxiom_sio*);
+static void read_from_session(openaxiom_sio*);
static void manage_sessions(void);
#define BufSize 4096 /* size of communication buffer */
typedef struct sock_list { /* linked list of Sock */
- Sock Socket;
+ openaxiom_sio Socket;
struct sock_list *next;
} Sock_List;
-Sock *spad_io = (Sock *) 0; /* to_server socket for SessionIO */
-Sock *spad_server = (Sock *) 0; /* to_server socket for SpadServer */
-Sock *menu_client = (Sock *) 0; /* to_client socket for MenuServerName */
-Sock *active_session = (Sock *) 0; /* pointer to currently active session */
+openaxiom_sio* spad_io = 0; /* to_server socket for SessionIO */
+openaxiom_sio* spad_server = 0; /* to_server socket for SpadServer */
+openaxiom_sio* menu_client = 0; /* to_client socket for MenuServerName */
+openaxiom_sio* active_session = 0; /* pointer to currently active session */
Sock_List *plSock = (Sock_List *) 0;
@@ -134,8 +134,8 @@ fprintf(stderr,"close_client(%d)\n",frame);
if ( (plSock) && (plSock->Socket.frame == frame) ){
socket_fd = plSock->Socket.socket;
- send_signal((Sock *)plSock, SIGTERM);
- if ( menu_client != (Sock *) 0){
+ send_signal((openaxiom_sio *)plSock, SIGTERM);
+ if ( menu_client != (openaxiom_sio *) 0){
send_int(menu_client,CloseClient);
send_int(menu_client,(*plSock).Socket.pid);
}
@@ -148,7 +148,7 @@ fprintf(stderr,"trying to clear %u\n",socket_fd);
{plSock = (Sock_List *) 0;}
else
{plSock = plSock->next;}
- active_session = (Sock *) 0;
+ active_session = (openaxiom_sio *) 0;
num_active_clients--;
free(locSock);
}
@@ -159,8 +159,8 @@ fprintf(stderr,"trying to clear %u\n",socket_fd);
for (pSock=plSock; pSock->next != (Sock_List *) 0 ; pSock=pSock->next)
if (pSock->next->Socket.frame == frame){
socket_fd = pSock->next->Socket.socket;
- send_signal((Sock *)pSock->next, SIGTERM);
- if ( menu_client != (Sock *) 0){
+ send_signal((openaxiom_sio *)pSock->next, SIGTERM);
+ if ( menu_client != (openaxiom_sio *) 0){
send_int(menu_client,CloseClient);
send_int(menu_client,(*plSock).Socket.pid);
}
@@ -174,7 +174,7 @@ fprintf(stderr,"trying to clear %u\n",socket_fd);
else
{ pSock->next = pSock->next->next;}
num_active_clients--;
- active_session = (Sock *) 0;
+ active_session = (openaxiom_sio *) 0;
free(locSock);
break;
}
@@ -191,7 +191,7 @@ read_SpadServer_command(void)
cmd = get_int(spad_server);
switch (cmd) {
case EndOfOutput:
- if (menu_client != (Sock *) 0) send_signal(menu_client, SIGUSR2);
+ if (menu_client != (openaxiom_sio *) 0) send_signal(menu_client, SIGUSR2);
if (reading_output != 0) reading_output = 0;
break;
case QueryClients:
@@ -212,9 +212,9 @@ read_SpadServer_command(void)
}
static int
-test_sock_for_process(Sock *sock)
+test_sock_for_process(openaxiom_sio *sock)
{
- if (sock == (Sock *)0 ) return -1;
+ if (sock == (openaxiom_sio *)0 ) return -1;
return kill(sock->pid, 0);
}
@@ -229,7 +229,7 @@ read_menu_client_command(void)
if (test_sock_for_process(menu_client) == -1) {
FD_CLR(socket_fd,&session_socket_mask);
- menu_client = (Sock *) 0;
+ menu_client = (openaxiom_sio *) 0;
reading_output = 0;
return;
}
@@ -237,7 +237,7 @@ read_menu_client_command(void)
switch(cmd) {
case -1: /* socket closed */
FD_CLR(socket_fd,&session_socket_mask);
- menu_client = (Sock *) 0;
+ menu_client = (openaxiom_sio *) 0;
reading_output = 0;
break;
case SwitchFrames:
@@ -249,7 +249,7 @@ fprintf(stderr,"menu:SwitchFrames\n");
send_int(spad_server, frame);
for(i=0,pSock=plSock; pSock != (Sock_List *) 0 ; i++,pSock=pSock->next)
if ((pSock->Socket.frame == frame)) {
- active_session = (Sock *)pSock;
+ active_session = (openaxiom_sio *)pSock;
reading_output = 1;
break;
}
@@ -265,7 +265,7 @@ fprintf(stderr,"menu:QuerySpad\n");
break;
default:
fprintf(stderr, "session : unknown command from MenuServer: %d\n", cmd);
- menu_client = (Sock *) 0;
+ menu_client = (openaxiom_sio *) 0;
break;
}
}
@@ -276,7 +276,7 @@ read_from_spad_io(void)
int ret_code;
ret_code = sread(spad_io, big_bad_buf, BufSize, "session: stdout socket");
if (ret_code == -1) return;
- if(active_session != (Sock *) 0) {
+ if(active_session != (openaxiom_sio *) 0) {
ret_code = swrite(active_session, big_bad_buf, ret_code,
NULL);
}
@@ -293,14 +293,14 @@ kill_spad(void)
(i<num_active_clients) && (pSock != (Sock_List *) 0);
i++,pSock=pSock->next) {
if ((pSock->Socket).socket != 0)
- send_signal((Sock *)pSock, SIGTERM);
+ send_signal((openaxiom_sio *)pSock, SIGTERM);
}
- if (menu_client != (Sock *) 0) send_signal(menu_client, SIGTERM);
+ if (menu_client != (openaxiom_sio *) 0) send_signal(menu_client, SIGTERM);
exit(0);
}
static int
-accept_session_connection(Sock *server_sock)
+accept_session_connection(openaxiom_sio *server_sock)
{
int sock_fd, ret_code;
Sock_List *pls;
@@ -314,7 +314,7 @@ accept_session_connection(Sock *server_sock)
return -1;
}
(pls->Socket).socket = sock_fd;
- get_socket_type((Sock *)pls);
+ get_socket_type((openaxiom_sio *)pls);
switch((pls->Socket).purpose) {
case KillSpad:
@@ -348,9 +348,10 @@ accept_session_connection(Sock *server_sock)
FD_SET(plSock->Socket.socket, &session_socket_mask);
send_int(spad_server, CreateFrame);
plSock->Socket.frame = get_int(spad_server);
- active_session = (Sock *)plSock;
+ active_session = (openaxiom_sio *)plSock;
get_string_buf(spad_server, big_bad_buf, BufSize);
- ret_code = swrite((Sock *)plSock, big_bad_buf, strlen(big_bad_buf)+1,
+ ret_code = swrite((openaxiom_sio *)plSock, big_bad_buf,
+ strlen(big_bad_buf)+1,
"session: writing to InterpWindow");
if (ret_code == -1)
return -1;
@@ -364,7 +365,7 @@ pr();
}
static void
-read_from_session(Sock *sock)
+read_from_session(openaxiom_sio *sock)
{
int ret_code;
if (sock != active_session) {
@@ -375,14 +376,14 @@ read_from_session(Sock *sock)
ret_code = sread(sock, big_bad_buf, BufSize,
"session: reading InterpWindow");
if (ret_code == -1) {
- active_session = (Sock *) 0;
+ active_session = (openaxiom_sio *) 0;
reading_output = 0;
return;
}
ret_code = swrite(spad_io, big_bad_buf, ret_code,
"session: writing SessionIO");
if (ret_code == -1) {
- active_session = (Sock *)0 ;
+ active_session = (openaxiom_sio *)0 ;
reading_output = 0;
return;
}
@@ -426,7 +427,8 @@ fprintf(stderr,"[rd=%u ",*((long *)rd.fds_bits));
fprintf(stderr,"rd=%u]\n",*((long *)rd.fds_bits));
#endif
- if ((menu_client != (Sock *) 0) && FD_ISSET(menu_client->socket, &rd)) {
+ if ((menu_client != (openaxiom_sio *) 0)
+ && FD_ISSET(menu_client->socket, &rd)) {
/* MenuServer wants to talk */
read_menu_client_command(); }
@@ -442,10 +444,10 @@ fprintf(stderr,"rd=%u]\n",*((long *)rd.fds_bits));
for(pSock=plSock; pSock != (Sock_List *) 0 ; pSock=pSock->next) {
- if ((active_session == (Sock *)pSock || !reading_output) &&
+ if ((active_session == (openaxiom_sio *)pSock || !reading_output) &&
(pSock->Socket).socket>0 && FD_ISSET(pSock->Socket.socket, &rd)) {
/* An InterpWindow */
- read_from_session((Sock *)pSock); }
+ read_from_session((openaxiom_sio *)pSock); }
}
@@ -467,8 +469,8 @@ main(void)
/* spad_server connects to Lisp server socket
read_SpadServer_command handles requests */
spad_server = connect_to_local_server(SpadServer, SessionManager, Forever);
- if (spad_server == (Sock *) 0) {
- fprintf(stderr, "session: Cannot connect to AXIOM server!\n");
+ if (spad_server == (openaxiom_sio *) 0) {
+ fprintf(stderr, "session: Cannot connect to OpenAxiom server!\n");
exit(0);
}
else {
@@ -483,8 +485,8 @@ main(void)
/* spad_io connects to SessionIOName server socket
this is Lisp std IO read_from_spad_io handles requests */
spad_io = connect_to_local_server(SessionIOName, SessionIO, Forever);
- if (spad_io == (Sock *) 0) {
- fprintf(stderr, "session: Cannot connect to AXIOM IO!\n");
+ if (spad_io == (openaxiom_sio *) 0) {
+ fprintf(stderr, "session: Cannot connect to OpenAxiom IO!\n");
exit(0);
}
else {
diff --git a/src/sman/sman.c b/src/sman/sman.c
index d4136afd..dafad672 100644
--- a/src/sman/sman.c
+++ b/src/sman/sman.c
@@ -1,5 +1,5 @@
/*
- 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.
@@ -16,7 +16,7 @@
the documentation and/or other materials provided with the
distribution.
- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+ - 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.
@@ -125,7 +125,7 @@ char ClefCommandLine[256];
#define BufSize 4096 /* size of communication buffer */
char big_bad_buf[BufSize]; /* big I/O buffer */
-Sock *session_io = NULL; /* socket connecting to session manager */
+openaxiom_sio* session_io = NULL; /* socket connecting to session manager */
/***********************************************************/
/* Some characters used and externally defined in edible.h */
@@ -403,11 +403,11 @@ start_the_spadclient(void)
char command[256];
if (start_clef)
sprintf(command,
- "xterm -sb -sl 500 -name axiomclient -n AXIOM -T AXIOM -e %s %s",
+ "xterm -sb -sl 500 -name axiomclient -n OpenAxiom -T OpenAxiom -e %s %s",
ClefProgram, SpadClientProgram);
else
sprintf(command,
- "xterm -sb -sl 500 -name axiomclient -n AXIOM -T AXIOM -e %s",
+ "xterm -sb -sl 500 -name axiomclient -n OpenAxiom -T OpenAxiom -e %s",
SpadClientProgram);
spawn_of_hell(command, NadaDelShitsky);
}
diff --git a/src/sman/spadclient.c b/src/sman/spadclient.c
index d7825dc7..5b714aaf 100644
--- a/src/sman/spadclient.c
+++ b/src/sman/spadclient.c
@@ -46,7 +46,7 @@
#include "sockio.h"
-Sock *sock;
+openaxiom_sio* sock;
static void
inter_handler(int sig)