#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <string.h>
static int sequence_number = 0 ;
if (mods&GLUT_ACTIVE_CTRL)
strcat(text,"CTRL");
if (mods&GLUT_ACTIVE_SHIFT)
+ {
if (text[0])
strcat(text,"+SHIFT");
else
strcat(text,"SHIFT");
+ }
if (mods&GLUT_ACTIVE_ALT)
+ {
if (text[0])
strcat(text,"+ALT");
else
strcat(text,"ALT");
+ }
if (!text[0])
strcat(text,"none");
static void
Warning(const char *fmt, va_list ap)
{
- printf("%6d Warning callback:\n");
+ printf("%6d Warning callback:\n",++sequence_number);
/* print warning message */
vprintf(fmt, ap);
Error(const char *fmt, va_list ap)
{
char dummy_string[STRING_LENGTH];
- printf("%6d Error callback:\n");
+ printf("%6d Error callback:\n",++sequence_number);
/* print warning message */
vprintf(fmt, ap);
int
main(int argc, char *argv[])
{
- int fractal_window ;
-
glutInitWindowSize(500, 250);
glutInitWindowPosition ( 140, 140 );
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE );
else
readConfigFile ( "fractals.dat" ) ;
- fractal_window = glutCreateWindow( window_title );
+ glutCreateWindow( window_title );
glClearColor(1.0, 1.0, 1.0, 1.0);
int
main(int argc, char *argv[])
{
- int fractal_window ;
-
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
glutInitWindowSize(500, 250);
else
readConfigFile ( "fractals.dat" ) ;
- fractal_window = glutCreateWindow( window_title );
+ glutCreateWindow( window_title );
glClearColor(1.0, 1.0, 1.0, 1.0);
{
if ( updown == GLUT_DOWN )
{
- double dist = 1.0e20 ; /* A very large number */
- dist = 0.0 ; /* so we don't get "unused variable" compiler warning */
+ /*double dist = 1.0e20 ; A very large number */
/* The idea here is that we go into "pick" mode and pick the nearest point
to the mouse click position. Unfortunately I don't have the time to implement
it at the moment. */
/* Cuboctahedron can't be shown when in shader mode, skip it */
if (useShader && NUMBEROF (table)-1 == ( unsigned )function_index)
+ {
if (key==GLUT_KEY_PAGE_UP)
function_index = 0;
else
function_index -= 1;
+ }
}
return;
/* Check the menu's ID. */
- if( menu->ID == (int)(enumerator->data) )
+ if( menu->ID == *( int *)(enumerator->data) )
{
enumerator->found = GL_TRUE;
enumerator->data = menu;
/* This is easy and makes use of the menus enumeration defined above */
enumerator.found = GL_FALSE;
- enumerator.data = (void *)menuID;
+ enumerator.data = (void *)&menuID;
fgEnumMenus( fghcbMenuByID, &enumerator );
if( enumerator.found )