From 708f3ccc3d457499ac046a009a7c3317b31a2b4b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 7 Oct 2012 04:31:31 -0700 Subject: Add trace, warn, and error markers to logged output --- Alc/helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc') diff --git a/Alc/helpers.c b/Alc/helpers.c index 2143a4c8..262c2551 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -433,13 +433,13 @@ void *GetSymbol(void *handle, const char *name) #endif -void al_print(const char *func, const char *fmt, ...) +void al_print(const char *type, const char *func, const char *fmt, ...) { char str[256]; int i; - i = snprintf(str, sizeof(str), "AL lib: %s: ", func); - if(i < (int)sizeof(str) && i > 0) + i = snprintf(str, sizeof(str), "AL lib: %s %s: ", type, func); + if(i > 0 && (unsigned int)i < sizeof(str)) { va_list ap; va_start(ap, fmt); -- cgit v1.2.3