Annotation of researchv10dc/630/man/src/p_man/man3/rcvchar.3r, revision 1.1.1.1

1.1       root        1: .ds ZZ DEVELOPMENT PACKAGE
                      2: .TH RCVCHAR 3R "630 MTG"
                      3: .XE "rcvchar()"
                      4: .SH NAME
                      5: rcvchar \- receive character from host
                      6: .SH SYNOPSIS
                      7: .ft B
                      8: int rcvchar ( )
                      9: .SH DESCRIPTION
                     10: The
                     11: .I rcvchar
                     12: function
                     13: returns the next character received from the host.
                     14: If there are no characters available,
                     15: .I rcvchar
                     16: returns -1.
                     17: .PP
                     18: Since local programs have no host connection, a call to
                     19: .I rcvchar
                     20: by a local program will always return -1.
                     21: .SH EXAMPLE
                     22: The following program is a very simple terminal emulator.
                     23: .PP
                     24: .RS 3
                     25: .nf
                     26: .ft CM
                     27: #include <dmd.h>
                     28: 
                     29: main()
                     30: {
                     31:        int c;
                     32: 
                     33:        request(RCV);
                     34:        for(;;) {
                     35:                wait(RCV);
                     36:                while( (c=rcvchar()) != -1 )
                     37:                        lputchar(c);
                     38:        }
                     39: }
                     40: \fR
                     41: .fi
                     42: .RE
                     43: .SH SEE ALSO
                     44: local(3R), resources(3R), sendchar(3R).

unix.superglobalmegacorp.com

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