-/* $Id: glu.c,v 1.11 1999/09/17 01:00:38 brianp Exp $ */
+/* $Id: glu.c,v 1.12 1999/09/17 03:07:28 tjump Exp $ */
/*
* Mesa 3-D graphics library
/*
* $Log: glu.c,v $
+ * Revision 1.12 1999/09/17 03:07:28 tjump
+ * Win32 build req't updates
+ *
* Revision 1.11 1999/09/17 01:00:38 brianp
* fixed typo
*
#ifdef __cplusplus
/* for BeOS R4.5 */
-void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))(...)
+gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
#else
+<<<<<<< glu.c
+gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
+=======
void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))()
+>>>>>>> 1.11
#endif
{
struct proc {
for (i = 0; procTable[i].address; i++) {
if (strcmp((const char *) procName, procTable[i].name) == 0)
- return (void (*)()) procTable[i].address;
+ return (gluProcAddress) procTable[i].address;
}
return NULL;
-/* $Id: tess.c,v 1.7 1999/09/16 06:41:42 gareth Exp $ */
+/* $Id: tess.c,v 1.8 1999/09/17 03:07:28 tjump Exp $ */
/*
* Mesa 3-D graphics library
/*
* $Log: tess.c,v $
+ * Revision 1.8 1999/09/17 03:07:28 tjump
+ * Win32 build req't updates
+ *
* Revision 1.7 1999/09/16 06:41:42 gareth
* Misc winding rule bug fixes.
*
*
* Internal error handler. Call the user-registered error callback.
*****************************************************************************/
-void tess_error_callback( GLUtesselator *tobj, GLenum errno, void *data )
+
+/* 2nd arg changed from 'errno' to 'errnum' since MSVC defines errnum as */
+/* a macro (of all things) and thus breaks the build -tjump */
+
+void tess_error_callback( GLUtesselator *tobj, GLenum errnum, void *data )
{
if ( tobj->error == GLU_NO_ERROR )
{
- tobj->error = errno;
+ tobj->error = errnum;
}
if ( tobj->callbacks.errorData != NULL )
{
- ( tobj->callbacks.errorData )( errno, data );
+ ( tobj->callbacks.errorData )( errnum, data );
}
else if ( tobj->callbacks.error != NULL )
{
- ( tobj->callbacks.error )( errno );
+ ( tobj->callbacks.error )( errnum );
}
}
static void
mapMenu(GLUTmenu * menu, int x, int y)
{
- TrackPopupMenu(menu->win, TPM_LEFTALIGN |
- __glutMenuButton == TPM_RIGHTBUTTON ?
- TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
+ TrackPopupMenu((HMENU) menu->win, TPM_LEFTALIGN |
+ (__glutMenuButton == TPM_RIGHTBUTTON) ? TPM_RIGHTBUTTON : TPM_LEFTBUTTON,
x, y, 0, __glutCurrentWindow->win, NULL);
}
menu->cascade = NULL;
menu->highlighted = NULL;
menu->anchor = NULL;
- menu->win = CreatePopupMenu();
+ menu->win = (HWND) CreatePopupMenu();
menuList[menuid] = menu;
__glutSetMenu(menu);
return menuid + 1;
menuModificationError();
}
assert(menu->id == menunum - 1);
- DestroyMenu(menu->win);
+ DestroyMenu( (HMENU) menu->win);
menuList[menunum - 1] = NULL;
/* free all menu entries */
item = menu->list;
item->value = value;
item->unique = uniqueMenuHandler++;
if (isTrigger) {
- AppendMenu(menu->win, MF_POPUP, (UINT)item->win, label);
+ AppendMenu((HMENU) menu->win, MF_POPUP, (UINT)item->win, label);
} else {
- AppendMenu(menu->win, MF_STRING, item->unique, label);
+ AppendMenu((HMENU) menu->win, MF_STRING, item->unique, label);
}
}
need to account for submenus. */
item->menu->submenus--;
/* Nuke the Win32 menu. */
- DestroyMenu(item->win);
+ DestroyMenu((HMENU) item->win);
}
free(item->label);
item->len = (int) strlen(label);
item->value = value;
item->unique = uniqueMenuHandler++;
- ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
+ ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
MF_BYPOSITION | MFT_STRING, item->unique, label);
return;
/* If changing a menu entry to as submenu trigger, we
need to account for submenus. */
item->menu->submenus++;
- item->win = CreatePopupMenu();
+ item->win = (HWND) CreatePopupMenu();
}
free(item->label);
popupmenu = __glutGetMenuByNum(menu);
if (popupmenu)
item->win = popupmenu->win;
- ModifyMenu(__glutCurrentMenu->win, (UINT) i - 1,
+ ModifyMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1,
MF_BYPOSITION | MF_POPUP, (UINT) item->win, label);
return;
}
/* Patch up menu's item list. */
*prev = item->next;
- RemoveMenu(__glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
+ RemoveMenu((HMENU) __glutCurrentMenu->win, (UINT) i - 1, MF_BYPOSITION);
free(item->label);
free(item);