1*21344Sdist /* 2*21344Sdist * Copyright (c) 1983 Regents of the University of California. 3*21344Sdist * All rights reserved. The Berkeley software License Agreement 4*21344Sdist * specifies the terms and conditions for redistribution. 5*21344Sdist */ 616421Sralph 7*21344Sdist #ifndef lint 8*21344Sdist static char sccsid[] = "@(#)getttynam.c 5.1 (Berkeley) 05/30/85"; 9*21344Sdist #endif not lint 10*21344Sdist 1116421Sralph #include <ttyent.h> 1216421Sralph 1316421Sralph struct ttyent * 1416421Sralph getttynam(tty) 1516421Sralph char *tty; 1616421Sralph { 1716421Sralph register struct ttyent *t; 1816421Sralph 1916421Sralph setttyent(); 2016421Sralph while (t = getttyent()) { 2116421Sralph if (strcmp(tty, t->ty_name) == 0) 2216421Sralph break; 2316421Sralph } 2416421Sralph endttyent(); 2516421Sralph return (t); 2616421Sralph } 27