changes for egcs (__new in stdio)
authorClaus Gittinger <cg@exept.de>
Fri, 15 Jan 1999 22:33:42 +0100
changeset 2422 6bffcb4c8360
parent 2421 037f43af3b0e
child 2423 416882dbf8cf
changes for egcs (__new in stdio)
GLXWorkstat.st
GLXWorkstation.st
XWorkstat.st
XWorkstation.st
--- a/GLXWorkstat.st	Sun Jan 10 18:03:56 1999 +0100
+++ b/GLXWorkstat.st	Fri Jan 15 22:33:42 1999 +0100
@@ -66,8 +66,16 @@
 #undef True
 #undef False
 
+#if defined(__openVMS__) || defined(LINUX)
+  /*
+   * mhmh - used in stdio ...
+   * (new linuxes)
+   */
+# undef __new
+# define __NEED_REDEF_new__
+#endif
+
 #ifdef __VMS__
-# undef __new
 # include "vms_Xnames.h"
 #endif
 
@@ -117,6 +125,10 @@
 # define NULL (char *)0         /* sigh */
 #endif
 
+#ifdef __NEED_REDEF_new__
+# define __new  __STX___new
+#endif
+
 typedef enum {
     GLXcolorIndexSingleBuffer,
     GLXcolorIndexDoubleBuffer,
@@ -6595,12 +6607,12 @@
     ^ false
 !
 
-glxLsetdepthNear: near far: far in: aGLXWindowId
-
-%{  /* NOCONTEXT */
-#ifdef GLX
-    SETWIN(aGLXWindowId)
-    lsetdepth(_longVal(near), _longVal(far));
+glxLsetdepthNear:znear far:zfar in: aGLXWindowId
+
+%{  /* NOCONTEXT */
+#ifdef GLX
+    SETWIN(aGLXWindowId)
+    lsetdepth(_longVal(znear), _longVal(zfar));
     RETURN (true);
 #endif
 %}
@@ -7400,12 +7412,12 @@
     ^ false
 !
 
-glxSetdepthNear: near far: far in: aGLXWindowId
-
-%{  /* NOCONTEXT */
-#ifdef GLX
-    SETWIN(aGLXWindowId)
-    setdepth(_screencoordVal(near), _screencoordVal(far));
+glxSetdepthNear:znear far:zfar in: aGLXWindowId
+
+%{  /* NOCONTEXT */
+#ifdef GLX
+    SETWIN(aGLXWindowId)
+    setdepth(_screencoordVal(znear), _screencoordVal(zfar));
     RETURN (true);
 #endif
 %}
@@ -8346,7 +8358,7 @@
 %}
 !
 
-glxOrthoLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId
+glxOrthoLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId
     "define orthogonal projection"
 
 %{  /* NOCONTEXT */
@@ -8357,8 +8369,8 @@
     _FLOAT_(right, f_right)
     _FLOAT_(bottom, f_bottom)
     _FLOAT_(top, f_top)
-    _FLOAT_(near, f_near)
-    _FLOAT_(far, f_far)
+    _FLOAT_(znear, f_near)
+    _FLOAT_(zfar, f_far)
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
 #else
@@ -8367,7 +8379,7 @@
 %}
 !
 
-glxPerspectiveFovy:fovy aspect:aspect near:near far:far in:aGLXWindowId
+glxPerspectiveFovy:fovy aspect:aspect near:znear far:zfar in:aGLXWindowId
     "define perspective projection"
 
 %{  /* NOCONTEXT */
@@ -8378,8 +8390,8 @@
 
     _ANGLE_ (fovy, a_fovy)
     _FLOAT_ (aspect, f_aspect)
-    _COORD_ (near, c_near)
-    _COORD_ (far, c_far)
+    _COORD_ (znear, c_near)
+    _COORD_ (zfar, c_far)
 
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
@@ -8458,13 +8470,13 @@
 %}
 !
 
-glxWindowLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId
+glxWindowLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId
     "this one was added independently by JEFF - kept for his programs ..."
 
-    self glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId
-!
-
-glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId
+    self glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId
+!
+
+glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId
     "define perspective viewing pyramid"
 
 %{  /* NOCONTEXT */
@@ -8474,8 +8486,8 @@
     _COORD_ (right, c_right)
     _COORD_ (top, c_top)
     _COORD_ (bottom, c_bot)
-    _COORD_ (near, c_near)
-    _COORD_ (far, c_far)
+    _COORD_ (znear, c_near)
+    _COORD_ (zfar, c_far)
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
 #else
@@ -8793,5 +8805,5 @@
 !GLXWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.72 1998-03-05 19:47:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.73 1999-01-15 21:33:19 cg Exp $'
 ! !
--- a/GLXWorkstation.st	Sun Jan 10 18:03:56 1999 +0100
+++ b/GLXWorkstation.st	Fri Jan 15 22:33:42 1999 +0100
@@ -66,8 +66,16 @@
 #undef True
 #undef False
 
+#if defined(__openVMS__) || defined(LINUX)
+  /*
+   * mhmh - used in stdio ...
+   * (new linuxes)
+   */
+# undef __new
+# define __NEED_REDEF_new__
+#endif
+
 #ifdef __VMS__
-# undef __new
 # include "vms_Xnames.h"
 #endif
 
@@ -117,6 +125,10 @@
 # define NULL (char *)0         /* sigh */
 #endif
 
+#ifdef __NEED_REDEF_new__
+# define __new  __STX___new
+#endif
+
 typedef enum {
     GLXcolorIndexSingleBuffer,
     GLXcolorIndexDoubleBuffer,
@@ -6595,12 +6607,12 @@
     ^ false
 !
 
-glxLsetdepthNear: near far: far in: aGLXWindowId
-
-%{  /* NOCONTEXT */
-#ifdef GLX
-    SETWIN(aGLXWindowId)
-    lsetdepth(_longVal(near), _longVal(far));
+glxLsetdepthNear:znear far:zfar in: aGLXWindowId
+
+%{  /* NOCONTEXT */
+#ifdef GLX
+    SETWIN(aGLXWindowId)
+    lsetdepth(_longVal(znear), _longVal(zfar));
     RETURN (true);
 #endif
 %}
@@ -7400,12 +7412,12 @@
     ^ false
 !
 
-glxSetdepthNear: near far: far in: aGLXWindowId
-
-%{  /* NOCONTEXT */
-#ifdef GLX
-    SETWIN(aGLXWindowId)
-    setdepth(_screencoordVal(near), _screencoordVal(far));
+glxSetdepthNear:znear far:zfar in: aGLXWindowId
+
+%{  /* NOCONTEXT */
+#ifdef GLX
+    SETWIN(aGLXWindowId)
+    setdepth(_screencoordVal(znear), _screencoordVal(zfar));
     RETURN (true);
 #endif
 %}
@@ -8346,7 +8358,7 @@
 %}
 !
 
-glxOrthoLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId
+glxOrthoLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId
     "define orthogonal projection"
 
 %{  /* NOCONTEXT */
@@ -8357,8 +8369,8 @@
     _FLOAT_(right, f_right)
     _FLOAT_(bottom, f_bottom)
     _FLOAT_(top, f_top)
-    _FLOAT_(near, f_near)
-    _FLOAT_(far, f_far)
+    _FLOAT_(znear, f_near)
+    _FLOAT_(zfar, f_far)
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
 #else
@@ -8367,7 +8379,7 @@
 %}
 !
 
-glxPerspectiveFovy:fovy aspect:aspect near:near far:far in:aGLXWindowId
+glxPerspectiveFovy:fovy aspect:aspect near:znear far:zfar in:aGLXWindowId
     "define perspective projection"
 
 %{  /* NOCONTEXT */
@@ -8378,8 +8390,8 @@
 
     _ANGLE_ (fovy, a_fovy)
     _FLOAT_ (aspect, f_aspect)
-    _COORD_ (near, c_near)
-    _COORD_ (far, c_far)
+    _COORD_ (znear, c_near)
+    _COORD_ (zfar, c_far)
 
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
@@ -8458,13 +8470,13 @@
 %}
 !
 
-glxWindowLeft: left right: right bottom: bottom top: top near: near far: far in: aGLXWindowId
+glxWindowLeft: left right: right bottom: bottom top: top near: znear far: zfar in: aGLXWindowId
     "this one was added independently by JEFF - kept for his programs ..."
 
-    self glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId
-!
-
-glxWindowLeft:left right:right top:top bottom:bottom near:near far:far in:aGLXWindowId
+    self glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId
+!
+
+glxWindowLeft:left right:right top:top bottom:bottom near:znear far:zfar in:aGLXWindowId
     "define perspective viewing pyramid"
 
 %{  /* NOCONTEXT */
@@ -8474,8 +8486,8 @@
     _COORD_ (right, c_right)
     _COORD_ (top, c_top)
     _COORD_ (bottom, c_bot)
-    _COORD_ (near, c_near)
-    _COORD_ (far, c_far)
+    _COORD_ (znear, c_near)
+    _COORD_ (zfar, c_far)
     SETWIN(aGLXWindowId)
 #ifdef OPENGL
 #else
@@ -8793,5 +8805,5 @@
 !GLXWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.72 1998-03-05 19:47:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.73 1999-01-15 21:33:19 cg Exp $'
 ! !
--- a/XWorkstat.st	Sun Jan 10 18:03:56 1999 +0100
+++ b/XWorkstat.st	Fri Jan 15 22:33:42 1999 +0100
@@ -61,9 +61,14 @@
 # undef memset
 #endif
 
-#ifdef __openVMS__
+#if defined(__openVMS__) || defined(LINUX)
+  /*            
+   * mhmh - used in stdio ...
+   * (new linuxes)
+   */           
 # undef __new
-#endif
+# define __NEED_REDEF_new__
+#endif  
 
 #include <stdio.h>
 #include <X11/Xlib.h>
@@ -79,6 +84,10 @@
 # include <sys/socket.h>
 #endif
 
+#ifdef __NEED_REDEF_new__
+# define __new  __STX___new
+#endif
+
 /*
  * this define suppresses XAllocColor/XFreeColor on
  * TrueColor systems - I am not certain, if this is
@@ -10047,6 +10056,6 @@
 !XWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.297 1998-10-02 10:52:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.298 1999-01-15 21:33:42 cg Exp $'
 ! !
 XWorkstation initialize!
--- a/XWorkstation.st	Sun Jan 10 18:03:56 1999 +0100
+++ b/XWorkstation.st	Fri Jan 15 22:33:42 1999 +0100
@@ -61,9 +61,14 @@
 # undef memset
 #endif
 
-#ifdef __openVMS__
+#if defined(__openVMS__) || defined(LINUX)
+  /*            
+   * mhmh - used in stdio ...
+   * (new linuxes)
+   */           
 # undef __new
-#endif
+# define __NEED_REDEF_new__
+#endif  
 
 #include <stdio.h>
 #include <X11/Xlib.h>
@@ -79,6 +84,10 @@
 # include <sys/socket.h>
 #endif
 
+#ifdef __NEED_REDEF_new__
+# define __new  __STX___new
+#endif
+
 /*
  * this define suppresses XAllocColor/XFreeColor on
  * TrueColor systems - I am not certain, if this is
@@ -10047,6 +10056,6 @@
 !XWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.297 1998-10-02 10:52:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.298 1999-01-15 21:33:42 cg Exp $'
 ! !
 XWorkstation initialize!