2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
10 /* this routine returns the file name within "/dev" */
11 /* corresponding to the internal tty #, which */
12 /* is in turn used by ttynum and getwho */
13 /* this routine is obviously very system dependent. */
15 /* ttyname is set up so that, in conjunction */
16 /* with getwho, the following simple "who" program will work: */
17 /* for (i = 0; ttnam = ttyname(i); i++) */
18 /* if (luid = getwho(i)) printf("%s %s\n",ttnam,getlogn(luid)); */
20 /* also, ttynum(ttyname(n)) should equal n if 0 <= n <= 31 */
26 if (num
< 0 || num
> 31) return(NULSTR
);
27 if (num
== 0) return("tty8");
29 tty
[3] = num
+ ('0' - 1);
32 tty
[3] = num
- ('a' - 9);