epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2006 The Android Open Source Project |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
reed@android.com | 9c97045 | 2009-04-03 14:26:10 +0000 | [diff] [blame] | 9 | |
| 10 | #include "SkTypes.h" |
| 11 | |
reed@google.com | baf7a07 | 2011-05-02 19:11:37 +0000 | [diff] [blame] | 12 | static const size_t kBufferSize = 2048; |
reed@android.com | 9c97045 | 2009-04-03 14:26:10 +0000 | [diff] [blame] | 13 | |
| 14 | #include <stdarg.h> |
| 15 | #include <stdio.h> |
| 16 | |
| 17 | void SkDebugf(const char format[], ...) { |
| 18 | char buffer[kBufferSize + 1]; |
| 19 | va_list args; |
| 20 | va_start(args, format); |
| 21 | vsnprintf(buffer, kBufferSize, format, args); |
| 22 | va_end(args); |
reed@android.com | 471403d | 2009-10-14 09:59:25 +0000 | [diff] [blame] | 23 | fprintf(stderr, "%s", buffer); |
reed@android.com | 9c97045 | 2009-04-03 14:26:10 +0000 | [diff] [blame] | 24 | } |