diff options
author | dos-reis <gdr@axiomatics.org> | 2008-04-28 02:13:31 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-04-28 02:13:31 +0000 |
commit | 3223409ab97b1a6a8e60d541b0c7b5b69c8b9a83 (patch) | |
tree | 5c7ffe18c0f939cfcc57bfe33f999815d6c3a317 /src | |
parent | 97b5280bd5ff44b94213559391421ba39e11249a (diff) | |
download | open-axiom-3223409ab97b1a6a8e60d541b0c7b5b69c8b9a83.tar.gz |
* configure.ac.pamphlet: Check from uint8_t.
* config/openaxiom-c-macros.h.in: Rename from
config/axiom-c-macros.h.in.
* src: Propagate change.
Diffstat (limited to 'src')
113 files changed, 199 insertions, 197 deletions
diff --git a/src/clef/Makefile.in b/src/clef/Makefile.in index cd745337..42a233e4 100644 --- a/src/clef/Makefile.in +++ b/src/clef/Makefile.in @@ -65,7 +65,7 @@ $(axiom_target_bindir)/clef$(EXEEXT): $(clef_objects) $(clef_DEPENDENCIES) .PRECIOUS: %.lo %.lo: ${INC}/useproto.h ${INC}/edible.h \ - $(axiom_configdir)/axiom-c-macros.h + $(axiom_configdir)/openaxiom-c-macros.h %.lo: %.c $(axiom_c_macros_h) $(COMPILE) -o $@ ${CCF} $(axiom_includes) $< diff --git a/src/clef/edible.c b/src/clef/edible.c index c46634da..a2b87863 100644 --- a/src/clef/edible.c +++ b/src/clef/edible.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. @@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> @@ -47,7 +47,6 @@ #include <signal.h> -#include "axiom-c-macros.h" #include "sockio.h" #include "edible.h" #include "com.h" diff --git a/src/driver/utils.c b/src/driver/utils.c index e074e106..f5744c9a 100644 --- a/src/driver/utils.c +++ b/src/driver/utils.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <string.h> #include <errno.h> diff --git a/src/driver/utils.h b/src/driver/utils.h index 41d7c345..9c6b8041 100644 --- a/src/driver/utils.h +++ b/src/driver/utils.h @@ -34,7 +34,7 @@ #ifndef OPENAXIOM_UTILS_INCLUDED #define OPENAXIOM_UTILS_INCLUDED -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #if HAVE_UNISTD_H # include <unistd.h> #endif diff --git a/src/etc/asq.c.pamphlet b/src/etc/asq.c.pamphlet index fdf55daa..f47acf6c 100644 --- a/src/etc/asq.c.pamphlet +++ b/src/etc/asq.c.pamphlet @@ -529,7 +529,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <stdio.h> #include <string.h> -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" /* we need to predeclare some functions so their signatures are known */ int printandor(char *list); diff --git a/src/graph/Gdraws/Gdraws0.h b/src/graph/Gdraws/Gdraws0.h index 8d703347..632c3704 100644 --- a/src/graph/Gdraws/Gdraws0.h +++ b/src/graph/Gdraws/Gdraws0.h @@ -36,8 +36,8 @@ #ifndef _GDRAWS0_H_ #define _GDRAWS0_H_ 1 +#include "openaxiom-c-macros.h" #include <X11/Xlib.h> -#include "axiom-c-macros.h" #define yes 1 diff --git a/src/graph/view2D/buttons2d.c b/src/graph/view2D/buttons2d.c index 226aeb26..1babc196 100644 --- a/src/graph/view2D/buttons2d.c +++ b/src/graph/view2D/buttons2d.c @@ -34,7 +34,7 @@ */ #define _BUTTONS2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> diff --git a/src/graph/view2D/control2d.c b/src/graph/view2D/control2d.c index 18409a49..8e3b82ad 100644 --- a/src/graph/view2D/control2d.c +++ b/src/graph/view2D/control2d.c @@ -34,7 +34,7 @@ */ #define _CONTROL2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> diff --git a/src/graph/view2D/graph2d.c b/src/graph/view2D/graph2d.c index 04d855e9..11f203b1 100644 --- a/src/graph/view2D/graph2d.c +++ b/src/graph/view2D/graph2d.c @@ -34,7 +34,7 @@ */ #define _GRAPH2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <unistd.h> diff --git a/src/graph/view2D/main2d.c b/src/graph/view2D/main2d.c index fcdcf929..94cd1015 100644 --- a/src/graph/view2D/main2d.c +++ b/src/graph/view2D/main2d.c @@ -34,7 +34,7 @@ */ #define _MAIN2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <stdlib.h> diff --git a/src/graph/view2D/pot2d.c b/src/graph/view2D/pot2d.c index 63b06ab3..19f34e96 100644 --- a/src/graph/view2D/pot2d.c +++ b/src/graph/view2D/pot2d.c @@ -34,7 +34,7 @@ */ #define _POT2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header2.h" diff --git a/src/graph/view2D/process2d.c b/src/graph/view2D/process2d.c index 595e5a1c..e85d7721 100644 --- a/src/graph/view2D/process2d.c +++ b/src/graph/view2D/process2d.c @@ -34,7 +34,7 @@ */ #define _PROCESS2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <stdio.h> diff --git a/src/graph/view2D/spadAction2d.c b/src/graph/view2D/spadAction2d.c index e837b47c..eafd4325 100644 --- a/src/graph/view2D/spadAction2d.c +++ b/src/graph/view2D/spadAction2d.c @@ -34,7 +34,7 @@ */ #define _SPADACTION2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/graph/view2D/stuff2d.c b/src/graph/view2D/stuff2d.c index 9b0c396b..1674d2f2 100644 --- a/src/graph/view2D/stuff2d.c +++ b/src/graph/view2D/stuff2d.c @@ -34,7 +34,7 @@ */ #define _STUFF2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <unistd.h> #include <stdlib.h> diff --git a/src/graph/view2D/viewport2D.c b/src/graph/view2D/viewport2D.c index 0ce5de88..d0f4ee30 100644 --- a/src/graph/view2D/viewport2D.c +++ b/src/graph/view2D/viewport2D.c @@ -34,7 +34,7 @@ */ #define _VIEWPORT2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/graph/view2D/write2d.c b/src/graph/view2D/write2d.c index 4eaffbe2..41740132 100644 --- a/src/graph/view2D/write2d.c +++ b/src/graph/view2D/write2d.c @@ -34,7 +34,7 @@ */ #define _WRITE2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/graph/view3D/buttons3d.c b/src/graph/view3D/buttons3d.c index 56d52584..d96031b9 100644 --- a/src/graph/view3D/buttons3d.c +++ b/src/graph/view3D/buttons3d.c @@ -34,7 +34,7 @@ */ #define _BUTTONS3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" #include "cpanel.h" diff --git a/src/graph/view3D/closeView3d.c b/src/graph/view3D/closeView3d.c index c4b55185..14c64110 100644 --- a/src/graph/view3D/closeView3d.c +++ b/src/graph/view3D/closeView3d.c @@ -34,7 +34,7 @@ */ #define _CLOSEVIEW3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include "header.h" diff --git a/src/graph/view3D/component3d.c b/src/graph/view3D/component3d.c index 2b361295..24985144 100644 --- a/src/graph/view3D/component3d.c +++ b/src/graph/view3D/component3d.c @@ -34,7 +34,7 @@ */ #define _COMPONENT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" #include "draw.h" diff --git a/src/graph/view3D/control3d.c b/src/graph/view3D/control3d.c index a2a693cb..6178cd27 100644 --- a/src/graph/view3D/control3d.c +++ b/src/graph/view3D/control3d.c @@ -34,7 +34,7 @@ */ #define _CONTROL3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <stdio.h> diff --git a/src/graph/view3D/illuminate3d.c b/src/graph/view3D/illuminate3d.c index bb47a9ee..323e5916 100644 --- a/src/graph/view3D/illuminate3d.c +++ b/src/graph/view3D/illuminate3d.c @@ -34,7 +34,7 @@ */ #define _ILLUMINATE3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <math.h> diff --git a/src/graph/view3D/lightbut3d.c b/src/graph/view3D/lightbut3d.c index 3ff3a931..b15b14da 100644 --- a/src/graph/view3D/lightbut3d.c +++ b/src/graph/view3D/lightbut3d.c @@ -34,7 +34,7 @@ */ #define _LIGHTBUT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" #include "cpanel.h" diff --git a/src/graph/view3D/lighting3d.c b/src/graph/view3D/lighting3d.c index b3432c5f..a6317f53 100644 --- a/src/graph/view3D/lighting3d.c +++ b/src/graph/view3D/lighting3d.c @@ -34,7 +34,7 @@ */ #define _LIGHTING3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <math.h> #include <string.h> diff --git a/src/graph/view3D/main3d.c b/src/graph/view3D/main3d.c index 313e9040..8421e35f 100644 --- a/src/graph/view3D/main3d.c +++ b/src/graph/view3D/main3d.c @@ -34,7 +34,7 @@ */ #define _MAIN3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <stdio.h> diff --git a/src/graph/view3D/mesh3d.c b/src/graph/view3D/mesh3d.c index 41af7277..716cebeb 100644 --- a/src/graph/view3D/mesh3d.c +++ b/src/graph/view3D/mesh3d.c @@ -34,7 +34,7 @@ */ #define _MESH3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <math.h> diff --git a/src/graph/view3D/msort3d.c b/src/graph/view3D/msort3d.c index 792196a8..f034fe2d 100644 --- a/src/graph/view3D/msort3d.c +++ b/src/graph/view3D/msort3d.c @@ -34,7 +34,7 @@ */ #define _MSORT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" /***************************************************** diff --git a/src/graph/view3D/pot3d.c b/src/graph/view3D/pot3d.c index cdd52799..0e519313 100644 --- a/src/graph/view3D/pot3d.c +++ b/src/graph/view3D/pot3d.c @@ -34,7 +34,7 @@ */ #define _POT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" #include "all_3d.H1" diff --git a/src/graph/view3D/process3d.c b/src/graph/view3D/process3d.c index df52259d..211760ba 100644 --- a/src/graph/view3D/process3d.c +++ b/src/graph/view3D/process3d.c @@ -34,7 +34,7 @@ */ #define _PROCESS3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <stdlib.h> diff --git a/src/graph/view3D/project3d.c b/src/graph/view3D/project3d.c index 185eda45..f95d12d5 100644 --- a/src/graph/view3D/project3d.c +++ b/src/graph/view3D/project3d.c @@ -34,7 +34,7 @@ */ #define _PROJECT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include "header.h" diff --git a/src/graph/view3D/quit3d.c b/src/graph/view3D/quit3d.c index 27d0b6b0..bde9e329 100644 --- a/src/graph/view3D/quit3d.c +++ b/src/graph/view3D/quit3d.c @@ -34,7 +34,7 @@ */ #define _QUIT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include "header.h" diff --git a/src/graph/view3D/quitbut3d.c b/src/graph/view3D/quitbut3d.c index ca458386..448d80ed 100644 --- a/src/graph/view3D/quitbut3d.c +++ b/src/graph/view3D/quitbut3d.c @@ -34,7 +34,7 @@ */ #define _QUITBUT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" #include "cpanel.h" diff --git a/src/graph/view3D/save3d.c b/src/graph/view3D/save3d.c index 23e85d54..5263f2e3 100644 --- a/src/graph/view3D/save3d.c +++ b/src/graph/view3D/save3d.c @@ -34,7 +34,7 @@ */ #define _SAVE3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <string.h> diff --git a/src/graph/view3D/savebut3d.c b/src/graph/view3D/savebut3d.c index 241c2fab..d6e1e900 100644 --- a/src/graph/view3D/savebut3d.c +++ b/src/graph/view3D/savebut3d.c @@ -34,7 +34,7 @@ */ #define _SAVEBUT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" #include "cpanel.h" diff --git a/src/graph/view3D/smoothShade3d.c b/src/graph/view3D/smoothShade3d.c index a8ae6bb7..81b01bcb 100644 --- a/src/graph/view3D/smoothShade3d.c +++ b/src/graph/view3D/smoothShade3d.c @@ -34,7 +34,7 @@ */ #define _SMOOTHSHADE_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <math.h> diff --git a/src/graph/view3D/spadAction3d.c b/src/graph/view3D/spadAction3d.c index 64530676..c9af638b 100644 --- a/src/graph/view3D/spadAction3d.c +++ b/src/graph/view3D/spadAction3d.c @@ -34,7 +34,7 @@ */ #define _SPADACTION3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <unistd.h> #include <stdio.h> diff --git a/src/graph/view3D/stuff3d.c b/src/graph/view3D/stuff3d.c index 9c3041da..8858be42 100644 --- a/src/graph/view3D/stuff3d.c +++ b/src/graph/view3D/stuff3d.c @@ -34,7 +34,7 @@ */ #define _STUFF3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" diff --git a/src/graph/view3D/surface3d.c b/src/graph/view3D/surface3d.c index b89bb6d6..be54efa7 100644 --- a/src/graph/view3D/surface3d.c +++ b/src/graph/view3D/surface3d.c @@ -34,7 +34,7 @@ */ #define _SURFACE3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <math.h> diff --git a/src/graph/view3D/testcol.c b/src/graph/view3D/testcol.c index c783943f..9638ad69 100644 --- a/src/graph/view3D/testcol.c +++ b/src/graph/view3D/testcol.c @@ -34,7 +34,7 @@ */ #define _MAIN3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <stdio.h> #include <stdlib.h> diff --git a/src/graph/view3D/transform3d.c b/src/graph/view3D/transform3d.c index 52483c6a..4030e25c 100644 --- a/src/graph/view3D/transform3d.c +++ b/src/graph/view3D/transform3d.c @@ -34,7 +34,7 @@ */ #define _TRANSFORM3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "header.h" diff --git a/src/graph/view3D/viewport3d.c b/src/graph/view3D/viewport3d.c index 3b7482c2..67b19e34 100644 --- a/src/graph/view3D/viewport3d.c +++ b/src/graph/view3D/viewport3d.c @@ -34,7 +34,7 @@ */ #define _VIEWPORT3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <math.h> #include <stdio.h> diff --git a/src/graph/view3D/volume3d.c b/src/graph/view3D/volume3d.c index 841705c2..a94e518e 100644 --- a/src/graph/view3D/volume3d.c +++ b/src/graph/view3D/volume3d.c @@ -34,7 +34,7 @@ */ #define _VOLUME3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <math.h> #include <string.h> diff --git a/src/graph/view3D/write3d.c b/src/graph/view3D/write3d.c index ee0711fb..caf3aab3 100644 --- a/src/graph/view3D/write3d.c +++ b/src/graph/view3D/write3d.c @@ -34,7 +34,7 @@ */ #define _WRITE3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/graph/viewAlone/spoon2D.c b/src/graph/viewAlone/spoon2D.c index 45353ffc..236caeb8 100644 --- a/src/graph/viewAlone/spoon2D.c +++ b/src/graph/viewAlone/spoon2D.c @@ -34,7 +34,7 @@ */ #define _SPOON2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <unistd.h> #include <stdlib.h> diff --git a/src/graph/viewAlone/spoonComp.c b/src/graph/viewAlone/spoonComp.c index c3b36f44..79fe174c 100644 --- a/src/graph/viewAlone/spoonComp.c +++ b/src/graph/viewAlone/spoonComp.c @@ -34,7 +34,7 @@ */ #define _SPOONCOMP_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> diff --git a/src/graph/viewAlone/viewAlone.c b/src/graph/viewAlone/viewAlone.c index 9df3b047..07f89039 100644 --- a/src/graph/viewAlone/viewAlone.c +++ b/src/graph/viewAlone/viewAlone.c @@ -34,7 +34,7 @@ */ #define _VIEWALONE_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include "viewAlone.h" diff --git a/src/graph/viewman/cleanup.c b/src/graph/viewman/cleanup.c index 761e7f92..4dfbc04e 100644 --- a/src/graph/viewman/cleanup.c +++ b/src/graph/viewman/cleanup.c @@ -34,7 +34,7 @@ */ #define _CLEANUP_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> diff --git a/src/graph/viewman/fun2D.c b/src/graph/viewman/fun2D.c index 49a84454..3f38dd71 100644 --- a/src/graph/viewman/fun2D.c +++ b/src/graph/viewman/fun2D.c @@ -34,7 +34,7 @@ */ #define _FUN2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> diff --git a/src/graph/viewman/fun3D.c b/src/graph/viewman/fun3D.c index 15ed92e8..19e186ef 100644 --- a/src/graph/viewman/fun3D.c +++ b/src/graph/viewman/fun3D.c @@ -34,7 +34,7 @@ */ #define _FUN3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> diff --git a/src/graph/viewman/make2D.c b/src/graph/viewman/make2D.c index 74f89b78..65810003 100644 --- a/src/graph/viewman/make2D.c +++ b/src/graph/viewman/make2D.c @@ -34,7 +34,7 @@ */ #define _MAKE2D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "viewman.h" diff --git a/src/graph/viewman/make3D.c b/src/graph/viewman/make3D.c index 349ebf09..30f2e869 100644 --- a/src/graph/viewman/make3D.c +++ b/src/graph/viewman/make3D.c @@ -34,7 +34,7 @@ */ #define _MAKE3D_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> diff --git a/src/graph/viewman/makeGraph.c b/src/graph/viewman/makeGraph.c index d4188a41..331d32cf 100644 --- a/src/graph/viewman/makeGraph.c +++ b/src/graph/viewman/makeGraph.c @@ -34,7 +34,7 @@ */ #define _MAKEGRAPH_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <stdio.h> diff --git a/src/graph/viewman/readView.c b/src/graph/viewman/readView.c index 201e26b4..b21cf3df 100644 --- a/src/graph/viewman/readView.c +++ b/src/graph/viewman/readView.c @@ -34,7 +34,7 @@ */ #define _READVIEW_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <unistd.h> #include <stdio.h> diff --git a/src/graph/viewman/sselect.c b/src/graph/viewman/sselect.c index 96516be2..0e56e9a7 100644 --- a/src/graph/viewman/sselect.c +++ b/src/graph/viewman/sselect.c @@ -34,7 +34,7 @@ */ #define _SSELECT_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <errno.h> diff --git a/src/graph/viewman/viewman.c b/src/graph/viewman/viewman.c index fca67796..a8dd4777 100644 --- a/src/graph/viewman/viewman.c +++ b/src/graph/viewman/viewman.c @@ -34,7 +34,7 @@ */ #define _VIEWMAN_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <unistd.h> #include <sys/time.h> diff --git a/src/hyper/ReadBitmap.c b/src/hyper/ReadBitmap.c index 578c8e3c..845e9e9d 100644 --- a/src/hyper/ReadBitmap.c +++ b/src/hyper/ReadBitmap.c @@ -35,7 +35,7 @@ #define _READBITMAP_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" diff --git a/src/hyper/cond.c b/src/hyper/cond.c index d60e7a82..b0a72229 100644 --- a/src/hyper/cond.c +++ b/src/hyper/cond.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _COND_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/debug.c b/src/hyper/debug.c index 2b0d1836..7260ca15 100644 --- a/src/hyper/debug.c +++ b/src/hyper/debug.c @@ -34,7 +34,7 @@ */ #define _DEBUG_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/dialog.c b/src/hyper/dialog.c index a65b3ae8..61cdda70 100644 --- a/src/hyper/dialog.c +++ b/src/hyper/dialog.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _DIALOG_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/display.c b/src/hyper/display.c index 7e9d364a..4271e81e 100644 --- a/src/hyper/display.c +++ b/src/hyper/display.c @@ -52,7 +52,7 @@ */ #define _DISPLAY_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" diff --git a/src/hyper/event.c b/src/hyper/event.c index b7dfe6b1..10930dc7 100644 --- a/src/hyper/event.c +++ b/src/hyper/event.c @@ -34,7 +34,7 @@ */ #define _EVENT_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/ex2ht.c b/src/hyper/ex2ht.c index 0d21673e..de6afe03 100644 --- a/src/hyper/ex2ht.c +++ b/src/hyper/ex2ht.c @@ -37,7 +37,7 @@ #define _EX2HT_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include <stdio.h> diff --git a/src/hyper/extent.h b/src/hyper/extent.h index cebf6049..5ef24361 100644 --- a/src/hyper/extent.h +++ b/src/hyper/extent.h @@ -36,7 +36,7 @@ #ifndef _EXTENT_H_ #define _EXTENT_H_ 1 -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "hyper.h" /* diff --git a/src/hyper/extent1.c b/src/hyper/extent1.c index 2c89944e..3ae2aaf5 100644 --- a/src/hyper/extent1.c +++ b/src/hyper/extent1.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _EXTENT1_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/extent2.c b/src/hyper/extent2.c index 40ed44a6..84b11bc9 100644 --- a/src/hyper/extent2.c +++ b/src/hyper/extent2.c @@ -42,7 +42,7 @@ ****************************************************************************/ #define _EXTENT2_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/form-ext.c b/src/hyper/form-ext.c index db817355..edfffe9f 100644 --- a/src/hyper/form-ext.c +++ b/src/hyper/form-ext.c @@ -34,7 +34,7 @@ */ #define _FORM_EXT_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/group.h b/src/hyper/group.h index ce2ee5dd..4bf52264 100644 --- a/src/hyper/group.h +++ b/src/hyper/group.h @@ -36,7 +36,7 @@ #ifndef _GROUP_H_ #define _GROUP_H_ 1 -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "hyper.h" extern GroupItem *gTopOfGroupStack; diff --git a/src/hyper/halloc.c b/src/hyper/halloc.c index 0f66b292..1cccb324 100644 --- a/src/hyper/halloc.c +++ b/src/hyper/halloc.c @@ -34,7 +34,7 @@ */ #define _HALLOC_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include <stdio.h> diff --git a/src/hyper/hash.c b/src/hyper/hash.c index a9a6c00e..170f7d15 100644 --- a/src/hyper/hash.c +++ b/src/hyper/hash.c @@ -34,7 +34,7 @@ */ #define _HASH_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/htadd.c b/src/hyper/htadd.c index 1b650c01..6eb71c5c 100644 --- a/src/hyper/htadd.c +++ b/src/hyper/htadd.c @@ -37,7 +37,7 @@ #define _HTADD_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "sockio.h" #include "hyper.h" diff --git a/src/hyper/hterror.c b/src/hyper/hterror.c index 46852c46..ec5f8123 100644 --- a/src/hyper/hterror.c +++ b/src/hyper/hterror.c @@ -36,7 +36,7 @@ #define _HTERROR_C #define HTERROR -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/hthits.c b/src/hyper/hthits.c index b3e24774..ffaf2ad9 100644 --- a/src/hyper/hthits.c +++ b/src/hyper/hthits.c @@ -49,7 +49,7 @@ * SMW Feb 91 */ #define _HTHITS_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/htinp.c b/src/hyper/htinp.c index 2e43a6e4..113ea887 100644 --- a/src/hyper/htinp.c +++ b/src/hyper/htinp.c @@ -34,7 +34,7 @@ */ #define _HTINP_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/hyper.h b/src/hyper/hyper.h index 48e142bc..48b8bbd1 100644 --- a/src/hyper/hyper.h +++ b/src/hyper/hyper.h @@ -36,7 +36,7 @@ #ifndef _HYPER_H_ #define _HYPER_H_ 1 -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/src/hyper/initx.c b/src/hyper/initx.c index 7565e54c..d2464652 100644 --- a/src/hyper/initx.c +++ b/src/hyper/initx.c @@ -44,7 +44,7 @@ /* #define DEBUG 1 */ #define _INITX_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" diff --git a/src/hyper/input.c b/src/hyper/input.c index 36901184..c3a19958 100644 --- a/src/hyper/input.c +++ b/src/hyper/input.c @@ -34,7 +34,7 @@ */ #define _INPUT_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" diff --git a/src/hyper/item.c b/src/hyper/item.c index 8ba00b43..3d900e04 100644 --- a/src/hyper/item.c +++ b/src/hyper/item.c @@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "sockio.h" #define _ITEM_C #include "debug.h" diff --git a/src/hyper/keyin.c b/src/hyper/keyin.c index 27639c14..ec775ac7 100644 --- a/src/hyper/keyin.c +++ b/src/hyper/keyin.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _KEYIN_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/lex.c b/src/hyper/lex.c index 66cfdada..aaff7b3a 100644 --- a/src/hyper/lex.c +++ b/src/hyper/lex.c @@ -57,7 +57,7 @@ * */ #define _LEX_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" @@ -269,8 +269,6 @@ get_char(void) return c; } -char * read_again = 0; - /* return the next character in the input stream */ static int get_char1(void) @@ -313,7 +311,7 @@ AGAIN: } if (last_command == EndOfPage) return EOF; - if (read_again == NULL) { + if (spad_socket->nbytes_pending == 0) { last_command = cmd = get_int(spad_socket); if (cmd == EndOfPage) return EOF; @@ -322,7 +320,7 @@ AGAIN: spad_error_handler(); #endif } - read_again = get_string_buf(spad_socket, sock_buf, 1023); + get_string_buf(spad_socket, sock_buf, 1023); /* this will be null if this is the last time*/ input_string = sock_buf; goto AGAIN; @@ -825,7 +823,6 @@ spad_error_handler(void) exit(-1); } -extern int still_reading, str_len; void reset_connection(void) { @@ -837,9 +834,7 @@ reset_connection(void) spad_socket = NULL; if (input_string) input_string[0] = '\0'; - read_again = 0; - str_len = 0; - still_reading = 0; + spad_socket->nbytes_pending = 0; connect_spad(); } } diff --git a/src/hyper/macro.c b/src/hyper/macro.c index 7d681c78..917a6f83 100644 --- a/src/hyper/macro.c +++ b/src/hyper/macro.c @@ -34,7 +34,7 @@ */ #define _MACRO_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" diff --git a/src/hyper/parse-aux.c b/src/hyper/parse-aux.c index b8938693..08995d49 100644 --- a/src/hyper/parse-aux.c +++ b/src/hyper/parse-aux.c @@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #define _PARSE_AUX_C #include "debug.h" diff --git a/src/hyper/parse-input.c b/src/hyper/parse-input.c index 961fe623..7e5450c1 100644 --- a/src/hyper/parse-input.c +++ b/src/hyper/parse-input.c @@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #define _PARSE_INPUT_C /*** Contains all the code needed to parse input items, diff --git a/src/hyper/parse-paste.c b/src/hyper/parse-paste.c index 264c773b..d4b83fb8 100644 --- a/src/hyper/parse-paste.c +++ b/src/hyper/parse-paste.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _PARSE_PASTE_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/parse-paste.h b/src/hyper/parse-paste.h index ec550ff3..d730b9bd 100644 --- a/src/hyper/parse-paste.h +++ b/src/hyper/parse-paste.h @@ -36,7 +36,7 @@ #ifndef _PARSE_PASTE_H_ #define _PARSE_PASTE_H_ 1 -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "hyper.h" extern short int gInPaste; diff --git a/src/hyper/parse-types.c b/src/hyper/parse-types.c index 2e42a205..56cb418e 100644 --- a/src/hyper/parse-types.c +++ b/src/hyper/parse-types.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _PARSE_TYPES_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" diff --git a/src/hyper/parse.h b/src/hyper/parse.h index 6ea2e75d..698b0db0 100644 --- a/src/hyper/parse.h +++ b/src/hyper/parse.h @@ -36,7 +36,7 @@ #ifndef _PARSE_H_ #define _PARSE_H_ 1 -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "hterror.h" #ifdef SUNplatform diff --git a/src/hyper/scrollbar.c b/src/hyper/scrollbar.c index 56da0d98..0f96f573 100644 --- a/src/hyper/scrollbar.c +++ b/src/hyper/scrollbar.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _SCROLLBAR_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" #include "sockio.h" diff --git a/src/hyper/show-types.c b/src/hyper/show-types.c index 0d355c38..d5cb7ab6 100644 --- a/src/hyper/show-types.c +++ b/src/hyper/show-types.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _SHOW_TYPES_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/spadbuf.c b/src/hyper/spadbuf.c index 5ff51315..dbe926ea 100644 --- a/src/hyper/spadbuf.c +++ b/src/hyper/spadbuf.c @@ -34,7 +34,7 @@ */ #define _SPADBUF_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c index 842b4c4a..3e21deac 100644 --- a/src/hyper/spadint.c +++ b/src/hyper/spadint.c @@ -37,7 +37,7 @@ /* Communication interface for external OpenAxiom buffers */ #define _SPADINT_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/hyper/titlebar.c b/src/hyper/titlebar.c index e3ea0f56..7d925cb6 100644 --- a/src/hyper/titlebar.c +++ b/src/hyper/titlebar.c @@ -41,7 +41,7 @@ * ****************************************************************************/ #define _TITLEBAR_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "debug.h" diff --git a/src/include/open-axiom.h b/src/include/open-axiom.h index 729adb86..2c0335f0 100644 --- a/src/include/open-axiom.h +++ b/src/include/open-axiom.h @@ -45,4 +45,11 @@ # define OPENAXIOM_EXPORT /* nothing */ #endif /* __MINGW32__ */ +#if defined(HAVE_STDINT_H) +# include <stdint.h> +#elif defined (HAVE_INTTYPES_H) +# include <inttypes.h> +#endif +typedef uint8_t openaxiom_byte; + #endif /* OPENAXIOM_included */ diff --git a/src/include/sockio.h b/src/include/sockio.h index 0f1a7ebd..e3eb8978 100644 --- a/src/include/sockio.h +++ b/src/include/sockio.h @@ -36,6 +36,7 @@ #ifndef OPENAXIOM_SOCKIO_included #define OPENAXIOM_SOCKIO_included +#include <stddef.h> #ifdef __MINGW32__ # include <winsock2.h> @@ -45,7 +46,7 @@ # include <netinet/in.h> #endif -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "open-axiom.h" /* On Windows, a socket identifier is not a file descriptor. It is @@ -73,6 +74,7 @@ typedef struct openaxiom_sio { struct sockaddr_in i_addr; } addr; char *host_name; /* name of foreign host if type == AF_INET */ + size_t nbytes_pending; /* pending bytes for read. */ } openaxiom_sio; @@ -83,14 +85,16 @@ 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 int sread(openaxiom_sio*, char*, int, const 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(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 wait_for_client_read(openaxiom_sio*, char*, + int, const char*); +OPENAXIOM_EXPORT int wait_for_client_write(openaxiom_sio*, const char*, + int, const char*); +OPENAXIOM_EXPORT int swrite(openaxiom_sio*, const char*, int, const char*); OPENAXIOM_EXPORT int sselect(int, fd_set*, fd_set*, fd_set*, void*); OPENAXIOM_EXPORT int fill_buf(openaxiom_sio*, char*, int, char*); OPENAXIOM_EXPORT int sock_get_int(int); @@ -98,14 +102,14 @@ OPENAXIOM_EXPORT int get_ints(openaxiom_sio*, int*, int); OPENAXIOM_EXPORT int sock_get_ints(int, int*, int); OPENAXIOM_EXPORT int send_int(openaxiom_sio*, int); OPENAXIOM_EXPORT int sock_send_int(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(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(openaxiom_sio*, char**, int); -OPENAXIOM_EXPORT int sock_send_strings(int, char**, int); +OPENAXIOM_EXPORT int send_ints(openaxiom_sio*, const int*, int); +OPENAXIOM_EXPORT int sock_send_ints(int, const int*, int); +OPENAXIOM_EXPORT int send_string(openaxiom_sio*, const char*); +OPENAXIOM_EXPORT int send_string_len(openaxiom_sio*, const char*, int); +OPENAXIOM_EXPORT int sock_send_string(int, const char*); +OPENAXIOM_EXPORT int sock_send_string_len(int, const char*, int); +OPENAXIOM_EXPORT int send_strings(openaxiom_sio*, const char**, int); +OPENAXIOM_EXPORT int sock_send_strings(int, const char**, int); OPENAXIOM_EXPORT char* sock_get_string(int); OPENAXIOM_EXPORT char* get_string_buf(openaxiom_sio*, char*, int); OPENAXIOM_EXPORT char* sock_get_string_buf(int, char*, int); @@ -113,10 +117,10 @@ OPENAXIOM_EXPORT int get_strings(openaxiom_sio*, char**, int); OPENAXIOM_EXPORT int sock_get_strings(int, char**, int); OPENAXIOM_EXPORT int send_float(openaxiom_sio*, double); OPENAXIOM_EXPORT int sock_send_float(int, double); -OPENAXIOM_EXPORT int send_sfloats(openaxiom_sio*, float*, int); -OPENAXIOM_EXPORT int sock_send_sfloats(int, float*, int); -OPENAXIOM_EXPORT int send_floats(openaxiom_sio*, double*, int); -OPENAXIOM_EXPORT int sock_send_floats(int, double*, int); +OPENAXIOM_EXPORT int send_sfloats(openaxiom_sio*, const float*, int); +OPENAXIOM_EXPORT int sock_send_sfloats(int, const float*, int); +OPENAXIOM_EXPORT int send_floats(openaxiom_sio*, const double*, int); +OPENAXIOM_EXPORT int sock_send_floats(int, const double*, int); OPENAXIOM_EXPORT double sock_get_float(int); OPENAXIOM_EXPORT int get_sfloats(openaxiom_sio*, float*, int); OPENAXIOM_EXPORT int sock_get_sfloats(int, float*, int); diff --git a/src/lib/XDither.c b/src/lib/XDither.c index df2a21df..a16473ae 100644 --- a/src/lib/XDither.c +++ b/src/lib/XDither.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #ifndef MSYSplatform #include <stdio.h> diff --git a/src/lib/XShade.c b/src/lib/XShade.c index 5854b609..8c7b6d2f 100644 --- a/src/lib/XShade.c +++ b/src/lib/XShade.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #ifndef MSYSplatform #include <stdio.h> diff --git a/src/lib/XSpadFill.c b/src/lib/XSpadFill.c index 71e6f16b..f71a861c 100644 --- a/src/lib/XSpadFill.c +++ b/src/lib/XSpadFill.c @@ -47,7 +47,7 @@ */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #ifndef MSYSplatform #include <stdio.h> diff --git a/src/lib/bsdsignal.c b/src/lib/bsdsignal.c index 7bf89d94..86c2b068 100644 --- a/src/lib/bsdsignal.c +++ b/src/lib/bsdsignal.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #if defined(MACOSXplatform) #include "/usr/include/signal.h" diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c index a7b69b8a..d7eae316 100644 --- a/src/lib/cfuns-c.c +++ b/src/lib/cfuns-c.c @@ -34,7 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <errno.h> #include <sys/types.h> diff --git a/src/lib/cursor.c b/src/lib/cursor.c index 960d12e8..4038133d 100644 --- a/src/lib/cursor.c +++ b/src/lib/cursor.c @@ -32,7 +32,7 @@ */ #include <stdlib.h> -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "cursor.H1" diff --git a/src/lib/edin.c b/src/lib/edin.c index baa997ed..2e313a6a 100644 --- a/src/lib/edin.c +++ b/src/lib/edin.c @@ -34,7 +34,7 @@ /* #define debug 1 */ #include <stdlib.h> -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #if defined(MACOSXplatform) #include "/usr/include/unistd.h" #else diff --git a/src/lib/emupty.c b/src/lib/emupty.c index 18ea02f5..7ddfbd2d 100644 --- a/src/lib/emupty.c +++ b/src/lib/emupty.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" /* Here is some code taken from Nick Simicich. It takes an escape sequence diff --git a/src/lib/fnct_key.c b/src/lib/fnct_key.c index 9e9e08f2..e130ad81 100644 --- a/src/lib/fnct_key.c +++ b/src/lib/fnct_key.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #if defined(MACOSXplatform) #include "/usr/include/unistd.h" #else diff --git a/src/lib/halloc.c b/src/lib/halloc.c index aa9fe9dd..776c0c43 100644 --- a/src/lib/halloc.c +++ b/src/lib/halloc.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" /* memory allocation used by HyperDoc and addfile */ diff --git a/src/lib/hash.c b/src/lib/hash.c index b7a8a379..f2935c1e 100644 --- a/src/lib/hash.c +++ b/src/lib/hash.c @@ -32,7 +32,7 @@ */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #define _HASH_C #include "debug.h" diff --git a/src/lib/openpty.c b/src/lib/openpty.c index 68e6edc9..94f76735 100644 --- a/src/lib/openpty.c +++ b/src/lib/openpty.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> #include <stdio.h> diff --git a/src/lib/pixmap.c b/src/lib/pixmap.c index 05b06c25..57762e2f 100644 --- a/src/lib/pixmap.c +++ b/src/lib/pixmap.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <X11/Xlib.h> #include <X11/Xutil.h> diff --git a/src/lib/prt.c b/src/lib/prt.c index 4138bc50..a044d3d1 100644 --- a/src/lib/prt.c +++ b/src/lib/prt.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <string.h> #include <stdio.h> #include <sys/types.h> diff --git a/src/lib/sockio-c.c b/src/lib/sockio-c.c index 7c3fc4c8..a0f4b536 100644 --- a/src/lib/sockio-c.c +++ b/src/lib/sockio-c.c @@ -92,9 +92,6 @@ int socket_closed; /* spad server number used in sman */ int spad_server_number = -1; -int str_len = 0; -int still_reading = 0; - #include "sockio.h" @@ -106,7 +103,7 @@ int still_reading = 0; We abstract over that difference here. */ static inline void -axiom_sleep(int n) +openaxiom_sleep(int n) { #ifdef __WIN32__ Sleep(n * 1000); @@ -119,7 +116,7 @@ axiom_sleep(int n) we can even think about talking about sockets. */ static void -axiom_load_socket_module() +openaxiom_load_socket_module() { #ifdef __WIN32__ WSADATA wsaData; @@ -142,9 +139,9 @@ 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 openaxiom_socket -axiom_communication_link(int family) +openaxiom_communication_link(int family) { - axiom_load_socket_module(); + openaxiom_load_socket_module(); return socket(family, SOCK_STREAM, 0); } @@ -181,7 +178,7 @@ is_valid_socket(const openaxiom_sio* s) requires cleanup. */ void -axiom_close_socket(openaxiom_socket s) +openaxiom_close_socket(openaxiom_socket s) { #ifdef __WIN32__ shutdown(s, SD_BOTH); @@ -199,13 +196,13 @@ axiom_close_socket(openaxiom_socket s) send(). */ static inline int -axiom_write(openaxiom_sio* s, const char* buf, size_t n) +openaxiom_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) +openaxiom_read(openaxiom_sio* s, char* buf, size_t n) { return recv(s->socket, buf, n, 0); } @@ -214,7 +211,7 @@ axiom_read(openaxiom_sio* s, char* buf, size_t n) /* Return 1 is the last call was cancelled. */ static inline int -axiom_call_was_cancelled(void) +openaxiom_syscall_was_cancelled(void) { #ifdef __WIN32__ return WSAGetLastError() == WSAEINTR; @@ -226,7 +223,7 @@ axiom_call_was_cancelled(void) /* Return 1 is last connect() was refused. */ static inline int -axiom_connection_refused(void) +openaxiom_connection_refused(void) { #ifdef __WIN32__ return WSAGetLastError() == WSAECONNREFUSED; @@ -243,7 +240,8 @@ sigpipe_handler(int sig) } OPENAXIOM_EXPORT int -wait_for_client_read(openaxiom_sio *sock, char *buf, int buf_size, char *msg) +wait_for_client_read(openaxiom_sio *sock, char *buf, int buf_size, + const char* msg) { int ret_val; switch(sock->purpose) { @@ -260,7 +258,8 @@ wait_for_client_read(openaxiom_sio *sock, char *buf, int buf_size, char *msg) } OPENAXIOM_EXPORT int -wait_for_client_write(openaxiom_sio *sock,char *buf,int buf_size,char *msg) +wait_for_client_write(openaxiom_sio *sock, const char *buf,int buf_size, + const char* msg) { int ret_val; switch(sock->purpose) { @@ -277,18 +276,18 @@ wait_for_client_write(openaxiom_sio *sock,char *buf,int buf_size,char *msg) } OPENAXIOM_EXPORT int -sread(openaxiom_sio *sock, char *buf, int buf_size, char *msg) +sread(openaxiom_sio *sock, char *buf, int buf_size, const char *msg) { int ret_val; char err_msg[256]; errno = 0; do { - ret_val = axiom_read(sock, buf, buf_size); - } while (ret_val == -1 && axiom_call_was_cancelled()); + ret_val = openaxiom_read(sock, buf, buf_size); + } while (ret_val == -1 && openaxiom_syscall_was_cancelled()); if (ret_val == 0) { FD_CLR(sock->socket, &socket_mask); purpose_table[sock->purpose] = NULL; - axiom_close_socket(sock->socket); + openaxiom_close_socket(sock->socket); return wait_for_client_read(sock, buf, buf_size, msg); } if (ret_val == -1) { @@ -302,19 +301,19 @@ sread(openaxiom_sio *sock, char *buf, int buf_size, char *msg) } OPENAXIOM_EXPORT int -swrite(openaxiom_sio *sock,char *buf,int buf_size,char *msg) +swrite(openaxiom_sio *sock, const char* buf,int buf_size, const char* msg) { int ret_val; char err_msg[256]; errno = 0; socket_closed = 0; - ret_val = axiom_write(sock, buf, buf_size); + ret_val = openaxiom_write(sock, buf, buf_size); if (ret_val == -1) { if (socket_closed) { FD_CLR(sock->socket, &socket_mask); purpose_table[sock->purpose] = NULL; /* printf(" closing socket %d\n", sock->socket); */ - axiom_close_socket(sock->socket); + openaxiom_close_socket(sock->socket); return wait_for_client_write(sock, buf, buf_size, msg); } else { if (msg) { @@ -333,7 +332,7 @@ sselect(int n,fd_set *rd, fd_set *wr, fd_set *ex, void *timeout) int ret_val; do { ret_val = select(n, (void *)rd, (void *)wr, (void *)ex, (struct timeval *) timeout); - } while (ret_val == -1 && axiom_call_was_cancelled()); + } while (ret_val == -1 && openaxiom_syscall_was_cancelled()); return ret_val; } @@ -411,7 +410,7 @@ sock_send_int(int purpose,int val) } OPENAXIOM_EXPORT int -send_ints(openaxiom_sio *sock, int *vals, int num) +send_ints(openaxiom_sio *sock, const int *vals, int num) { int i; for(i=0; i<num; i++) @@ -421,7 +420,7 @@ send_ints(openaxiom_sio *sock, int *vals, int num) } OPENAXIOM_EXPORT int -sock_send_ints(int purpose, int *vals, int num) +sock_send_ints(int purpose, const int *vals, int num) { if (accept_if_needed(purpose) != -1) return send_ints(purpose_table[purpose], vals, num); @@ -429,7 +428,7 @@ sock_send_ints(int purpose, int *vals, int num) } OPENAXIOM_EXPORT int -send_string_len(openaxiom_sio *sock,char *str,int len) +send_string_len(openaxiom_sio *sock, const char *str,int len) { int val; if (len > 1023) { @@ -454,7 +453,7 @@ send_string_len(openaxiom_sio *sock,char *str,int len) } OPENAXIOM_EXPORT int -send_string(openaxiom_sio *sock, char *str) +send_string(openaxiom_sio *sock, const char *str) { int val, len = strlen(str); send_int(sock, len+1); @@ -467,7 +466,7 @@ send_string(openaxiom_sio *sock, char *str) OPENAXIOM_EXPORT int -sock_send_string(int purpose, char *str) +sock_send_string(int purpose, const char *str) { if (accept_if_needed(purpose) != -1) return send_string(purpose_table[purpose], str); @@ -475,7 +474,7 @@ sock_send_string(int purpose, char *str) } OPENAXIOM_EXPORT int -sock_send_string_len(int purpose, char * str, int len) +sock_send_string_len(int purpose, const char* str, int len) { if (accept_if_needed(purpose) != -1) return send_string_len(purpose_table[purpose], str, len); @@ -483,7 +482,7 @@ sock_send_string_len(int purpose, char * str, int len) } OPENAXIOM_EXPORT int -send_strings(openaxiom_sio *sock, char ** vals, int num) +send_strings(openaxiom_sio *sock, const char ** vals, int num) { int i; for(i=0; i<num; i++) @@ -493,7 +492,7 @@ send_strings(openaxiom_sio *sock, char ** vals, int num) } OPENAXIOM_EXPORT int -sock_send_strings(int purpose, char **vals, int num) +sock_send_strings(int purpose, const char **vals, int num) { if (accept_if_needed(purpose) != -1) return send_strings(purpose_table[purpose], vals, num); @@ -531,22 +530,20 @@ sock_get_string(int purpose) OPENAXIOM_EXPORT char * get_string_buf(openaxiom_sio *sock, char *buf, int buf_len) { - int val; - if(!str_len) str_len = get_int(sock); - if (str_len > buf_len) { - val = fill_buf(sock, buf, buf_len, "buffered string"); - str_len = str_len - buf_len; - if (val == -1) - return NULL; - return buf; - } - else { - val = fill_buf(sock, buf, str_len, "buffered string"); - str_len = 0; - if (val == -1) - return NULL; + int nbytes_read; + int nbytes_to_read; + if(sock->nbytes_pending == 0) + sock->nbytes_pending = get_int(sock); + nbytes_to_read = sock->nbytes_pending > buf_len + ? buf_len + : sock->nbytes_pending; + nbytes_read = fill_buf(sock, buf, nbytes_to_read, "buffered string"); + if (nbytes_read == -1) { + sock->nbytes_pending = 0; return NULL; - } + } + sock->nbytes_pending -= nbytes_read; + return sock->nbytes_pending == 0 ? NULL : buf; } OPENAXIOM_EXPORT char * @@ -594,7 +591,7 @@ sock_send_float(int purpose, double num) } OPENAXIOM_EXPORT int -send_sfloats(openaxiom_sio *sock, float *vals,int num) +send_sfloats(openaxiom_sio *sock, const float *vals,int num) { int i; for(i=0; i<num; i++) @@ -604,7 +601,7 @@ send_sfloats(openaxiom_sio *sock, float *vals,int num) } OPENAXIOM_EXPORT int -sock_send_sfloats(int purpose, float * vals, int num) +sock_send_sfloats(int purpose, const float* vals, int num) { if (accept_if_needed(purpose) != -1) return send_sfloats(purpose_table[purpose], vals, num); @@ -612,7 +609,7 @@ sock_send_sfloats(int purpose, float * vals, int num) } OPENAXIOM_EXPORT int -send_floats(openaxiom_sio *sock, double *vals, int num) +send_floats(openaxiom_sio *sock, const double *vals, int num) { int i; for(i=0; i<num; i++) @@ -622,7 +619,7 @@ send_floats(openaxiom_sio *sock, double *vals, int num) } OPENAXIOM_EXPORT int -sock_send_floats(int purpose, double *vals, int num) +sock_send_floats(int purpose, const double *vals, int num) { if (accept_if_needed(purpose) != -1) return send_floats(purpose_table[purpose], vals, num); @@ -724,7 +721,7 @@ send_signal(openaxiom_sio *sock, int sig) FD_CLR(sock->socket, &socket_mask); purpose_table[sock->purpose] = NULL; /* printf(" closing socket %d\n", sock->socket); */ - axiom_close_socket(sock->socket); + openaxiom_close_socket(sock->socket); return wait_for_client_kill(sock, sig); } return ret_val; @@ -770,7 +767,7 @@ connect_to_local_server_new(char *server_name, int purpose, int time_out) return NULL; } - sock->socket = axiom_communication_link(OPENAXIOM_AF_LOCAL); + sock->socket = openaxiom_communication_link(OPENAXIOM_AF_LOCAL); if (is_invalid_socket(sock)) { perror("opening client socket"); free(sock); @@ -785,12 +782,12 @@ connect_to_local_server_new(char *server_name, int purpose, int time_out) code = connect(sock->socket, &sock->addr.u_addr, sizeof(sock->addr.u_addr)); if (code == -1) { - if (errno != ENOENT && !axiom_connection_refused()) { + if (errno != ENOENT && !openaxiom_connection_refused()) { perror("connecting server stream socket"); return NULL; } else { if (i != max_con - 1) - axiom_sleep(1); + openaxiom_sleep(1); continue; } } else break; @@ -824,7 +821,7 @@ connect_to_local_server(char *server_name, int purpose, int time_out) sock->purpose = purpose; /* create the socket */ - sock->socket = axiom_communication_link(OPENAXIOM_AF_LOCAL); + sock->socket = openaxiom_communication_link(OPENAXIOM_AF_LOCAL); if (is_invalid_socket(sock)) { perror("opening client socket"); free(sock); @@ -839,12 +836,12 @@ connect_to_local_server(char *server_name, int purpose, int time_out) code = connect(sock->socket, &sock->addr.u_addr, sizeof(sock->addr.u_addr)); if (code == -1) { - if (errno != ENOENT && !axiom_connection_refused()) { + if (errno != ENOENT && !openaxiom_connection_refused()) { perror("connecting server stream socket"); return NULL; } else { if (i != max_con - 1) - axiom_sleep(1); + openaxiom_sleep(1); continue; } } else break; @@ -923,7 +920,7 @@ make_server_number(void) OPENAXIOM_EXPORT void close_socket(openaxiom_socket socket_num, char *name) { - axiom_close_socket(socket_num); + openaxiom_close_socket(socket_num); #ifndef RTplatform unlink(name); #endif @@ -963,7 +960,7 @@ open_server(char *server_name) return -2; /* create the socket internet socket */ server[0].socket = 0; -/* server[0].socket = axiom_communication_link(AF_INET); +/* server[0].socket = openaxiom_communication_link(AF_INET); if (is_invalid_socket(&server[0])) { server[0].socket = 0; } else { @@ -988,7 +985,7 @@ open_server(char *server_name) listen(server[0].socket,5); } */ /* Next create the local domain socket */ - server[1].socket = axiom_communication_link(OPENAXIOM_AF_LOCAL); + server[1].socket = openaxiom_communication_link(OPENAXIOM_AF_LOCAL); if (is_invalid_socket(&server[1])) { perror("opening local server socket"); server[1].socket = 0; diff --git a/src/lib/spadcolors.c b/src/lib/spadcolors.c index 4b240482..db4a8647 100644 --- a/src/lib/spadcolors.c +++ b/src/lib/spadcolors.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "spadcolors.h" #include <X11/Xlib.h> diff --git a/src/lib/util.c b/src/lib/util.c index 604931b6..8174fa8c 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #if defined(MACOSXplatform) diff --git a/src/lib/wct.c b/src/lib/wct.c index 58b4e308..03568d63 100644 --- a/src/lib/wct.c +++ b/src/lib/wct.c @@ -39,7 +39,7 @@ * */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/sman/session.c b/src/sman/session.c index 27082d4e..3aacb787 100644 --- a/src/sman/session.c +++ b/src/sman/session.c @@ -37,7 +37,7 @@ /* #define DEBUG */ #define _SESSION_C -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <sys/time.h> #include <stdio.h> diff --git a/src/sman/sman.c b/src/sman/sman.c index dafad672..013e9c78 100644 --- a/src/sman/sman.c +++ b/src/sman/sman.c @@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include <stdlib.h> #include <unistd.h> diff --git a/src/sman/spadclient.c b/src/sman/spadclient.c index 5b714aaf..f848ac80 100644 --- a/src/sman/spadclient.c +++ b/src/sman/spadclient.c @@ -39,7 +39,7 @@ #include <stdio.h> #include <signal.h> -#include "axiom-c-macros.h" +#include "openaxiom-c-macros.h" #include "sockio.h" #include "com.h" #include "bsdsignal.h" |