Lines Matching refs:tty
57 getttynam(const char *tty)
61 if (strncmp(tty, "/dev/", 5) == 0)
62 tty += 5;
65 if (!strcmp(tty, t->ty_name))
125 static struct ttyent tty;
157 tty.ty_name = p;
158 tty.ty_status = 0;
159 tty.ty_window = NULL;
160 tty.ty_group = _TTYS_NOGROUP;
163 if (!*(tty.ty_getty = p))
164 tty.ty_getty = tty.ty_type = NULL;
167 if (!*(tty.ty_type = p))
168 tty.ty_type = NULL;
172 tty.ty_status |= TTY_DIALUP;
174 tty.ty_status |= TTY_NETWORK;
181 tty.ty_status &= ~TTY_ON;
183 tty.ty_status |= TTY_ON;
185 tty.ty_status |= auto_tty_status(tty.ty_name);
187 tty.ty_status |= auto_exists_status(tty.ty_name);
189 tty.ty_status |= TTY_SECURE;
191 tty.ty_status &= ~TTY_SECURE;
193 tty.ty_status |= TTY_DIALUP;
195 tty.ty_status |= TTY_NETWORK;
197 tty.ty_window = value(p);
199 tty.ty_group = value(p);
207 tty.ty_comment = p;
209 tty.ty_comment = 0;
212 return (&tty);
296 isttystat(const char *tty, int flag)
300 return ((t = getttynam(tty)) == NULL) ? 0 : !!(t->ty_status & flag);
305 isdialuptty(const char *tty)
308 return isttystat(tty, TTY_DIALUP);
312 isnettty(const char *tty)
315 return isttystat(tty, TTY_NETWORK);