From owner-p4-projects@FreeBSD.ORG Sat Aug 23 10:46:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 61781106568D; Sat, 23 Aug 2008 10:46:37 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24E211065687 for ; Sat, 23 Aug 2008 10:46:37 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE0A8FC08 for ; Sat, 23 Aug 2008 10:46:37 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7NAkaLD070574 for ; Sat, 23 Aug 2008 10:46:36 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7NAkaLZ070572 for perforce@freebsd.org; Sat, 23 Aug 2008 10:46:36 GMT (envelope-from ed@FreeBSD.org) Date: Sat, 23 Aug 2008 10:46:36 GMT Message-Id: <200808231046.m7NAkaLZ070572@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ed@FreeBSD.org using -f From: Ed Schouten To: Perforce Change Reviews Cc: Subject: PERFORCE change 148167 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 10:46:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=148167 Change 148167 by ed@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 .