1993-03-21 12:45:37 +03:00
|
|
|
/*-
|
|
|
|
* Copyright (c) 1982, 1986, 1991 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by the University of
|
|
|
|
* California, Berkeley and its contributors.
|
|
|
|
* 4. Neither the name of the University nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
1993-05-18 22:18:40 +04:00
|
|
|
* from: @(#)tty_compat.c 7.10 (Berkeley) 5/9/91
|
1993-12-18 07:21:37 +03:00
|
|
|
* $Id: tty_compat.c,v 1.7 1993/12/18 04:22:09 mycroft Exp $
|
1993-03-21 12:45:37 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* mapping routines for old line discipline (yuck)
|
|
|
|
*/
|
|
|
|
#ifdef COMPAT_43
|
|
|
|
|
1993-12-18 07:21:37 +03:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <sys/tty.h>
|
|
|
|
#include <sys/termios.h>
|
|
|
|
#include <sys/proc.h>
|
|
|
|
#include <sys/file.h>
|
|
|
|
#include <sys/conf.h>
|
|
|
|
#include <sys/dkstat.h>
|
|
|
|
#include <sys/kernel.h>
|
|
|
|
#include <sys/syslog.h>
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
int ttydebug = 0;
|
|
|
|
|
|
|
|
static struct speedtab compatspeeds[] = {
|
1993-06-06 02:40:40 +04:00
|
|
|
#define MAX_SPEED 17
|
|
|
|
115200, 17,
|
|
|
|
57600, 16,
|
1993-03-21 12:45:37 +03:00
|
|
|
38400, 15,
|
|
|
|
19200, 14,
|
|
|
|
9600, 13,
|
|
|
|
4800, 12,
|
|
|
|
2400, 11,
|
|
|
|
1800, 10,
|
|
|
|
1200, 9,
|
|
|
|
600, 8,
|
|
|
|
300, 7,
|
|
|
|
200, 6,
|
|
|
|
150, 5,
|
|
|
|
134, 4,
|
|
|
|
110, 3,
|
|
|
|
75, 2,
|
|
|
|
50, 1,
|
|
|
|
0, 0,
|
|
|
|
-1, -1,
|
|
|
|
};
|
1993-06-06 02:40:40 +04:00
|
|
|
static int compatspcodes[] = {
|
1993-03-21 12:45:37 +03:00
|
|
|
0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
|
1993-06-06 02:40:40 +04:00
|
|
|
1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200
|
1993-03-21 12:45:37 +03:00
|
|
|
};
|
|
|
|
|
1993-06-27 10:01:27 +04:00
|
|
|
int ttcompatgetflags __P((struct tty *tp));
|
|
|
|
void ttcompatsetflags __P((struct tty *tp, struct termios *t));
|
|
|
|
void ttcompatsetlflags __P((struct tty *tp, struct termios *t));
|
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
/*ARGSUSED*/
|
1993-06-27 10:01:27 +04:00
|
|
|
int
|
1993-03-21 12:45:37 +03:00
|
|
|
ttcompat(tp, com, data, flag)
|
|
|
|
register struct tty *tp;
|
1993-06-27 10:01:27 +04:00
|
|
|
int com, flag;
|
1993-03-21 12:45:37 +03:00
|
|
|
caddr_t data;
|
|
|
|
{
|
|
|
|
|
|
|
|
switch (com) {
|
|
|
|
case TIOCGETP: {
|
|
|
|
register struct sgttyb *sg = (struct sgttyb *)data;
|
|
|
|
register u_char *cc = tp->t_cc;
|
|
|
|
register speed;
|
|
|
|
|
|
|
|
speed = ttspeedtab(tp->t_ospeed, compatspeeds);
|
1993-06-06 02:40:40 +04:00
|
|
|
sg->sg_ospeed = (speed == -1) ? MAX_SPEED : speed;
|
1993-03-21 12:45:37 +03:00
|
|
|
if (tp->t_ispeed == 0)
|
|
|
|
sg->sg_ispeed = sg->sg_ospeed;
|
|
|
|
else {
|
|
|
|
speed = ttspeedtab(tp->t_ispeed, compatspeeds);
|
1993-06-06 02:40:40 +04:00
|
|
|
sg->sg_ispeed = (speed == -1) ? MAX_SPEED : speed;
|
1993-03-21 12:45:37 +03:00
|
|
|
}
|
|
|
|
sg->sg_erase = cc[VERASE];
|
|
|
|
sg->sg_kill = cc[VKILL];
|
1993-05-14 00:58:26 +04:00
|
|
|
sg->sg_flags = tp->t_flags = ttcompatgetflags(tp);
|
1993-03-21 12:45:37 +03:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case TIOCSETP:
|
|
|
|
case TIOCSETN: {
|
|
|
|
register struct sgttyb *sg = (struct sgttyb *)data;
|
|
|
|
struct termios term;
|
|
|
|
int speed;
|
|
|
|
|
|
|
|
term = tp->t_termios;
|
1993-06-06 02:40:40 +04:00
|
|
|
if ((speed = sg->sg_ispeed) > MAX_SPEED || speed < 0)
|
1993-03-21 12:45:37 +03:00
|
|
|
term.c_ispeed = speed;
|
|
|
|
else
|
|
|
|
term.c_ispeed = compatspcodes[speed];
|
1993-06-06 02:40:40 +04:00
|
|
|
if ((speed = sg->sg_ospeed) > MAX_SPEED || speed < 0)
|
1993-03-21 12:45:37 +03:00
|
|
|
term.c_ospeed = speed;
|
|
|
|
else
|
|
|
|
term.c_ospeed = compatspcodes[speed];
|
|
|
|
term.c_cc[VERASE] = sg->sg_erase;
|
|
|
|
term.c_cc[VKILL] = sg->sg_kill;
|
1993-05-14 00:58:26 +04:00
|
|
|
tp->t_flags = ttcompatgetflags(tp)&0xffff0000 | sg->sg_flags&0xffff;
|
1993-03-21 12:45:37 +03:00
|
|
|
ttcompatsetflags(tp, &term);
|
|
|
|
return (ttioctl(tp, com == TIOCSETP ? TIOCSETAF : TIOCSETA,
|
1993-06-06 02:40:40 +04:00
|
|
|
(caddr_t)&term, flag));
|
1993-03-21 12:45:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
case TIOCGETC: {
|
|
|
|
struct tchars *tc = (struct tchars *)data;
|
|
|
|
register u_char *cc = tp->t_cc;
|
|
|
|
|
|
|
|
tc->t_intrc = cc[VINTR];
|
|
|
|
tc->t_quitc = cc[VQUIT];
|
|
|
|
tc->t_startc = cc[VSTART];
|
|
|
|
tc->t_stopc = cc[VSTOP];
|
|
|
|
tc->t_eofc = cc[VEOF];
|
|
|
|
tc->t_brkc = cc[VEOL];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case TIOCSETC: {
|
|
|
|
struct tchars *tc = (struct tchars *)data;
|
|
|
|
register u_char *cc = tp->t_cc;
|
|
|
|
|
|
|
|
cc[VINTR] = tc->t_intrc;
|
|
|
|
cc[VQUIT] = tc->t_quitc;
|
|
|
|
cc[VSTART] = tc->t_startc;
|
|
|
|
cc[VSTOP] = tc->t_stopc;
|
|
|
|
cc[VEOF] = tc->t_eofc;
|
|
|
|
cc[VEOL] = tc->t_brkc;
|
|
|
|
if (tc->t_brkc == -1)
|
|
|
|
cc[VEOL2] = _POSIX_VDISABLE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case TIOCSLTC: {
|
|
|
|
struct ltchars *ltc = (struct ltchars *)data;
|
|
|
|
register u_char *cc = tp->t_cc;
|
|
|
|
|
|
|
|
cc[VSUSP] = ltc->t_suspc;
|
|
|
|
cc[VDSUSP] = ltc->t_dsuspc;
|
|
|
|
cc[VREPRINT] = ltc->t_rprntc;
|
|
|
|
cc[VDISCARD] = ltc->t_flushc;
|
|
|
|
cc[VWERASE] = ltc->t_werasc;
|
|
|
|
cc[VLNEXT] = ltc->t_lnextc;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case TIOCGLTC: {
|
|
|
|
struct ltchars *ltc = (struct ltchars *)data;
|
|
|
|
register u_char *cc = tp->t_cc;
|
|
|
|
|
|
|
|
ltc->t_suspc = cc[VSUSP];
|
|
|
|
ltc->t_dsuspc = cc[VDSUSP];
|
|
|
|
ltc->t_rprntc = cc[VREPRINT];
|
|
|
|
ltc->t_flushc = cc[VDISCARD];
|
|
|
|
ltc->t_werasc = cc[VWERASE];
|
|
|
|
ltc->t_lnextc = cc[VLNEXT];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case TIOCLBIS:
|
|
|
|
case TIOCLBIC:
|
|
|
|
case TIOCLSET: {
|
|
|
|
struct termios term;
|
|
|
|
|
|
|
|
term = tp->t_termios;
|
|
|
|
if (com == TIOCLSET)
|
1993-05-14 00:58:26 +04:00
|
|
|
tp->t_flags = (ttcompatgetflags(tp)&0xffff) | *(int *)data<<16;
|
1993-03-21 12:45:37 +03:00
|
|
|
else {
|
1993-05-14 00:58:26 +04:00
|
|
|
tp->t_flags = ttcompatgetflags(tp);
|
1993-03-21 12:45:37 +03:00
|
|
|
if (com == TIOCLBIS)
|
|
|
|
tp->t_flags |= *(int *)data<<16;
|
|
|
|
else
|
|
|
|
tp->t_flags &= ~(*(int *)data<<16);
|
|
|
|
}
|
|
|
|
ttcompatsetlflags(tp, &term);
|
1993-06-06 02:40:40 +04:00
|
|
|
return (ttioctl(tp, TIOCSETA, (caddr_t)&term, flag));
|
1993-03-21 12:45:37 +03:00
|
|
|
}
|
|
|
|
case TIOCLGET:
|
1993-05-14 00:58:26 +04:00
|
|
|
tp->t_flags =
|
|
|
|
(ttcompatgetflags(tp)&0xffff0000)|(tp->t_flags&0xffff);
|
|
|
|
*(int *)data = tp->t_flags>>16;
|
1993-03-21 12:45:37 +03:00
|
|
|
if (ttydebug)
|
|
|
|
printf("CLGET: returning %x\n", *(int *)data);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case OTIOCGETD:
|
|
|
|
*(int *)data = tp->t_line ? tp->t_line : 2;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case OTIOCSETD: {
|
|
|
|
int ldisczero = 0;
|
|
|
|
|
|
|
|
return (ttioctl(tp, TIOCSETD,
|
|
|
|
*(int *)data == 2 ? (caddr_t)&ldisczero : data, flag));
|
|
|
|
}
|
|
|
|
|
|
|
|
case OTIOCCONS:
|
|
|
|
*(int *)data = 1;
|
|
|
|
return (ttioctl(tp, TIOCCONS, data, flag));
|
|
|
|
|
|
|
|
default:
|
|
|
|
return (-1);
|
|
|
|
}
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
1993-06-27 10:01:27 +04:00
|
|
|
int
|
1993-03-21 12:45:37 +03:00
|
|
|
ttcompatgetflags(tp)
|
|
|
|
register struct tty *tp;
|
|
|
|
{
|
|
|
|
register long iflag = tp->t_iflag;
|
|
|
|
register long lflag = tp->t_lflag;
|
|
|
|
register long oflag = tp->t_oflag;
|
|
|
|
register long cflag = tp->t_cflag;
|
|
|
|
register flags = 0;
|
|
|
|
|
|
|
|
if (iflag&IXOFF)
|
|
|
|
flags |= TANDEM;
|
|
|
|
if (iflag&ICRNL || oflag&ONLCR)
|
|
|
|
flags |= CRMOD;
|
1993-05-14 00:58:26 +04:00
|
|
|
if ((cflag&CSIZE) == CS8) {
|
|
|
|
flags |= PASS8;
|
|
|
|
if (iflag&ISTRIP)
|
|
|
|
flags |= ANYP;
|
|
|
|
}
|
|
|
|
else if (cflag&PARENB) {
|
1993-03-21 12:45:37 +03:00
|
|
|
if (iflag&INPCK) {
|
|
|
|
if (cflag&PARODD)
|
|
|
|
flags |= ODDP;
|
|
|
|
else
|
|
|
|
flags |= EVENP;
|
|
|
|
} else
|
|
|
|
flags |= EVENP | ODDP;
|
|
|
|
}
|
1993-05-14 00:58:26 +04:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
if ((lflag&ICANON) == 0) {
|
|
|
|
/* fudge */
|
1993-05-14 00:58:26 +04:00
|
|
|
if (oflag&OPOST || iflag&ISTRIP || iflag&IXON || lflag&ISIG || lflag&IEXTEN || cflag&PARENB || iflag&INPCK || (cflag&CSIZE) != CS8)
|
1993-03-21 12:45:37 +03:00
|
|
|
flags |= CBREAK;
|
|
|
|
else
|
|
|
|
flags |= RAW;
|
|
|
|
}
|
1993-05-14 00:58:26 +04:00
|
|
|
if (!(flags&RAW) && !(oflag&OPOST) && (!(cflag&PARENB) || (cflag&CSIZE) == CS8))
|
|
|
|
flags |= LITOUT;
|
1993-03-21 12:45:37 +03:00
|
|
|
if (oflag&OXTABS)
|
|
|
|
flags |= XTABS;
|
|
|
|
if (lflag&ECHOE)
|
|
|
|
flags |= CRTERA|CRTBS;
|
|
|
|
if (lflag&ECHOKE)
|
|
|
|
flags |= CRTKIL|CRTBS;
|
|
|
|
if (lflag&ECHOPRT)
|
|
|
|
flags |= PRTERA;
|
|
|
|
if (lflag&ECHOCTL)
|
|
|
|
flags |= CTLECH;
|
|
|
|
if ((iflag&IXANY) == 0)
|
|
|
|
flags |= DECCTQ;
|
|
|
|
flags |= lflag&(ECHO|MDMBUF|TOSTOP|FLUSHO|NOHANG|PENDIN|NOFLSH);
|
|
|
|
if (ttydebug)
|
|
|
|
printf("getflags: %x\n", flags);
|
|
|
|
return (flags);
|
|
|
|
}
|
|
|
|
|
1993-06-27 10:01:27 +04:00
|
|
|
void
|
1993-03-21 12:45:37 +03:00
|
|
|
ttcompatsetflags(tp, t)
|
|
|
|
register struct tty *tp;
|
|
|
|
register struct termios *t;
|
|
|
|
{
|
|
|
|
register flags = tp->t_flags;
|
|
|
|
register long iflag = t->c_iflag;
|
|
|
|
register long oflag = t->c_oflag;
|
|
|
|
register long lflag = t->c_lflag;
|
|
|
|
register long cflag = t->c_cflag;
|
|
|
|
|
|
|
|
if (flags & RAW) {
|
1993-05-14 00:58:26 +04:00
|
|
|
iflag &= (IXOFF|IXANY);
|
1993-03-21 12:45:37 +03:00
|
|
|
oflag &= ~OPOST;
|
|
|
|
lflag &= ~(ECHOCTL|ISIG|ICANON|IEXTEN);
|
|
|
|
} else {
|
|
|
|
iflag |= BRKINT|IXON|IMAXBEL;
|
|
|
|
oflag |= OPOST;
|
|
|
|
lflag |= ISIG|IEXTEN|ECHOCTL; /* XXX was echoctl on ? */
|
|
|
|
if (flags & XTABS)
|
|
|
|
oflag |= OXTABS;
|
|
|
|
else
|
|
|
|
oflag &= ~OXTABS;
|
|
|
|
if (flags & CBREAK)
|
|
|
|
lflag &= ~ICANON;
|
|
|
|
else
|
|
|
|
lflag |= ICANON;
|
|
|
|
if (flags&CRMOD) {
|
|
|
|
iflag |= ICRNL;
|
|
|
|
oflag |= ONLCR;
|
|
|
|
} else {
|
|
|
|
iflag &= ~ICRNL;
|
|
|
|
oflag &= ~ONLCR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (flags&ECHO)
|
|
|
|
lflag |= ECHO;
|
|
|
|
else
|
|
|
|
lflag &= ~ECHO;
|
|
|
|
|
1993-05-14 00:58:26 +04:00
|
|
|
cflag &= ~(CSIZE|PARENB);
|
1993-03-21 12:45:37 +03:00
|
|
|
if (flags&(RAW|LITOUT|PASS8)) {
|
|
|
|
cflag |= CS8;
|
1993-05-14 00:58:26 +04:00
|
|
|
if (!(flags&(RAW|PASS8)) || (flags&(RAW|PASS8|ANYP)) == (PASS8|ANYP))
|
1993-03-21 12:45:37 +03:00
|
|
|
iflag |= ISTRIP;
|
|
|
|
else
|
|
|
|
iflag &= ~ISTRIP;
|
|
|
|
} else {
|
1993-05-14 00:58:26 +04:00
|
|
|
cflag |= CS7;
|
|
|
|
if ((flags&(EVENP|ODDP)) && (flags&ANYP) != ANYP)
|
|
|
|
cflag |= PARENB;
|
1993-03-21 12:45:37 +03:00
|
|
|
iflag |= ISTRIP;
|
|
|
|
}
|
|
|
|
if ((flags&(EVENP|ODDP)) == EVENP) {
|
|
|
|
iflag |= INPCK;
|
|
|
|
cflag &= ~PARODD;
|
|
|
|
} else if ((flags&(EVENP|ODDP)) == ODDP) {
|
|
|
|
iflag |= INPCK;
|
|
|
|
cflag |= PARODD;
|
|
|
|
} else
|
|
|
|
iflag &= ~INPCK;
|
|
|
|
if (flags&LITOUT)
|
|
|
|
oflag &= ~OPOST; /* move earlier ? */
|
|
|
|
if (flags&TANDEM)
|
|
|
|
iflag |= IXOFF;
|
|
|
|
else
|
|
|
|
iflag &= ~IXOFF;
|
|
|
|
t->c_iflag = iflag;
|
|
|
|
t->c_oflag = oflag;
|
|
|
|
t->c_lflag = lflag;
|
|
|
|
t->c_cflag = cflag;
|
|
|
|
}
|
|
|
|
|
1993-06-27 10:01:27 +04:00
|
|
|
void
|
1993-03-21 12:45:37 +03:00
|
|
|
ttcompatsetlflags(tp, t)
|
|
|
|
register struct tty *tp;
|
|
|
|
register struct termios *t;
|
|
|
|
{
|
|
|
|
register flags = tp->t_flags;
|
|
|
|
register long iflag = t->c_iflag;
|
|
|
|
register long oflag = t->c_oflag;
|
|
|
|
register long lflag = t->c_lflag;
|
|
|
|
register long cflag = t->c_cflag;
|
|
|
|
|
|
|
|
if (flags&CRTERA)
|
|
|
|
lflag |= ECHOE;
|
|
|
|
else
|
|
|
|
lflag &= ~ECHOE;
|
|
|
|
if (flags&CRTKIL)
|
|
|
|
lflag |= ECHOKE;
|
|
|
|
else
|
|
|
|
lflag &= ~ECHOKE;
|
|
|
|
if (flags&PRTERA)
|
|
|
|
lflag |= ECHOPRT;
|
|
|
|
else
|
|
|
|
lflag &= ~ECHOPRT;
|
|
|
|
if (flags&CTLECH)
|
|
|
|
lflag |= ECHOCTL;
|
|
|
|
else
|
|
|
|
lflag &= ~ECHOCTL;
|
|
|
|
if ((flags&DECCTQ) == 0)
|
|
|
|
lflag |= IXANY;
|
|
|
|
else
|
|
|
|
lflag &= ~IXANY;
|
|
|
|
lflag &= ~(MDMBUF|TOSTOP|FLUSHO|NOHANG|PENDIN|NOFLSH);
|
|
|
|
lflag |= flags&(MDMBUF|TOSTOP|FLUSHO|NOHANG|PENDIN|NOFLSH);
|
1993-05-14 00:58:26 +04:00
|
|
|
cflag &= ~(CSIZE|PARENB);
|
1993-03-21 12:45:37 +03:00
|
|
|
if (flags&(LITOUT|PASS8)) {
|
|
|
|
cflag |= CS8;
|
1993-05-14 00:58:26 +04:00
|
|
|
if (flags&(LITOUT|RAW))
|
1993-03-21 12:45:37 +03:00
|
|
|
oflag &= ~OPOST;
|
1993-05-14 00:58:26 +04:00
|
|
|
else
|
|
|
|
oflag |= OPOST;
|
|
|
|
if (!(flags&(RAW|PASS8)) || (flags&(RAW|PASS8|ANYP)) == (PASS8|ANYP))
|
|
|
|
iflag |= ISTRIP;
|
|
|
|
else
|
|
|
|
iflag &= ~ISTRIP;
|
1993-03-21 12:45:37 +03:00
|
|
|
} else if ((flags&RAW) == 0) {
|
1993-05-14 00:58:26 +04:00
|
|
|
cflag |= CS7;
|
|
|
|
if ((flags&(EVENP|ODDP)) && (flags&ANYP) != ANYP)
|
|
|
|
cflag |= PARENB;
|
|
|
|
oflag |= ISTRIP|OPOST;
|
1993-03-21 12:45:37 +03:00
|
|
|
}
|
|
|
|
t->c_iflag = iflag;
|
|
|
|
t->c_oflag = oflag;
|
|
|
|
t->c_lflag = lflag;
|
|
|
|
t->c_cflag = cflag;
|
|
|
|
}
|
|
|
|
#endif /* COMPAT_43 */
|