Lines Matching refs:ip
119 ksearch(char ***argvp, struct info *ip) in ksearch() argument
126 ip->off = 1; in ksearch()
129 ip->off = 0; in ksearch()
135 if (!(kp->flags & F_OFFOK) && ip->off) { in ksearch()
139 if (kp->flags & F_NEEDARG && !(ip->arg = *++*argvp)) { in ksearch()
143 kp->f(ip); in ksearch()
148 f_all(struct info *ip) in f_all() argument
150 print(&ip->t, &ip->win, ip->queue, ip->ldisc, STTY_BSD); in f_all()
154 f_cbreak(struct info *ip) in f_cbreak() argument
156 if (ip->off) in f_cbreak()
157 f_sane(ip); in f_cbreak()
159 ip->t.c_iflag |= BRKINT|IXON|IMAXBEL; in f_cbreak()
160 ip->t.c_oflag |= OPOST; in f_cbreak()
161 ip->t.c_lflag |= ISIG|IEXTEN; in f_cbreak()
162 ip->t.c_lflag &= ~ICANON; in f_cbreak()
163 ip->set = 1; in f_cbreak()
168 f_columns(struct info *ip) in f_columns() argument
170 ip->win.ws_col = atoi(ip->arg); in f_columns()
171 ip->wset = 1; in f_columns()
175 f_dec(struct info *ip) in f_dec() argument
177 ip->t.c_cc[VERASE] = (u_char)0177; in f_dec()
178 ip->t.c_cc[VKILL] = CTRL('u'); in f_dec()
179 ip->t.c_cc[VINTR] = CTRL('c'); in f_dec()
180 ip->t.c_lflag &= ~ECHOPRT; in f_dec()
181 ip->t.c_lflag |= ECHOE|ECHOKE|ECHOCTL; in f_dec()
182 ip->t.c_iflag &= ~IXANY; in f_dec()
183 ip->set = 1; in f_dec()
187 f_everything(struct info *ip) in f_everything() argument
189 print(&ip->t, &ip->win, ip->queue, ip->ldisc, STTY_BSD); in f_everything()
193 f_extproc(struct info *ip) in f_extproc() argument
196 if (ip->off) { in f_extproc()
198 (void)ioctl(ip->fd, TIOCEXT, &tmp); in f_extproc()
201 (void)ioctl(ip->fd, TIOCEXT, &tmp); in f_extproc()
203 ip->set = 1; in f_extproc()
208 f_insane(struct info *ip) in f_insane() argument
214 r = read(f, &(ip->t), sizeof(struct termios)); in f_insane()
221 ip->t.c_iflag = random(); in f_insane()
222 ip->t.c_oflag = random(); in f_insane()
223 ip->t.c_cflag = random(); in f_insane()
224 ip->t.c_lflag = random(); in f_insane()
226 ip->t.c_cc[f] = random() & 0xFF; in f_insane()
228 ip->t.c_ispeed = random(); in f_insane()
229 ip->t.c_ospeed = random(); in f_insane()
232 ip->set = 1; in f_insane()
236 f_ispeed(struct info *ip) in f_ispeed() argument
238 cfsetispeed(&ip->t, atoi(ip->arg)); in f_ispeed()
239 ip->set = 1; in f_ispeed()
243 f_nl(struct info *ip) in f_nl() argument
245 if (ip->off) { in f_nl()
246 ip->t.c_iflag |= ICRNL; in f_nl()
247 ip->t.c_oflag |= ONLCR; in f_nl()
249 ip->t.c_iflag &= ~ICRNL; in f_nl()
250 ip->t.c_oflag &= ~ONLCR; in f_nl()
252 ip->set = 1; in f_nl()
256 f_ospeed(struct info *ip) in f_ospeed() argument
258 cfsetospeed(&ip->t, atoi(ip->arg)); in f_ospeed()
259 ip->set = 1; in f_ospeed()
263 f_raw(struct info *ip) in f_raw() argument
265 if (ip->off) in f_raw()
266 f_sane(ip); in f_raw()
268 cfmakeraw(&ip->t); in f_raw()
269 ip->t.c_cflag &= ~(CSIZE|PARENB); in f_raw()
270 ip->t.c_cflag |= CS8; in f_raw()
271 ip->set = 1; in f_raw()
276 f_rows(struct info *ip) in f_rows() argument
278 ip->win.ws_row = atoi(ip->arg); in f_rows()
279 ip->wset = 1; in f_rows()
283 f_sane(struct info *ip) in f_sane() argument
285 ip->t.c_cflag = TTYDEF_CFLAG | (ip->t.c_cflag & (CLOCAL|CRTSCTS|CDTRCTS)); in f_sane()
286 ip->t.c_iflag = TTYDEF_IFLAG; in f_sane()
287 ip->t.c_iflag |= ICRNL; in f_sane()
290 ip->t.c_lflag = TTYDEF_LFLAG | (ip->t.c_lflag & LKEEP); in f_sane()
291 ip->t.c_oflag = TTYDEF_OFLAG; in f_sane()
292 ip->set = 1; in f_sane()
296 f_size(struct info *ip) in f_size() argument
298 (void)printf("%d %d\n", ip->win.ws_row, ip->win.ws_col); in f_size()
302 f_speed(struct info *ip) in f_speed() argument
304 (void)printf("%d\n", cfgetospeed(&ip->t)); in f_speed()
309 f_tty(struct info *ip) in f_tty() argument
321 f_ostart(struct info *ip) in f_ostart() argument
328 f_ostop(struct info *ip) in f_ostop() argument