This commit is contained in:
parent
beab3454b5
commit
986aa01948
@ -6,5 +6,5 @@
|
||||
typedef Result<void> (*callback_t)(char, void*);
|
||||
|
||||
Result<usize> cstyle_format(const char* format, callback_t callback, void* arg, va_list ap);
|
||||
Result<usize> vstring_format(char* buf, size_t max, const char* format, va_list ap);
|
||||
Result<usize> string_format(char* buf, size_t max, const char* format, ...);
|
||||
Result<usize> vstring_format(char* buf, usize max, const char* format, va_list ap);
|
||||
Result<usize> string_format(char* buf, usize max, const char* format, ...);
|
@ -475,10 +475,10 @@ Result<usize> cstyle_format(const char* format, callback_t callback, void* arg,
|
||||
struct StringFormatInfo
|
||||
{
|
||||
char* buffer;
|
||||
size_t remaining;
|
||||
usize remaining;
|
||||
};
|
||||
|
||||
Result<usize> vstring_format(char* buf, size_t max, const char* format, va_list ap)
|
||||
Result<usize> vstring_format(char* buf, usize max, const char* format, va_list ap)
|
||||
{
|
||||
StringFormatInfo info = {.buffer = buf, .remaining = max - 1};
|
||||
|
||||
@ -499,7 +499,7 @@ Result<usize> vstring_format(char* buf, size_t max, const char* format, va_list
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<usize> string_format(char* buf, size_t max, const char* format, ...)
|
||||
Result<usize> string_format(char* buf, usize max, const char* format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
|
Loading…
Reference in New Issue
Block a user