move atofq.v to a separate module
parent
8d9f89e728
commit
d9835c1ecf
|
@ -172,3 +172,27 @@ pub fn is_atty(fd int) int {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
fn C.va_start()
|
||||
fn C.va_end()
|
||||
fn C.vsnprintf() int
|
||||
fn C.vsprintf() int
|
||||
|
||||
pub fn str2_(fmt charptr, ...) string {
|
||||
argptr := C.va_list{}
|
||||
C.va_start(argptr, fmt)
|
||||
len := C.vsnprintf(0, 0, fmt, argptr) + 1
|
||||
C.va_end(argptr)
|
||||
buf := malloc(len)
|
||||
C.va_start(argptr, fmt)
|
||||
C.vsprintf(charptr(buf), fmt, argptr)
|
||||
C.va_end(argptr)
|
||||
//#ifdef DEBUG_ALLOC
|
||||
// puts("_STR:");
|
||||
// puts(buf);
|
||||
//#endif
|
||||
return tos2(buf)
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue