summaryrefslogtreecommitdiffstats
path: root/usr.bin/col
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-05-01 17:18:07 +0000
committerbapt <bapt@FreeBSD.org>2015-05-01 17:18:07 +0000
commit0bd4fbdf68d8aaee2bb1b80549b9193ea19ea070 (patch)
treeb0a867c25ec29f74b61f4b1f046b18e8ae064faa /usr.bin/col
parent7e7a9efe9b70fe833697cc83edf6430529b87303 (diff)
downloadFreeBSD-src-0bd4fbdf68d8aaee2bb1b80549b9193ea19ea070.zip
FreeBSD-src-0bd4fbdf68d8aaee2bb1b80549b9193ea19ea070.tar.gz
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
Diffstat (limited to 'usr.bin/col')
-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 e811a52..511188a 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');
}
OpenPOWER on IntegriCloud