source: live-build/trunk/fuentes/functions/cursor.sh @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5##
6## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7## This is free software, and you are welcome to redistribute it
8## under certain conditions; see COPYING for details.
9
10
11Cursor_goto_position ()
12{
13        __LINE="${1}"
14        __COLUMN="${2}"
15
16        #echo -e "[${__LINE};${__COLUMN};H\c"
17        printf "[${__LINE};${__COLUMN};H"
18}
19
20Cursor_save_position ()
21{
22        #echo -e "[s\c"
23        printf "[s"
24}
25
26Cursor_restore_position ()
27{
28        #echo -e "[u\c"
29        printf "[u"
30}
31
32Cursor_line_up ()
33{
34        __LINES="${1}"
35
36        #echo -e "[${__LINES}A\c"
37        printf "[${__LINES}A"
38}
39
40Cursor_line_down ()
41{
42        __LINES="${1}"
43
44        #echo -e "[${__LINES}B\c"
45        printf "[${__LINES}B"
46}
47
48Cursor_columns_forward ()
49{
50        __COLUMNS="${1}"
51
52        #echo -e "[${__COLUMNS}C\c"
53        printf "[${__COLUMNS}C"
54}
55
56Cursor_columns_backward ()
57{
58        __COLUMNS="${1}"
59
60        #echo -e "[${__COLUMNS}D\c"
61        printf "[${__COLUMNS}D"
62}
63
64Cursor_clear_screen ()
65{
66        #echo -e "[2J\c"
67        printf "[2J"
68}
69
70Cursor_erase_EOL ()
71{
72        #echo -e "[K\c"
73        printf "[K"
74}
Note: See TracBrowser for help on using the repository browser.