add FreeTexImageData hook to help single-copy texturing in drivers
[mesa.git] / src / mesa / main / imports.c
index 0afc4ea4313e82ba03162aea1cce210fb94e3dbb..cee54e526b4693b4707c8530a315793565d18dd2 100644 (file)
@@ -32,7 +32,7 @@
 
 /*
  * Mesa 3-D graphics library
- * Version:  6.1
+ * Version:  6.3
  *
  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
  *
@@ -58,6 +58,7 @@
 
 #include "imports.h"
 #include "context.h"
+#include "version.h"
 
 
 #define MAXSTRING 4000  /* for vsnprintf() */
@@ -536,7 +537,7 @@ _mesa_bitcount(unsigned int n)
 GLhalfARB
 _mesa_float_to_half(float val)
 {
-   const int flt = *((int *) &val);
+   const int flt = *((int *) (void *) &val);
    const int flt_m = flt & 0x7fffff;
    const int flt_e = (flt >> 23) & 0xff;
    const int flt_s = (flt >> 31) & 0x1;
@@ -662,7 +663,7 @@ _mesa_half_to_float(GLhalfARB val)
    }
 
    flt = (flt_s << 31) | (flt_e << 23) | flt_m;
-   result = *((float *) &flt);
+   result = *((float *) (void *) &flt);
    return result;
 }
 
@@ -905,11 +906,11 @@ _mesa_problem( const GLcontext *ctx, const char *fmtString, ... )
    va_end( args );
 
 #if defined(XFree86LOADER) && defined(IN_MODULE)
-   xf86fprintf(stderr, "Mesa implementation error: %s\n", str);
-   xf86fprintf(stderr, "Please report to the DRI project at dri.sourceforge.net\n");
+   xf86fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
+   xf86fprintf(stderr, "Please report at bugzilla.freedesktop.org\n");
 #else
-   fprintf(stderr, "Mesa implementation error: %s\n", str);
-   fprintf(stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
+   fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
+   fprintf(stderr, "Please report at bugzilla.freedesktop.org\n");
 #endif
 }
 
@@ -1004,6 +1005,7 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
 {
    char s[MAXSTRING];
    va_list args;
+   (void) ctx;
    va_start(args, fmtString);
    vsnprintf(s, MAXSTRING, fmtString, args);
    va_end(args);
@@ -1094,6 +1096,7 @@ default_sprintf(__GLcontext *gc, char *str, const char *fmt, ...)
 {
    int r;
    va_list args;
+   (void) gc;
    va_start( args, fmt );  
    r = vsprintf( str, fmt, args );
    va_end( args );
@@ -1104,6 +1107,7 @@ default_sprintf(__GLcontext *gc, char *str, const char *fmt, ...)
 static void * CAPI
 default_fopen(__GLcontext *gc, const char *path, const char *mode)
 {
+   (void) gc;
    return fopen(path, mode);
 }
 
@@ -1111,6 +1115,7 @@ default_fopen(__GLcontext *gc, const char *path, const char *mode)
 static int CAPI
 default_fclose(__GLcontext *gc, void *stream)
 {
+   (void) gc;
    return fclose((FILE *) stream);
 }
 
@@ -1120,6 +1125,7 @@ default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
 {
    int r;
    va_list args;
+   (void) gc;
    va_start( args, fmt );  
    r = vfprintf( (FILE *) stream, fmt, args );
    va_end( args );
@@ -1132,6 +1138,7 @@ default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
 static __GLdrawablePrivate *
 default_GetDrawablePrivate(__GLcontext *gc)
 {
+   (void) gc;
    return NULL;
 }