From 5683af821e735b8b2873c6627d907cc57b46da7b Mon Sep 17 00:00:00 2001 From: Lukas Neubert Date: Wed, 6 Jan 2021 18:19:48 +0100 Subject: [PATCH] bin2v: correct newlines in console output (#7925) --- cmd/tools/vbin2v.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/tools/vbin2v.v b/cmd/tools/vbin2v.v index 50f7ee0f72..67e9dd6cdd 100644 --- a/cmd/tools/vbin2v.v +++ b/cmd/tools/vbin2v.v @@ -118,7 +118,7 @@ fn main() { exit(0) } context.files = real_files - if context.write_file != '' && !context.write_file.ends_with('.v') { + if context.write_file != '' && os.file_ext(context.write_file) !in ['.vv', '.v'] { context.write_file += '.v' } mut file_byte_map := map[string][]byte{} @@ -140,10 +140,10 @@ fn main() { } out_file.write_str(context.footer()) } else { - println(context.header()) + print(context.header()) for bname, fbytes in file_byte_map { - println(context.file2v(bname, fbytes, max_bname)) + print(context.file2v(bname, fbytes, max_bname)) } - println(context.footer()) + print(context.footer()) } }