diff options
author | nyan <nyan@FreeBSD.org> | 2005-05-15 07:41:38 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2005-05-15 07:41:38 +0000 |
commit | 4625befb2c72cf0a31b5187eab6dfb8104a07c12 (patch) | |
tree | 73ee0c7d0e81ef314242b6be65833a1072d31697 /usr.sbin/vidcontrol/vidcontrol.c | |
parent | 7a0957ff0adb017236a29a9de2800073bf73ae21 (diff) | |
download | FreeBSD-src-4625befb2c72cf0a31b5187eab6dfb8104a07c12.zip FreeBSD-src-4625befb2c72cf0a31b5187eab6dfb8104a07c12.tar.gz |
Use \e for escape char instead of ^[ directly.
Diffstat (limited to 'usr.sbin/vidcontrol/vidcontrol.c')
-rw-r--r-- | usr.sbin/vidcontrol/vidcontrol.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 6d183fe..9081751 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -439,12 +439,12 @@ set_normal_colors(int argc, char **argv, int *_index) if (*_index < argc && (color = get_color_number(argv[*_index])) != -1) { (*_index)++; - fprintf(stderr, "[=%dF", color); + fprintf(stderr, "\e[=%dF", color); if (*_index < argc && (color = get_color_number(argv[*_index])) != -1 && color < 8) { (*_index)++; - fprintf(stderr, "[=%dG", color); + fprintf(stderr, "\e[=%dG", color); } } } @@ -455,12 +455,12 @@ set_reverse_colors(int argc, char **argv, int *_index) int color; if ((color = get_color_number(argv[*(_index)-1])) != -1) { - fprintf(stderr, "[=%dH", color); + fprintf(stderr, "\e[=%dH", color); if (*_index < argc && (color = get_color_number(argv[*_index])) != -1 && color < 8) { (*_index)++; - fprintf(stderr, "[=%dI", color); + fprintf(stderr, "\e[=%dI", color); } } } @@ -488,7 +488,7 @@ set_border_color(char *arg) int color; if ((color = get_color_number(arg)) != -1) { - fprintf(stderr, "[=%dA", color); + fprintf(stderr, "\e[=%dA", color); } else usage(); @@ -655,15 +655,15 @@ test_frame(void) { int i; - fprintf(stdout, "[=0G\n\n"); + fprintf(stdout, "\e[=0G\n\n"); for (i=0; i<8; i++) { - fprintf(stdout, "[=15F[=0G %2d [=%dF%-16s" - "[=15F[=0G %2d [=%dF%-16s " - "[=15F %2d [=%dGBACKGROUND[=0G\n", + fprintf(stdout, "\e[=15F\e[=0G %2d \e[=%dF%-16s" + "\e[=15F\e[=0G %2d \e[=%dF%-16s " + "\e[=15F %2d \e[=%dGBACKGROUND\e[=0G\n", i, i, legal_colors[i], i+8, i+8, legal_colors[i+8], i, i); } - fprintf(stdout, "[=%dF[=%dG[=%dH[=%dI\n", + fprintf(stdout, "\e[=%dF\e[=%dG\e[=%dH\e[=%dI\n", info.mv_norm.fore, info.mv_norm.back, info.mv_rev.fore, info.mv_rev.back); } |