File:  [Research Unix] / researchv10dc / 630 / man / src / p_man / man3 / rcvchar.3r
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.ds ZZ DEVELOPMENT PACKAGE
.TH RCVCHAR 3R "630 MTG"
.XE "rcvchar()"
.SH NAME
rcvchar \- receive character from host
.SH SYNOPSIS
.ft B
int rcvchar ( )
.SH DESCRIPTION
The
.I rcvchar
function
returns the next character received from the host.
If there are no characters available,
.I rcvchar
returns -1.
.PP
Since local programs have no host connection, a call to
.I rcvchar
by a local program will always return -1.
.SH EXAMPLE
The following program is a very simple terminal emulator.
.PP
.RS 3
.nf
.ft CM
#include <dmd.h>

main()
{
	int c;

	request(RCV);
	for(;;) {
		wait(RCV);
		while( (c=rcvchar()) != -1 )
			lputchar(c);
	}
}
\fR
.fi
.RE
.SH SEE ALSO
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.