Annotation of researchv10no/ncurses/screen/def_shell.c, revision 1.1

1.1     ! root        1: /*     @(#) def_shell.c: 1.1 10/15/83  (1.36   3/18/83)        */
        !             2: 
        !             3: #include "curses.h"
        !             4: #include "term.h"
        !             5: 
        !             6: extern struct term *cur_term;
        !             7: 
        !             8: 
        !             9: /*
        !            10:  * Getting the baud rate is different on the two systems.
        !            11:  * In either case, a baud rate of 0 hangs up the phone.
        !            12:  * Since things are often initialized to 0, getting the phone
        !            13:  * hung up on you is a common result of a bug in your program.
        !            14:  * This is not very friendly, so if the baud rate is 0, we
        !            15:  * assume we're doing a reset_xx_mode with no def_xx_mode, and
        !            16:  * just don't do anything.
        !            17:  */
        !            18: #ifdef USG
        !            19: #define BR(x) (cur_term->x.c_cflag&CBAUD)
        !            20: #else
        !            21: #define BR(x) (cur_term->x.sg_ispeed)
        !            22: #endif
        !            23: 
        !            24: def_shell_mode()
        !            25: {
        !            26: #ifdef USG
        !            27:        ioctl(cur_term -> Filedes, TCGETA, &(cur_term->Ottyb));
        !            28: #else
        !            29:        ioctl(cur_term -> Filedes, TIOCGETP, &(cur_term->Ottyb));
        !            30: #endif
        !            31:        /* This is a useful default for Nttyb, too */
        !            32:        if (BR(Nttyb) == 0)
        !            33:                cur_term -> Nttyb = cur_term -> Ottyb;
        !            34: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.