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