dri: move __driUtilMessage to xmlconfig.c

__driUtilMessage seems to have fallen out of favor and is only used by xmlconfig.c now
This commit is contained in:
George Sapountzis
2011-11-03 14:19:41 +02:00
parent 78c076e654
commit ceda4da857
4 changed files with 23 additions and 30 deletions

View File

@@ -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, \