summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-12-01 19:45:33 -0800
committerChad Versace <chad.versace@linux.intel.com>2013-12-21 12:01:05 -0800
commit43cd22d5f414f2cdb6fa91f1cf531857b6e4d227 (patch)
tree46c5015a8bb61b7d3f55e126a235fd72561ae31a
parent8eca79929fd2033f0a8cb130bd8167354fdb333b (diff)
examples/gl_basic: Rename gl_basic_error() -> error_printf()
The new name better reflects what it does. It accepts a printf format string. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--examples/gl_basic.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/gl_basic.c b/examples/gl_basic.c
index 1a3ea4c..ce922b0 100644
--- a/examples/gl_basic.c
+++ b/examples/gl_basic.c
@@ -112,7 +112,7 @@ static const struct option get_opts[] = {
///
static void __attribute__((noreturn))
-gl_basic_error(const char *fmt, ...)
+error_printf(const char *fmt, ...)
{
va_list ap;
@@ -154,15 +154,15 @@ error_waffle(void)
const char *code = waffle_error_to_string(info->code);
if (info->message_length > 0)
- gl_basic_error("%s: %s", code, info->message);
+ error_printf("%s: %s", code, info->message);
else
- gl_basic_error("%s", code);
+ error_printf("%s", code);
}
static void
error_get_gl_symbol(const char *name)
{
- gl_basic_error("failed to get function pointer for %s", name);
+ error_printf("failed to get function pointer for %s", name);
}
/// @}
@@ -533,8 +533,8 @@ main(int argc, char **argv)
error_waffle();
if (!waffle_display_supports_context_api(dpy, opts.context_api)) {
- gl_basic_error("Display does not support %s",
- waffle_enum_to_string(opts.context_api));
+ error_printf("Display does not support %s",
+ waffle_enum_to_string(opts.context_api));
}
glClear = waffle_dl_sym(opts.dl, "glClear");
@@ -616,12 +616,12 @@ main(int argc, char **argv)
if (opts.context_forward_compatible
&& !(context_flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)) {
- gl_basic_error("context is not forward-compatible");
+ error_printf("context is not forward-compatible");
}
if (opts.context_debug
&& !(context_flags & GL_CONTEXT_FLAG_DEBUG_BIT)) {
- gl_basic_error("context is not a debug context");
+ error_printf("context is not a debug context");
}
ok = draw(window, opts.resize_window);