/
usr
/
share
/
systemtap
/
examples
/
stapgames
/
tapset
/
/usr/share/systemtap/examples/stapgames/tapset
mkdir
upload
Name
Size
Mode
Actions
audio.stp
1896
0644
edit
dl
rm
cursor.stp
962
0644
edit
dl
rm
game.stp
660
0644
edit
dl
rm
gmtty.stp
1175
0644
edit
dl
rm
input.stp
2402
0644
edit
dl
rm
Edit:
/usr/share/systemtap/examples/stapgames/tapset/cursor.stp
(962B)
# ANSI Escape sequences # Copyright (C) 2008 Masami Hiramatsu <masami.hiramatsu@gmail.com> # # This file is free software and is distributed under the terms of the GNU # General Public License (GPL); either version 2, or (at your option) any # later version. /* * cursor_move * * Move cursor to x-y position */ function cursor_move(x:long, y:long) { printf("\033[%d;%dH", y, x) } function cursor_cls() { print("\033[1;1H\033[J") } function cursor_show() { print("\033[>5h") } function cursor_hide() { print("\033[>5I") } function cursor_save() { print("\033[s") } function cursor_restore() { print("\033[u") } function cursor_set_color(parm1:long) { printf("\033[%dm", parm1) } function cursor_set_color2(parm1:long, parm2:long) { printf("\033[%d;%dm", parm1, parm2) } function cursor_set_color3(parm1:long, parm2:long, parm3:long) { printf("\033[%d;%d;%dm", parm1, parm2, parm3) } function cursor_reset_color() { cursor_set_color2(0,0) }
Save
cmd:
run