1 /* @(#)getttynam.c 4.1 (Berkeley) 04/27/84 */ 2 3 #include <ttyent.h> 4 5 struct ttyent * 6 getttynam(tty) 7 char *tty; 8 { 9 register struct ttyent *t; 10 11 setttyent(); 12 while (t = getttyent()) { 13 if (strcmp(tty, t->ty_name) == 0) 14 break; 15 } 16 endttyent(); 17 return (t); 18 } 19