Lines Matching refs:ip

105 ksearch(char ***argvp, struct info *ip)
112 ip->off = 1;
115 ip->off = 0;
121 if (!(kp->flags & F_OFFOK) && ip->off) {
125 if (kp->flags & F_NEEDARG && !(ip->arg = *++*argvp)) {
129 kp->f(ip);
134 f_all(struct info *ip)
136 print(&ip->t, &ip->win, ip->ldisc, BSD);
140 f_cbreak(struct info *ip)
143 if (ip->off)
144 f_sane(ip);
146 ip->t.c_iflag |= BRKINT|IXON|IMAXBEL;
147 ip->t.c_oflag |= OPOST;
148 ip->t.c_lflag |= ISIG|IEXTEN;
149 ip->t.c_lflag &= ~ICANON;
150 ip->set = 1;
155 f_columns(struct info *ip)
158 ip->win.ws_col = atoi(ip->arg);
159 ip->wset = 1;
163 f_dec(struct info *ip)
166 ip->t.c_cc[VERASE] = (u_char)0177;
167 ip->t.c_cc[VKILL] = CTRL('u');
168 ip->t.c_cc[VINTR] = CTRL('c');
169 ip->t.c_lflag &= ~ECHOPRT;
170 ip->t.c_lflag |= ECHOE|ECHOKE|ECHOCTL;
171 ip->t.c_iflag &= ~IXANY;
172 ip->set = 1;
176 f_ek(struct info *ip)
179 ip->t.c_cc[VERASE] = CERASE;
180 ip->t.c_cc[VKILL] = CKILL;
181 ip->set = 1;
185 f_everything(struct info *ip)
188 print(&ip->t, &ip->win, ip->ldisc, BSD);
192 f_extproc(struct info *ip)
195 if (ip->off) {
197 (void)ioctl(ip->fd, TIOCEXT, &tmp);
200 (void)ioctl(ip->fd, TIOCEXT, &tmp);
205 f_ispeed(struct info *ip)
208 cfsetispeed(&ip->t, (speed_t)atoi(ip->arg));
209 ip->set = 1;
213 f_nl(struct info *ip)
216 if (ip->off) {
217 ip->t.c_iflag |= ICRNL;
218 ip->t.c_oflag |= ONLCR;
220 ip->t.c_iflag &= ~ICRNL;
221 ip->t.c_oflag &= ~ONLCR;
223 ip->set = 1;
227 f_ospeed(struct info *ip)
230 cfsetospeed(&ip->t, (speed_t)atoi(ip->arg));
231 ip->set = 1;
235 f_raw(struct info *ip)
238 if (ip->off)
239 f_sane(ip);
241 cfmakeraw(&ip->t);
242 ip->t.c_cflag &= ~(CSIZE|PARENB);
243 ip->t.c_cflag |= CS8;
244 ip->set = 1;
249 f_rows(struct info *ip)
252 ip->win.ws_row = atoi(ip->arg);
253 ip->wset = 1;
257 f_sane(struct info *ip)
262 ip->t.c_cflag = def.c_cflag | (ip->t.c_cflag & CLOCAL);
263 ip->t.c_iflag = def.c_iflag;
266 ip->t.c_lflag = def.c_lflag | (ip->t.c_lflag & LKEEP);
267 ip->t.c_oflag = def.c_oflag;
268 ip->set = 1;
272 f_size(struct info *ip)
275 (void)printf("%d %d\n", ip->win.ws_row, ip->win.ws_col);
279 f_speed(struct info *ip)
282 (void)printf("%lu\n", (u_long)cfgetospeed(&ip->t));
286 f_tty(struct info *ip)
291 if (ioctl(ip->fd, TIOCSETD, &tmp) < 0)