Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r--src/pacman/util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 97b8e06d..03035037 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1837,3 +1837,21 @@ char *arg_to_string(int argc, char *argv[])
strcpy(p, argv[i]);
return cl_text;
}
+
+/* Moves console cursor `lines` up */
+void console_cursor_move_up(unsigned int lines)
+{
+ printf("\x1B[%dF", lines);
+}
+
+/* Moves console cursor `lines` down */
+void console_cursor_move_down(unsigned int lines)
+{
+ printf("\x1B[%dE", lines);
+}
+
+/* Erases line from the current cursor position till the end of the line */
+void console_erase_line(void)
+{
+ printf("\x1B[K");
+}