diff --git a/vlib/builtin/builtin.c.v b/vlib/builtin/builtin.c.v index a1bf18fc6e..30e6f0fe39 100644 --- a/vlib/builtin/builtin.c.v +++ b/vlib/builtin/builtin.c.v @@ -141,10 +141,10 @@ pub fn eprint(s string) { [manualfree] pub fn print(s string) { $if android { - // android print for logcat - C.fprintf(C.stdout, c'%.*s', s.len, s.str) - _write_buf_to_fd(1, s.str, s.len) - } $else $if ios { + C.fprintf(C.stdout, c'%.*s', s.len, s.str) // logcat + } + // no else if for android termux support + $if ios { // TODO: Implement a buffer as NSLog doesn't have a "print" C.WrappedNSLog(s.str) } $else $if freestanding { @@ -161,14 +161,14 @@ pub fn println(s string) { println('println(NIL)') return } + $if android { + C.fprintf(C.stdout, c'%.*s\n', s.len, s.str) // logcat + return + } + // no else if for android termux support $if ios { C.WrappedNSLog(s.str) return - } $else $if android { - // android print for logcat - C.fprintf(C.stdout, c'%.*s\n', s.len, s.str) - _writeln_to_fd(1, s) - return } $else $if freestanding { bare_print(s.str, u64(s.len)) bare_print(c'\n', 1)