forked from AbleOS/ableos
less less broken
This commit is contained in:
parent
a8572da351
commit
936c9e6525
|
@ -182,7 +182,7 @@ FormatOptions := struct {
|
||||||
/* SAFETY:
|
/* SAFETY:
|
||||||
* Assumes the buffer is wide enough for the formatted text and a null char
|
* Assumes the buffer is wide enough for the formatted text and a null char
|
||||||
*/
|
*/
|
||||||
format := fn($T: type, v: T, str: ^u8): ^u8 return @inline(format_args, T, v, str, .())
|
format := fn($T: type, v: T, str: ^u8): ^u8 return @inline(format_args, T, v, str, .{})
|
||||||
|
|
||||||
format_args := fn($T: type, v: T, str: ^u8, opts: FormatOptions): ^u8 {
|
format_args := fn($T: type, v: T, str: ^u8, opts: FormatOptions): ^u8 {
|
||||||
@inline(string.clear, str)
|
@inline(string.clear, str)
|
||||||
|
|
|
@ -20,7 +20,7 @@ test := fn(): uint {
|
||||||
radix: 16,
|
radix: 16,
|
||||||
}))
|
}))
|
||||||
log.info(format_args(f64, math.LN_2, buffer, .{radix: 16}))
|
log.info(format_args(f64, math.LN_2, buffer, .{radix: 16}))
|
||||||
// log.info(format([u8; 3], .(1, 2, 3), buffer))
|
log.info(format([u8; 3], .(1, 2, 3), buffer))
|
||||||
log.info(format(^SubThingy, &.(0.0, true), buffer))
|
log.info(format(^SubThingy, &.(0.0, true), buffer))
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue