xref: /titanic_50/usr/src/lib/libbc/libc/gen/common/getttynam.c (revision abc79d9dd51e98eafb6fc25b4a0b4f66bef40b00)
1 #pragma ident	"%Z%%M%	%I%	%E% SMI"
2 	  /* from UCB 5.2 3/9/86 */
3 /*
4  * Copyright (c) 1983 Regents of the University of California.
5  * All rights reserved.  The Berkeley software License Agreement
6  * specifies the terms and conditions for redistribution.
7  */
8 
9 #include <ttyent.h>
10 
11 struct ttyent *
12 getttynam(tty)
13 	char *tty;
14 {
15 	register struct ttyent *t;
16 
17 	setttyent();
18 	while (t = getttyent()) {
19 		if (strcmp(tty, t->ty_name) == 0)
20 			break;
21 	}
22 	endttyent();
23 	return (t);
24 }
25