From fe2cfd9b19657274244b187310b706ff5aa09728 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 13 Jan 2011 11:44:16 +0000 Subject: util: Don't limit debug_printf message length on unices. --- src/gallium/auxiliary/util/u_debug.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/util') diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index 2ad2f95b13e..a19db3a6576 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -47,14 +47,19 @@ void _debug_vprintf(const char *format, va_list ap) { +#if defined(PIPE_OS_WINDOWS) || defined(PIPE_OS_EMBEDDED) /* We buffer until we find a newline. */ static char buf[4096] = {'\0'}; size_t len = strlen(buf); int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap); if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) { - os_log_message(buf); + os_log_message(buf * h); buf[0] = '\0'; } +#else + /* Just print as-is to stderr */ + vfprintf(stderr, format, ap); +#endif } -- cgit v1.2.3 From 80f18876f689e250e286f8821e37389b414776bd Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 13 Jan 2011 11:45:40 +0000 Subject: util: Undo spurious changes in last commit. --- src/gallium/auxiliary/util/u_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/util') diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index a19db3a6576..f4ad545bee7 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -53,7 +53,7 @@ void _debug_vprintf(const char *format, va_list ap) size_t len = strlen(buf); int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap); if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) { - os_log_message(buf * h); + os_log_message(buf); buf[0] = '\0'; } #else -- cgit v1.2.3