mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
move atofq.v to a separate module
This commit is contained in:
parent
8d9f89e728
commit
d9835c1ecf
2 changed files with 24 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue