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
This commit is contained in:
parent
7e7a9efe9b
commit
0bd4fbdf68
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user