Annotation of researchv10dc/630/man/src/p_man/man3/kbdchar.3r, revision 1.1

1.1     ! root        1: .ds ZZ DEVELOPMENT PACKAGE
        !             2: .TH KBDCHAR 3R "630 MTG"
        !             3: .XE "kbdchar()"
        !             4: .SH NAME
        !             5: kbdchar \- read character from keyboard
        !             6: .SH SYNOPSIS
        !             7: \fB
        !             8: int kbdchar ( )
        !             9: \fR
        !            10: .SH DESCRIPTION
        !            11: The
        !            12: .I kbdchar
        !            13: function
        !            14: returns the next keyboard character typed to the process.
        !            15: If no characters have been typed,
        !            16: .I kbdchar
        !            17: returns \-1.
        !            18: If
        !            19: .I \s-1KBD\s+1
        !            20: has not been
        !            21: requested,
        !            22: .I kbdchar
        !            23: will always return \-1,
        !            24: even if characters have been typed to the process.
        !            25: .SH EXAMPLE
        !            26: This code will prevent a program from exiting until the 'q' character
        !            27: has been typed on the keyboard.
        !            28: .PP
        !            29: .RS 3
        !            30: .ft CM
        !            31: .nf
        !            32: #include <dmd.h>
        !            33: 
        !            34: main( )
        !            35: {
        !            36:      request (KBD);
        !            37: 
        !            38:      .
        !            39:      .
        !            40:      .
        !            41: 
        !            42:      do
        !            43:           wait(KBD);
        !            44:      while( kbdchar ( ) != 'q' );
        !            45: }
        !            46: .fi
        !            47: .RE
        !            48: .ft R
        !            49: .SH SEE ALSO
        !            50: resources(3R).
        !            51: .SH WARNING
        !            52: Since the keyboard routine is a process, you must release the
        !            53: CPU in order to have typed characters placed on the
        !            54: application's keyboard queue.

unix.superglobalmegacorp.com

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