summaryrefslogtreecommitdiffstats
path: root/usr.bin/col/col.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/col/col.c')
-rw-r--r--usr.bin/col/col.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c
index c620bcb..13df126 100644
--- a/usr.bin/col/col.c
+++ b/usr.bin/col/col.c
@@ -205,12 +205,23 @@ main(int argc, char **argv)
continue;
case ESC: /* just ignore EOF */
switch(getwchar()) {
+ /*
+ * In the input stream, accept both the
+ * XPG5 sequences ESC-digit and the
+ * traditional BSD sequences ESC-ctrl.
+ */
+ case '\007':
+ /* FALLTHROUGH */
case RLF:
addto_lineno(&cur_line, -2);
break;
+ case '\010':
+ /* FALLTHROUGH */
case RHLF:
addto_lineno(&cur_line, -1);
break;
+ case '\011':
+ /* FALLTHROUGH */
case FHLF:
addto_lineno(&cur_line, 1);
if (cur_line > max_line)
OpenPOWER on IntegriCloud