Lines Matching refs:ip

109 ksearch(char ***argvp, struct info *ip)
116 ip->off = 1;
119 ip->off = 0;
125 if (!(kp->flags & F_OFFOK) && ip->off) {
129 if (kp->flags & F_NEEDARG && !(ip->arg = *++*argvp)) {
133 kp->f(ip);
138 f_all(struct info *ip)
140 print(&ip->t, &ip->win, ip->ldisc, BSD);
144 f_cbreak(struct info *ip)
147 if (ip->off)
148 f_sane(ip);
150 ip->t.c_iflag |= BRKINT|IXON|IMAXBEL;
151 ip->t.c_oflag |= OPOST;
152 ip->t.c_lflag |= ISIG|IEXTEN;
153 ip->t.c_lflag &= ~ICANON;
154 ip->set = 1;
159 f_columns(struct info *ip)
163 ip->win.ws_col = strtonum(ip->arg, 0, USHRT_MAX, &error);
165 err(1, "cols %s", ip->arg);
166 ip->wset = 1;
170 f_dec(struct info *ip)
173 ip->t.c_cc[VERASE] = (u_char)0177;
174 ip->t.c_cc[VKILL] = CTRL('u');
175 ip->t.c_cc[VINTR] = CTRL('c');
176 ip->t.c_lflag &= ~ECHOPRT;
177 ip->t.c_lflag |= ECHOE|ECHOKE|ECHOCTL;
178 ip->t.c_iflag &= ~IXANY;
179 ip->set = 1;
183 f_ek(struct info *ip)
186 ip->t.c_cc[VERASE] = CERASE;
187 ip->t.c_cc[VKILL] = CKILL;
188 ip->set = 1;
192 f_everything(struct info *ip)
195 print(&ip->t, &ip->win, ip->ldisc, BSD);
199 f_extproc(struct info *ip)
202 if (ip->off) {
204 (void)ioctl(ip->fd, TIOCEXT, &tmp);
207 (void)ioctl(ip->fd, TIOCEXT, &tmp);
209 ip->set = 1;
213 f_ispeed(struct info *ip)
218 speed = strtonum(ip->arg, 0, UINT_MAX, &errstr);
220 err(1, "ispeed %s", ip->arg);
221 cfsetispeed(&ip->t, speed);
222 ip->set = 1;
226 f_lcase(struct info *ip)
228 if (ip->off) {
229 ip->t.c_iflag &= ~IUCLC;
230 ip->t.c_oflag &= ~OLCUC;
231 ip->t.c_lflag &= ~XCASE;
233 ip->t.c_iflag |= IUCLC;
234 ip->t.c_oflag |= OLCUC;
235 ip->t.c_lflag |= XCASE;
237 ip->set = 1;
241 f_nl(struct info *ip)
244 if (ip->off) {
245 ip->t.c_iflag |= ICRNL;
246 ip->t.c_oflag |= ONLCR;
248 ip->t.c_iflag &= ~ICRNL;
249 ip->t.c_oflag &= ~ONLCR;
251 ip->set = 1;
255 f_ospeed(struct info *ip)
260 speed = strtonum(ip->arg, 0, UINT_MAX, &errstr);
262 err(1, "ospeed %s", ip->arg);
263 cfsetospeed(&ip->t, speed);
264 ip->set = 1;
268 f_raw(struct info *ip)
271 if (ip->off)
272 f_sane(ip);
274 cfmakeraw(&ip->t);
275 ip->t.c_cflag &= ~(CSIZE|PARENB);
276 ip->t.c_cflag |= CS8;
277 ip->set = 1;
282 f_rows(struct info *ip)
286 ip->win.ws_row = strtonum(ip->arg, 0, USHRT_MAX, &error);
288 err(1, "rows %s", ip->arg);
289 ip->wset = 1;
293 f_sane(struct info *ip)
296 ip->t.c_cflag = TTYDEF_CFLAG | (ip->t.c_cflag & (CLOCAL|CRTSCTS));
297 ip->t.c_iflag = TTYDEF_IFLAG;
298 ip->t.c_iflag |= ICRNL;
301 ip->t.c_lflag = TTYDEF_LFLAG | (ip->t.c_lflag & LKEEP);
302 ip->t.c_oflag = TTYDEF_OFLAG;
303 ip->set = 1;
307 f_size(struct info *ip)
310 (void)printf("%d %d\n", ip->win.ws_row, ip->win.ws_col);
314 f_speed(struct info *ip)
317 (void)printf("%d\n", cfgetospeed(&ip->t));
321 f_tty(struct info *ip)
326 if (ioctl(ip->fd, TIOCSETD, &tmp) == -1)
331 f_ostart(struct info *ip)
333 if (ioctl(ip->fd, TIOCSTART) == -1)
338 f_ostop(struct info *ip)
340 if (ioctl(ip->fd, TIOCSTOP) == -1)