PERFORCE change 148167 for review
Ed Schouten
ed at FreeBSD.org
Sat Aug 23 10:46:37 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=148167
Change 148167 by ed at ed_dull on 2008/08/23 10:46:35
Make stty(1) use somewhat POSIX tab0/tab3 switches instead of oxtabs.
Affected files ...
.. //depot/projects/mpsafetty/bin/stty/modes.c#2 edit
.. //depot/projects/mpsafetty/bin/stty/print.c#3 edit
.. //depot/projects/mpsafetty/bin/stty/stty.1#2 edit
Differences ...
==== //depot/projects/mpsafetty/bin/stty/modes.c#2 (text+ko) ====
@@ -191,10 +191,12 @@
{ "-onlcr", 0, ONLCR },
{ "ocrnl", OCRNL, 0 },
{ "-ocrnl", 0, OCRNL },
- { "tabs", 0, OXTABS }, /* "preserve" tabs */
- { "-tabs", OXTABS, 0 },
- { "oxtabs", OXTABS, 0 },
- { "-oxtabs", 0, OXTABS },
+ { "tabs", TAB0, TABDLY }, /* "preserve" tabs */
+ { "-tabs", TAB3, TABDLY },
+ { "oxtabs", TAB3, TABDLY },
+ { "-oxtabs", TAB0, TABDLY },
+ { "tab0", TAB0, TABDLY },
+ { "tab3", TAB3, TABDLY },
{ "onocr", ONOCR, 0 },
{ "-onocr", 0, ONOCR },
{ "onlret", ONLRET, 0 },
==== //depot/projects/mpsafetty/bin/stty/print.c#3 (text+ko) ====
@@ -136,7 +136,14 @@
put("-opost", OPOST, 1);
put("-onlcr", ONLCR, 1);
put("-ocrnl", OCRNL, 0);
- put("-oxtabs", OXTABS, 1);
+ switch(tmp&TABDLY) {
+ case TAB0:
+ bput("tab0");
+ break;
+ case TAB3:
+ bput("tab3");
+ break;
+ }
put("-onocr", ONOCR, 0);
put("-onlret", ONLRET, 0);
==== //depot/projects/mpsafetty/bin/stty/stty.1#2 (text+ko) ====
@@ -244,8 +244,12 @@
to
.Dv NL
on output.
-.It Cm oxtabs Pq Fl oxtabs
-Expand (do not expand) tabs to spaces on output.
+.It Cm tab0 tab3
+Select tab expansion policy.
+.Cm tab0
+disabled tab expansion, while
+.Cm tab3
+enables it.
.It Cm onocr Pq Fl onocr
Do not (do) output CRs at column zero.
.It Cm onlret Pq Fl onlret
@@ -570,6 +574,8 @@
.It Cm litout Pq Fl litout
The converse of
.Cm opost .
+.It Cm oxtabs Pq Fl oxtabs
+Expand (do not expand) tabs to spaces on output.
.It Cm tabs Pq Fl tabs
The converse of
.Cm oxtabs .
More information about the p4-projects
mailing list