Lines Matching refs:tty
56 getttynam(const char *tty)
60 if (strncmp(tty, "/dev/", 5) == 0)
61 tty += 5;
64 if (!strcmp(tty, t->ty_name))
103 static struct ttyent tty;
135 tty.ty_name = p;
136 tty.ty_status = 0;
137 tty.ty_window = NULL;
138 tty.ty_group = _TTYS_NOGROUP;
141 if (!*(tty.ty_getty = p))
142 tty.ty_getty = tty.ty_type = NULL;
145 if (!*(tty.ty_type = p))
146 tty.ty_type = NULL;
150 tty.ty_status |= TTY_DIALUP;
152 tty.ty_status |= TTY_NETWORK;
159 tty.ty_status &= ~TTY_ON;
161 tty.ty_status |= TTY_ON;
163 tty.ty_status |= auto_tty_status(tty.ty_name);
165 tty.ty_status |= TTY_SECURE;
167 tty.ty_status &= ~TTY_SECURE;
169 tty.ty_status |= TTY_DIALUP;
171 tty.ty_status |= TTY_NETWORK;
173 tty.ty_window = value(p);
175 tty.ty_group = value(p);
183 tty.ty_comment = p;
185 tty.ty_comment = 0;
188 return (&tty);
272 isttystat(const char *tty, int flag)
276 return ((t = getttynam(tty)) == NULL) ? 0 : !!(t->ty_status & flag);
281 isdialuptty(const char *tty)
284 return isttystat(tty, TTY_DIALUP);
288 isnettty(const char *tty)
291 return isttystat(tty, TTY_NETWORK);