diff options
Diffstat (limited to 'src/basic/terminal-util.h')
-rw-r--r-- | src/basic/terminal-util.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h index c0bd0e67a6..c885e0a2d1 100644 --- a/src/basic/terminal-util.h +++ b/src/basic/terminal-util.h @@ -18,6 +18,7 @@ #define ANSI_MAGENTA "\x1B[0;35m" #define ANSI_CYAN "\x1B[0;36m" #define ANSI_WHITE "\x1B[0;37m" +#define ANSI_GREY "\x1B[0;2;37m" /* Bold/highlighted */ #define ANSI_HIGHLIGHT_BLACK "\x1B[0;1;30m" @@ -50,6 +51,9 @@ /* Erase characters until the end of the line */ #define ANSI_ERASE_TO_END_OF_LINE "\x1B[K" +/* Move cursor up one line */ +#define ANSI_REVERSE_LINEFEED "\x1BM" + /* Set cursor to top left corner and clear screen */ #define ANSI_HOME_CLEAR "\x1B[H\x1B[2J" @@ -129,6 +133,7 @@ DEFINE_ANSI_FUNC(highlight_yellow, HIGHLIGHT_YELLOW); DEFINE_ANSI_FUNC(highlight_blue, HIGHLIGHT_BLUE); DEFINE_ANSI_FUNC(highlight_magenta, HIGHLIGHT_MAGENTA); DEFINE_ANSI_FUNC(normal, NORMAL); +DEFINE_ANSI_FUNC(grey, GREY); DEFINE_ANSI_FUNC_UNDERLINE(underline, UNDERLINE, NORMAL); DEFINE_ANSI_FUNC_UNDERLINE(highlight_underline, HIGHLIGHT_UNDERLINE, HIGHLIGHT); @@ -151,14 +156,5 @@ int open_terminal_in_namespace(pid_t pid, const char *name, int mode); int vt_default_utf8(void); int vt_reset_keyboard(int fd); - -int terminal_urlify(const char *url, const char *text, char **ret); -int terminal_urlify_path(const char *path, const char *text, char **ret); - -typedef enum CatFlags { - CAT_FLAGS_MAIN_FILE_OPTIONAL = 1 << 0, -} CatFlags; - -int cat_files(const char *file, char **dropins, CatFlags flags); - -void print_separator(void); +int vt_restore(int fd); +int vt_release(int fd, bool restore_vt); |