Home | History | Annotate | Download | only in stty

Lines Matching refs:ip

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