Lines Matching refs:tty
53 getttynam(const char *tty)
57 if (strncmp(tty, "/dev/", 5) == 0)
58 tty += 5;
61 if (!strcmp(tty, t->ty_name))
121 static struct ttyent tty;
153 tty.ty_name = p;
154 tty.ty_status = 0;
155 tty.ty_window = NULL;
156 tty.ty_group = _TTYS_NOGROUP;
159 if (!*(tty.ty_getty = p))
160 tty.ty_getty = tty.ty_type = NULL;
163 if (!*(tty.ty_type = p))
164 tty.ty_type = NULL;
168 tty.ty_status |= TTY_DIALUP;
170 tty.ty_status |= TTY_NETWORK;
177 tty.ty_status &= ~TTY_ON;
179 tty.ty_status |= TTY_ON;
181 tty.ty_status |= auto_tty_status(tty.ty_name);
183 tty.ty_status |= auto_exists_status(tty.ty_name);
185 tty.ty_status |= TTY_SECURE;
187 tty.ty_status &= ~TTY_SECURE;
189 tty.ty_status |= TTY_DIALUP;
191 tty.ty_status |= TTY_NETWORK;
193 tty.ty_window = value(p);
195 tty.ty_group = value(p);
203 tty.ty_comment = p;
205 tty.ty_comment = 0;
208 return (&tty);
292 isttystat(const char *tty, int flag)
296 return ((t = getttynam(tty)) == NULL) ? 0 : !!(t->ty_status & flag);
301 isdialuptty(const char *tty)
304 return isttystat(tty, TTY_DIALUP);
308 isnettty(const char *tty)
311 return isttystat(tty, TTY_NETWORK);