File:  [MW Coherent from dump] / coherent / b / lib / libc / gen / ttyslot.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:35 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * libc/gen/ttyslot.c
 * Coherent I/O Library.
 * Return the index of the entry in the /etc/ttys file for this process.
 * Slot 0 is returned on error.
 * [Note: the controlling terminal of the process
 * is taken to be stderr].
 * We use _ttyslot which returns -1 on error
 * for the benefit of ttyname().
 */

int	_ttyslot();		/* in libc/gen/ttyname.c */

int
ttyslot()
{
	register int slot;

	if ((slot = _ttyslot(2)) < 0)
		++slot;
	return slot;
}

/* end of libc/gen/ttyslot.c */

unix.superglobalmegacorp.com

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