Changed position and made function public

pull/689/head
Bowero 2019-06-26 18:56:33 +02:00 committed by Alexander Medvednikov
parent 7ff0e48434
commit 821c5934cc
1 changed files with 5 additions and 5 deletions

10
os/os.v
View File

@ -449,6 +449,11 @@ pub fn write_file(path, text string) {
f.close() f.close()
} }
pub fn clear() {
C.printf('\x1b[2J')
C.printf('\x1b[H')
}
fn on_segfault(f voidptr) { fn on_segfault(f voidptr) {
$if windows { $if windows {
return return
@ -461,9 +466,4 @@ fn on_segfault(f voidptr) {
# sa.sa_flags = SA_SIGINFO; # sa.sa_flags = SA_SIGINFO;
# sigaction(SIGSEGV, &sa, 0); # sigaction(SIGSEGV, &sa, 0);
} }
}
fn clear() {
C.printf('\x1b[2J')
C.printf('\x1b[H')
} }