summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeorge Sapountzis <[email protected]>2011-11-03 14:19:41 +0200
committerGeorge Sapountzis <[email protected]>2011-11-04 23:33:05 +0200
commitceda4da8573cca85e02d0e7c2db41f9151683321 (patch)
tree970a8c07aa2f8ded63ef81c8e8c2620c7e83bc16 /src
parent78c076e6548f0bb44758d89ec434bcfddd902939 (diff)
dri: move __driUtilMessage to xmlconfig.c
__driUtilMessage seems to have fallen out of favor and is only used by xmlconfig.c now
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/common/utils.c23
-rw-r--r--src/mesa/drivers/dri/common/utils.h5
-rw-r--r--src/mesa/drivers/dri/common/xmlconfig.c22
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c3
4 files changed, 23 insertions, 30 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index d8656a784a1..328f56b50d4 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -37,29 +37,6 @@
#include "utils.h"
-/**
- * Print message to \c stderr if the \c LIBGL_DEBUG environment variable
- * is set.
- *
- * Is called from the drivers.
- *
- * \param f \c printf like format string.
- */
-void
-__driUtilMessage(const char *f, ...)
-{
- va_list args;
-
- if (getenv("LIBGL_DEBUG")) {
- fprintf(stderr, "libGL: ");
- va_start(args, f);
- vfprintf(stderr, f, args);
- va_end(args);
- fprintf(stderr, "\n");
- }
-}
-
-
unsigned
driParseDebugString( const char * debug,
const struct dri_debug_control * control )
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index c2302de5d40..9d6eb3037c6 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -32,16 +32,11 @@
#include <GL/internal/dri_interface.h>
#include "main/context.h"
-typedef struct __DRIutilversionRec2 __DRIutilversion2;
-
struct dri_debug_control {
const char * string;
unsigned flag;
};
-extern void
-__driUtilMessage(const char *f, ...);
-
extern unsigned driParseDebugString( const char * debug,
const struct dri_debug_control * control );
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index 12dd31bb162..6d1d5ec6109 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -420,6 +420,28 @@ static GLboolean checkValue (const driOptionValue *v, const driOptionInfo *info)
return GL_FALSE;
}
+/**
+ * Print message to \c stderr if the \c LIBGL_DEBUG environment variable
+ * is set.
+ *
+ * Is called from the drivers.
+ *
+ * \param f \c printf like format string.
+ */
+static void
+__driUtilMessage(const char *f, ...)
+{
+ va_list args;
+
+ if (getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "libGL: ");
+ va_start(args, f);
+ vfprintf(stderr, f, args);
+ va_end(args);
+ fprintf(stderr, "\n");
+ }
+}
+
/** \brief Output a warning message. */
#define XML_WARNING1(msg) do {\
__driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index cd85595ebfe..3e5f46b483d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -1060,8 +1060,7 @@ radeonCreateScreen2(__DRIscreen *sPriv)
/* Allocate the private area */
screen = (radeonScreenPtr) CALLOC( sizeof(*screen) );
if ( !screen ) {
- __driUtilMessage("%s: Could not allocate memory for screen structure",
- __FUNCTION__);
+ fprintf(stderr, "%s: Could not allocate memory for screen structure", __FUNCTION__);
fprintf(stderr, "leaving here\n");
return NULL;
}