diff options
author | Eric Anholt <[email protected]> | 2014-01-23 11:14:16 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-01-27 09:37:29 -0800 |
commit | 867d7c0e108a4e6511305f82b18ea6f606a18427 (patch) | |
tree | d6903aa5808d845181728ca7349d2faab98826a3 /src/glx/dri_common.c | |
parent | 4a8da40fc089d465b72ecee89e24cd92e6714669 (diff) |
dri: Reuse dri_message to implement our other message handlers.
Reviewed-by: Keith Packard <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glx/dri_common.c')
-rw-r--r-- | src/glx/dri_common.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 93c45ea7bbd..0dd8982a18b 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -73,66 +73,6 @@ dri_message(int level, const char *f, ...) } } -/** - * Print informational message to stderr if LIBGL_DEBUG is set to - * "verbose". - */ -_X_HIDDEN void -InfoMessageF(const char *f, ...) -{ - va_list args; - const char *env; - - if ((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose")) { - fprintf(stderr, "libGL: "); - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); - } -} - -/** - * Print error message to stderr if LIBGL_DEBUG is set to anything but - * "quiet", (do nothing if LIBGL_DEBUG is unset). - */ -_X_HIDDEN void -ErrorMessageF(const char *f, ...) -{ - va_list args; - const char *env; - - if ((env = getenv("LIBGL_DEBUG")) && !strstr(env, "quiet")) { - fprintf(stderr, "libGL error: "); - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); - } -} - -/** - * Print error message unless LIBGL_DEBUG is set to "quiet". - * - * The distinction between CriticalErrorMessageF and ErrorMessageF is - * that critcial errors will be printed by default, (even when - * LIBGL_DEBUG is unset). - */ -_X_HIDDEN void -CriticalErrorMessageF(const char *f, ...) -{ - va_list args; - const char *env; - - if (!(env = getenv("LIBGL_DEBUG")) || !strstr(env, "quiet")) { - fprintf(stderr, "libGL error: "); - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); - - if (!env || !strstr(env, "verbose")) - fprintf(stderr, "libGL error: Try again with LIBGL_DEBUG=verbose for more details.\n"); - } -} - #ifndef DEFAULT_DRIVER_DIR /* this is normally defined in Mesa/configs/default with DRI_DRIVER_SEARCH_PATH */ #define DEFAULT_DRIVER_DIR "/usr/local/lib/dri" |