summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKendall Bennett <[email protected]>1999-11-11 03:21:43 +0000
committerKendall Bennett <[email protected]>1999-11-11 03:21:43 +0000
commita73119234cc5d0b78ebd48c7bb7c43b755028836 (patch)
tree779e6e58ebad86bfac8f0a25b17e33cd759f3fbc /src
parentcb5ecb883eb3be842ef44c61df8d4b527877c858 (diff)
. Updated GL/gl.h with GLCALLACKP and GLAPIENTRYP macros for compatibility
with the IBM VisualAge C++ compiler. Eventually some more code will be needed in the headers to enable the reversal of (__stdcall*) to (*__stdcall) for the IBM compilers, however we currently build using our own header files that already handle this. . Changed instances of (GLCALLBACK*) to GLCALLBACKP for compatibility with the IBM VisualAge C++ compiler in src-glu. . Misc cleanups for warnings generated with Watcom C++ in src-glu. Compiles with 0 warnings now. . tess_hash.c: line 244 - Why is this function stubbed out? I removed the code with a #if 0 to avoid a compiler warning, but it looks dangerous.
Diffstat (limited to 'src')
-rw-r--r--src/glu/mesa/nurbs.c27
-rw-r--r--src/glu/mesa/nurbs.h25
-rw-r--r--src/glu/mesa/quadric.c44
-rw-r--r--src/glu/mesa/tess.c52
4 files changed, 94 insertions, 54 deletions
diff --git a/src/glu/mesa/nurbs.c b/src/glu/mesa/nurbs.c
index 65bc6f8acb7..0ce9a449873 100644
--- a/src/glu/mesa/nurbs.c
+++ b/src/glu/mesa/nurbs.c
@@ -1,4 +1,4 @@
-/* $Id: nurbs.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
+/* $Id: nurbs.c,v 1.2 1999/11/11 03:21:43 kendallb Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,8 +23,25 @@
/*
* $Log: nurbs.c,v $
- * Revision 1.1 1999/08/19 00:55:42 jtg
- * Initial revision
+ * Revision 1.2 1999/11/11 03:21:43 kendallb
+ *
+ * . Updated GL/gl.h with GLCALLACKP and GLAPIENTRYP macros for compatibility
+ * with the IBM VisualAge C++ compiler. Eventually some more code will be
+ * needed in the headers to enable the reversal of (__stdcall*) to (*__stdcall)
+ * for the IBM compilers, however we currently build using our own header files
+ * that already handle this.
+ *
+ * . Changed instances of (GLCALLBACK*) to GLCALLBACKP for compatibility
+ * with the IBM VisualAge C++ compiler in src-glu.
+ *
+ * . Misc cleanups for warnings generated with Watcom C++ in src-glu. Compiles
+ * with 0 warnings now.
+ *
+ * . tess_hash.c: line 244 - Why is this function stubbed out? I removed the
+ * code with a #if 0 to avoid a compiler warning, but it looks dangerous.
+ *
+ * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
+ * Imported sources
*
* Revision 1.14 1999/01/03 03:23:15 brianp
* now using GLAPIENTRY and GLCALLBACK keywords (Ted Jump)
@@ -600,12 +617,12 @@ void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
void GLAPIENTRY
-gluNurbsCallback( GLUnurbsObj *nobj, GLenum which, void (GLCALLBACK *fn)())
+gluNurbsCallback( GLUnurbsObj *nobj, GLenum which, void (GLCALLBACKP fn)())
{
#if defined(__CYGWIN32__) || defined(OPENSTEP)
nobj->error_callback = (void(*)(GLenum))fn;
#else
- nobj->error_callback = (void(GLCALLBACK*)(GLenum))fn;
+ nobj->error_callback = (void(GLCALLBACKP)(GLenum))fn;
#endif
if(which!=GLU_ERROR)
diff --git a/src/glu/mesa/nurbs.h b/src/glu/mesa/nurbs.h
index fc2b4f7d557..3e38ea40068 100644
--- a/src/glu/mesa/nurbs.h
+++ b/src/glu/mesa/nurbs.h
@@ -1,4 +1,4 @@
-/* $Id: nurbs.h,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
+/* $Id: nurbs.h,v 1.2 1999/11/11 03:21:43 kendallb Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,8 +23,25 @@
/*
* $Log: nurbs.h,v $
- * Revision 1.1 1999/08/19 00:55:42 jtg
- * Initial revision
+ * Revision 1.2 1999/11/11 03:21:43 kendallb
+ *
+ * . Updated GL/gl.h with GLCALLACKP and GLAPIENTRYP macros for compatibility
+ * with the IBM VisualAge C++ compiler. Eventually some more code will be
+ * needed in the headers to enable the reversal of (__stdcall*) to (*__stdcall)
+ * for the IBM compilers, however we currently build using our own header files
+ * that already handle this.
+ *
+ * . Changed instances of (GLCALLBACK*) to GLCALLBACKP for compatibility
+ * with the IBM VisualAge C++ compiler in src-glu.
+ *
+ * . Misc cleanups for warnings generated with Watcom C++ in src-glu. Compiles
+ * with 0 warnings now.
+ *
+ * . tess_hash.c: line 244 - Why is this function stubbed out? I removed the
+ * code with a #if 0 to avoid a compiler warning, but it looks dangerous.
+ *
+ * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
+ * Imported sources
*
* Revision 1.5 1999/02/27 13:55:31 brianp
* fixed BeOS-related GLU typedef problems
@@ -151,7 +168,7 @@ typedef struct
struct GLUnurbs {
GLboolean culling;
GLenum error;
- void (GLCALLBACK *error_callback)( GLenum err );
+ void (GLCALLBACKP error_callback)( GLenum err );
GLenum display_mode;
GLU_nurbs_enum nurbs_type;
GLboolean auto_load_matrix;
diff --git a/src/glu/mesa/quadric.c b/src/glu/mesa/quadric.c
index 4698e795b15..8bdf7cc0852 100644
--- a/src/glu/mesa/quadric.c
+++ b/src/glu/mesa/quadric.c
@@ -1,4 +1,4 @@
-/* $Id: quadric.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
+/* $Id: quadric.c,v 1.2 1999/11/11 03:21:43 kendallb Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,8 +23,25 @@
/*
* $Log: quadric.c,v $
- * Revision 1.1 1999/08/19 00:55:42 jtg
- * Initial revision
+ * Revision 1.2 1999/11/11 03:21:43 kendallb
+ *
+ * . Updated GL/gl.h with GLCALLACKP and GLAPIENTRYP macros for compatibility
+ * with the IBM VisualAge C++ compiler. Eventually some more code will be
+ * needed in the headers to enable the reversal of (__stdcall*) to (*__stdcall)
+ * for the IBM compilers, however we currently build using our own header files
+ * that already handle this.
+ *
+ * . Changed instances of (GLCALLBACK*) to GLCALLBACKP for compatibility
+ * with the IBM VisualAge C++ compiler in src-glu.
+ *
+ * . Misc cleanups for warnings generated with Watcom C++ in src-glu. Compiles
+ * with 0 warnings now.
+ *
+ * . tess_hash.c: line 244 - Why is this function stubbed out? I removed the
+ * code with a #if 0 to avoid a compiler warning, but it looks dangerous.
+ *
+ * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
+ * Imported sources
*
* Revision 1.19 1999/02/27 13:55:31 brianp
* fixed BeOS-related GLU typedef problems
@@ -105,17 +122,6 @@
-#ifndef M_PI
-# define M_PI (3.1415926)
-#endif
-
-
-/*
- * Convert degrees to radians:
- */
-#define DEG_TO_RAD(A) ((A)*(M_PI/180.0))
-
-
/*
* Sin and Cos for degree angles:
*/
@@ -135,7 +141,7 @@ struct GLUquadric {
GLenum Orientation; /* GLU_INSIDE or GLU_OUTSIDE */
GLboolean TextureFlag; /* Generate texture coords? */
GLenum Normals; /* GLU_NONE, GLU_FLAT, or GLU_SMOOTH */
- void (GLCALLBACK *ErrorFunc)(GLenum err); /* Error handler callback function */
+ void (GLCALLBACKP ErrorFunc)(GLenum err); /* Error handler callback function */
};
@@ -221,7 +227,7 @@ void GLAPIENTRY gluQuadricOrientation( GLUquadricObj *quadObject,
* Set the error handler callback function.
*/
void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
- GLenum which, void (GLCALLBACK *fn)() )
+ GLenum which, void (GLCALLBACKP fn)() )
{
/*
* UGH, this is a mess! I thought ANSI was a standard.
@@ -232,13 +238,13 @@ void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
#elif defined(OPENSTEP)
qobj->ErrorFunc = (void(*)(GLenum))fn;
#elif defined(_WIN32)
- qobj->ErrorFunc = (void(GLCALLBACK*)(int))fn;
+ qobj->ErrorFunc = (void(GLCALLBACKP)(int))fn;
#elif defined(__STORM__)
- qobj->ErrorFunc = (void(GLCALLBACK*)(GLenum))fn;
+ qobj->ErrorFunc = (void(GLCALLBACKP)(GLenum))fn;
#elif defined(__BEOS__)
qobj->ErrorFunc = (void(*)(GLenum))fn;
#else
- qobj->ErrorFunc = (void(GLCALLBACK*)())fn;
+ qobj->ErrorFunc = (void(GLCALLBACKP)())fn;
#endif
}
}
diff --git a/src/glu/mesa/tess.c b/src/glu/mesa/tess.c
index 6daa7220542..7f1b5a56823 100644
--- a/src/glu/mesa/tess.c
+++ b/src/glu/mesa/tess.c
@@ -1,4 +1,4 @@
-/* $Id: tess.c,v 1.20 1999/11/05 20:36:55 gareth Exp $ */
+/* $Id: tess.c,v 1.21 1999/11/11 03:21:43 kendallb Exp $ */
/*
* Mesa 3-D graphics library
@@ -388,60 +388,60 @@ void GLAPIENTRY gluTessEndPolygon( GLUtesselator *tobj )
* gluTessCallback
*****************************************************************************/
void GLAPIENTRY gluTessCallback( GLUtesselator *tobj, GLenum which,
- void (GLCALLBACK *fn)() )
+ void (GLCALLBACKP fn)() )
{
switch ( which )
{
/* Register the begin callbacks. */
case GLU_TESS_BEGIN:
- tobj->callbacks.begin = (void (GLCALLBACK*)(GLenum)) fn;
+ tobj->callbacks.begin = (void (GLCALLBACKP)(GLenum)) fn;
break;
case GLU_TESS_BEGIN_DATA:
- tobj->callbacks.beginData = (void (GLCALLBACK*)(GLenum, void *)) fn;
+ tobj->callbacks.beginData = (void (GLCALLBACKP)(GLenum, void *)) fn;
break;
/* Register the edge flag callbacks. */
case GLU_TESS_EDGE_FLAG:
- tobj->callbacks.edgeFlag = (void (GLCALLBACK*)(GLboolean)) fn;
+ tobj->callbacks.edgeFlag = (void (GLCALLBACKP)(GLboolean)) fn;
break;
case GLU_TESS_EDGE_FLAG_DATA:
tobj->callbacks.edgeFlagData =
- (void (GLCALLBACK*)(GLboolean, void *)) fn;
+ (void (GLCALLBACKP)(GLboolean, void *)) fn;
break;
/* Register the vertex callbacks. */
case GLU_TESS_VERTEX:
- tobj->callbacks.vertex = (void (GLCALLBACK*)(void *)) fn;
+ tobj->callbacks.vertex = (void (GLCALLBACKP)(void *)) fn;
break;
case GLU_TESS_VERTEX_DATA:
- tobj->callbacks.vertexData = (void (GLCALLBACK*)(void *, void *)) fn;
+ tobj->callbacks.vertexData = (void (GLCALLBACKP)(void *, void *)) fn;
break;
/* Register the end callbacks. */
case GLU_TESS_END:
- tobj->callbacks.end = (void (GLCALLBACK*)(void)) fn;
+ tobj->callbacks.end = (void (GLCALLBACKP)(void)) fn;
break;
case GLU_TESS_END_DATA:
- tobj->callbacks.endData = (void (GLCALLBACK*)(void *)) fn;
+ tobj->callbacks.endData = (void (GLCALLBACKP)(void *)) fn;
break;
/* Register the error callbacks. */
case GLU_TESS_ERROR:
- tobj->callbacks.error = (void (GLCALLBACK*)(GLenum)) fn;
+ tobj->callbacks.error = (void (GLCALLBACKP)(GLenum)) fn;
break;
case GLU_TESS_ERROR_DATA:
- tobj->callbacks.errorData = (void (GLCALLBACK*)(GLenum, void *)) fn;
+ tobj->callbacks.errorData = (void (GLCALLBACKP)(GLenum, void *)) fn;
break;
/* Register the combine callbacks. */
case GLU_TESS_COMBINE:
tobj->callbacks.combine =
- (void (GLCALLBACK*)(GLdouble[3], void *[4],
+ (void (GLCALLBACKP)(GLdouble[3], void *[4],
GLfloat [4], void **)) fn;
break;
case GLU_TESS_COMBINE_DATA:
tobj->callbacks.combineData =
- (void (GLCALLBACK*)(GLdouble[3], void *[4], GLfloat [4],
+ (void (GLCALLBACKP)(GLdouble[3], void *[4], GLfloat [4],
void **, void *)) fn;
break;
@@ -597,19 +597,19 @@ void tess_error_callback( GLUtesselator *tobj, GLenum errnum )
*****************************************************************************/
static void init_callbacks( tess_callbacks_t *callbacks )
{
- callbacks->begin = ( void (GLCALLBACK*)(GLenum) ) NULL;
- callbacks->beginData = ( void (GLCALLBACK*)(GLenum, void *) ) NULL;
- callbacks->edgeFlag = ( void (GLCALLBACK*)(GLboolean) ) NULL;
- callbacks->edgeFlagData = ( void (GLCALLBACK*)(GLboolean, void *) ) NULL;
- callbacks->vertex = ( void (GLCALLBACK*)(void *) ) NULL;
- callbacks->vertexData = ( void (GLCALLBACK*)(void *, void *) ) NULL;
- callbacks->end = ( void (GLCALLBACK*)(void) ) NULL;
- callbacks->endData = ( void (GLCALLBACK*)(void *) ) NULL;
- callbacks->error = ( void (GLCALLBACK*)(GLenum) ) NULL;
- callbacks->errorData = ( void (GLCALLBACK*)(GLenum, void *) ) NULL;
- callbacks->combine = ( void (GLCALLBACK*)(GLdouble [3], void *[4],
+ callbacks->begin = ( void (GLCALLBACKP)(GLenum) ) NULL;
+ callbacks->beginData = ( void (GLCALLBACKP)(GLenum, void *) ) NULL;
+ callbacks->edgeFlag = ( void (GLCALLBACKP)(GLboolean) ) NULL;
+ callbacks->edgeFlagData = ( void (GLCALLBACKP)(GLboolean, void *) ) NULL;
+ callbacks->vertex = ( void (GLCALLBACKP)(void *) ) NULL;
+ callbacks->vertexData = ( void (GLCALLBACKP)(void *, void *) ) NULL;
+ callbacks->end = ( void (GLCALLBACKP)(void) ) NULL;
+ callbacks->endData = ( void (GLCALLBACKP)(void *) ) NULL;
+ callbacks->error = ( void (GLCALLBACKP)(GLenum) ) NULL;
+ callbacks->errorData = ( void (GLCALLBACKP)(GLenum, void *) ) NULL;
+ callbacks->combine = ( void (GLCALLBACKP)(GLdouble [3], void *[4],
GLfloat [4], void **) ) NULL;
- callbacks->combineData = ( void (GLCALLBACK*)(GLdouble [3], void *[4],
+ callbacks->combineData = ( void (GLCALLBACKP)(GLdouble [3], void *[4],
GLfloat [4], void **,
void *) ) NULL;
}