Rev 1234 | Rev 1623 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1234 | Rev 1272 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | return count; |
80 | return count; |
81 | } |
81 | } |
82 | 82 | ||
83 | int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) |
83 | int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) |
84 | { |
84 | { |
85 | size_t retval; |
- | |
86 | struct vsnprintf_data data = {size, 0, str}; |
85 | struct vsnprintf_data data = {size, 0, str}; |
87 | struct printf_spec ps = {(int(*)(void *, size_t, void *))vsnprintf_write, &data}; |
86 | struct printf_spec ps = {(int(*)(void *, size_t, void *))vsnprintf_write, &data}; |
88 | 87 | ||
89 | /* Print 0 at end of string - fix the case that nothing will be printed */ |
88 | /* Print 0 at end of string - fix the case that nothing will be printed */ |
90 | if (size > 0) |
89 | if (size > 0) |