t9term: add -c to force cooked mode - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 670f730113743ef6ba4e093c56b812b6e4801314
 (DIR) parent 9fb7a4f7f7b78476d496cac2b83f9006acd7f483
 (HTM) Author: David Swasey <david.swasey@gmail.com>
       Date:   Wed, 19 May 2010 18:27:05 -0700
       
       9term: add -c to force cooked mode
       
       R=rsc
       CC=codebot
       http://codereview.appspot.com/1044043
       
       Diffstat:
         M man/man1/9term.1                    |       9 +++++++--
         M src/cmd/9term/9term.c               |       5 ++++-
       
       2 files changed, 11 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/man/man1/9term.1 b/man/man1/9term.1
       t@@ -4,7 +4,7 @@
        .SH SYNOPSIS
        .B 9term
        [
       -.B -as
       +.B -asc
        ]
        [
        .B -f
       t@@ -30,10 +30,15 @@ Otherwise button 2 brings up a menu, described below.
        .PP
        The
        .B -s
       -option initializes windows so that text scrolls;
       +option initializes the window so that text scrolls;
        the default is not to scroll.
        .PP
        The
       +.B -c
       +option starts the window in forced cooked mode,
       +described below.
       +.PP
       +The
        .I font
        argument to 
        .B -f
 (DIR) diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
       t@@ -38,6 +38,7 @@ void resizethread(void*);
        void        servedevtext(void);
        
        int errorshouldabort = 0;
       +int cooked;
        
        void
        usage(void)
       t@@ -69,6 +70,9 @@ threadmain(int argc, char *argv[])
                case 's':
                        scrolling = TRUE;
                        break;
       +        case 'c':
       +                cooked = TRUE;
       +                break;
                case 'w':        /* started from rio or 9wm */
                        use9wm = TRUE;
                        break;
       t@@ -277,7 +281,6 @@ new(Image *i, int hideit, int scrollit, int pid, char *dir, char *cmd, char **ar
        /*
         * Button 2 menu.  Extra entry for always cook
         */
       -int cooked;
        
        enum
        {