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

1.1     ! root        1: #include "curses.ext"
        !             2: /*     @(#) flushinp.c: 1.1 10/15/83   (1.19   3/17/83)        */
        !             3: 
        !             4: flushinp()
        !             5: {
        !             6: #ifdef DEBUG
        !             7:        if(outf) fprintf(outf, "flushinp(), file %x, SP %x\n", SP->term_file, SP);
        !             8: #endif
        !             9: #ifdef USG
        !            10:        ioctl(cur_term -> Filedes, TCFLSH, 0);
        !            11: #else
        !            12:        /* for insurance against someone using their own buffer: */
        !            13:        ioctl(cur_term -> Filedes, TIOCGETP, &(cur_term->Nttyb));
        !            14: 
        !            15:        /*
        !            16:         * SETP waits on output and flushes input as side effect.
        !            17:         * Really want an ioctl like TCFLSH but Berkeley doesn't have one.
        !            18:         */
        !            19:        ioctl(cur_term -> Filedes, TIOCSETP, &(cur_term->Nttyb));
        !            20: #endif
        !            21:        /*
        !            22:         * Have to doupdate() because, if we've stopped output due to
        !            23:         * typeahead, now that typeahead is gone, so we'd better catch up.
        !            24:         */
        !            25:        doupdate();
        !            26: }

unix.superglobalmegacorp.com

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