diff options
author | assar <assar@FreeBSD.org> | 2001-03-04 06:04:50 +0000 |
---|---|---|
committer | assar <assar@FreeBSD.org> | 2001-03-04 06:04:50 +0000 |
commit | c78c138f0f1e0db42115c306e06a6c59f6d5b4bc (patch) | |
tree | a8c2687c4b1bd822502b1894633d12e6b935cec7 /bin/stty | |
parent | 35583224c700ea795d0000e00b57a46e7f96d2fb (diff) | |
download | FreeBSD-src-c78c138f0f1e0db42115c306e06a6c59f6d5b4bc.zip FreeBSD-src-c78c138f0f1e0db42115c306e06a6c59f6d5b4bc.tar.gz |
implement OCRNL, ONOCR, and ONLRET
Obtained from: NetBSD
Diffstat (limited to 'bin/stty')
-rw-r--r-- | bin/stty/modes.c | 6 | ||||
-rw-r--r-- | bin/stty/print.c | 3 | ||||
-rw-r--r-- | bin/stty/stty.1 | 10 |
3 files changed, 19 insertions, 0 deletions
diff --git a/bin/stty/modes.c b/bin/stty/modes.c index b1f333e..f724a537 100644 --- a/bin/stty/modes.c +++ b/bin/stty/modes.c @@ -191,10 +191,16 @@ struct modes omodes[] = { { "-litout", OPOST, 0 }, { "onlcr", ONLCR, 0 }, { "-onlcr", 0, ONLCR }, + { "ocrnl", OCRNL, 0 }, + { "-ocrnl", 0, OCRNL }, { "tabs", 0, OXTABS }, /* "preserve" tabs */ { "-tabs", OXTABS, 0 }, { "oxtabs", OXTABS, 0 }, { "-oxtabs", 0, OXTABS }, + { "onocr", ONOCR, 0 }, + { "-onocr", 0, ONOCR }, + { "onlret", ONLRET, 0 }, + { "-onlret", 0, ONLRET }, { NULL }, }; diff --git a/bin/stty/print.c b/bin/stty/print.c index a0149c2..364b95b 100644 --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -148,7 +148,10 @@ print(tp, wp, ldisc, fmt) binit("oflags"); put("-opost", OPOST, 1); put("-onlcr", ONLCR, 1); + put("-ocrnl", OCRNL, 0); put("-oxtabs", OXTABS, 1); + put("-onocr", OXTABS, 0); + put("-onlret", OXTABS, 0); /* control flags (hardware state) */ tmp = tp->c_cflag; diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index bf0bcf6..3720fbd 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -237,8 +237,18 @@ Map (do not map) to .Dv CR-NL on output. +.It Cm ocrnl Pq Fl ocrnl +Map (do not map) +.Dv CR +to +.Dv NL +on output. .It Cm oxtabs Pq Fl oxtabs Expand (do not expand) tabs to spaces on output. +.It Cm onocr Pq Fl onocr +Do not (do) output CRs at column zero. +.It Cm onlret Pq Fl onlret +On the terminal NL performs (does not perform) the CR function. .El .Ss Local Modes: .Pp |