aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-05-01 17:18:07 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-05-01 17:18:07 +0000
commitf6240da93cb925b69bad68f1d9750fecd8a4b555 (patch)
treeb0a867c25ec29f74b61f4b1f046b18e8ae064faa /usr.bin
parent041392bc2962c81c8cf7012113f092587b9825ca (diff)
downloadsrc-f6240da93cb925b69bad68f1d9750fecd8a4b555.tar.gz
src-f6240da93cb925b69bad68f1d9750fecd8a4b555.zip
col: fixing 25 year old bug
Makes col(1) respect POSIX again for escape sequences as decribed in its manpage The bug was introduced in CSRG in 1990 This also reverts r280911 Differential Revision: https://reviews.freebsd.org/D2424 Reviewed by: jhb MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=282305
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/col/col.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c
index e811a5247c6c..511188a89ffe 100644
--- a/usr.bin/col/col.c
+++ b/usr.bin/col/col.c
@@ -63,9 +63,9 @@ __FBSDID("$FreeBSD$");
#define SI '\017' /* shift in to normal character set */
#define SO '\016' /* shift out to alternate character set */
#define VT '\013' /* vertical tab (aka reverse line feed) */
-#define RLF '\007' /* ESC-07 reverse line feed */
-#define RHLF '\010' /* ESC-010 reverse half-line feed */
-#define FHLF '\011' /* ESC-011 forward half-line feed */
+#define RLF '7' /* ESC-7 reverse line feed */
+#define RHLF '8' /* ESC-8 reverse half-line feed */
+#define FHLF '9' /* ESC-9 forward half-line feed */
/* build up at least this many lines before flushing them out */
#define BUFFER_MARGIN 32
@@ -378,7 +378,7 @@ flush_blanks(void)
PUTC('\n');
if (half) {
PUTC('\033');
- PUTC('\011');
+ PUTC('9');
if (!nb)
PUTC('\r');
}