OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkTypes.h" | 10 #include "SkTypes.h" |
11 | 11 |
12 static const size_t kBufferSize = 2048; | |
13 | |
14 #include <stdarg.h> | 12 #include <stdarg.h> |
15 #include <stdio.h> | 13 #include <stdio.h> |
16 | 14 |
17 void SkDebugf(const char format[], ...) { | 15 void SkDebugf(const char format[], ...) { |
18 char buffer[kBufferSize + 1]; | |
19 va_list args; | 16 va_list args; |
20 va_start(args, format); | 17 va_start(args, format); |
21 vsnprintf(buffer, kBufferSize, format, args); | 18 vfprintf(stderr, format, args); |
22 va_end(args); | 19 va_end(args); |
23 fprintf(stderr, "%s", buffer); | |
24 } | 20 } |
OLD | NEW |