Convert VMIN and VTIME.
This commit is contained in:
parent
54ed756bc4
commit
d279b4198a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_ioctl.c,v 1.8 1995/10/07 06:26:46 mycroft Exp $ */
|
||||
/* $NetBSD: ibcs2_ioctl.c,v 1.9 1995/10/10 02:35:16 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Scott Bartram
|
||||
|
@ -176,10 +176,15 @@ stios2btios(st, bt)
|
|||
st->c_cc[IBCS2_VERASE] ? st->c_cc[IBCS2_VERASE] : _POSIX_VDISABLE;
|
||||
bt->c_cc[VKILL] =
|
||||
st->c_cc[IBCS2_VKILL] ? st->c_cc[IBCS2_VKILL] : _POSIX_VDISABLE;
|
||||
bt->c_cc[VEOF] =
|
||||
st->c_cc[IBCS2_VEOF] ? st->c_cc[IBCS2_VEOF] : _POSIX_VDISABLE;
|
||||
bt->c_cc[VEOL] =
|
||||
st->c_cc[IBCS2_VEOL] ? st->c_cc[IBCS2_VEOL] : _POSIX_VDISABLE;
|
||||
if (bt->c_lflag & ICANON) {
|
||||
bt->c_cc[VEOF] =
|
||||
st->c_cc[IBCS2_VEOF] ? st->c_cc[IBCS2_VEOF] : _POSIX_VDISABLE;
|
||||
bt->c_cc[VEOL] =
|
||||
st->c_cc[IBCS2_VEOL] ? st->c_cc[IBCS2_VEOL] : _POSIX_VDISABLE;
|
||||
} else {
|
||||
bt->c_cc[VMIN] = st->c_cc[IBCS2_VMIN];
|
||||
bt->c_cc[VTIME] = st->c_cc[IBCS2_VTIME];
|
||||
}
|
||||
bt->c_cc[VEOL2] =
|
||||
st->c_cc[IBCS2_VEOL2] ? st->c_cc[IBCS2_VEOL2] : _POSIX_VDISABLE;
|
||||
#if 0
|
||||
|
@ -267,10 +272,15 @@ btios2stios(bt, st)
|
|||
bt->c_cc[VERASE] != _POSIX_VDISABLE ? bt->c_cc[VERASE] : 0;
|
||||
st->c_cc[IBCS2_VKILL] =
|
||||
bt->c_cc[VKILL] != _POSIX_VDISABLE ? bt->c_cc[VKILL] : 0;
|
||||
st->c_cc[IBCS2_VEOF] =
|
||||
bt->c_cc[VEOF] != _POSIX_VDISABLE ? bt->c_cc[VEOF] : 0;
|
||||
st->c_cc[IBCS2_VEOL] =
|
||||
bt->c_cc[VEOL] != _POSIX_VDISABLE ? bt->c_cc[VEOL] : 0;
|
||||
if (bt->c_lflag & ICANON) {
|
||||
st->c_cc[IBCS2_VEOF] =
|
||||
bt->c_cc[VEOF] != _POSIX_VDISABLE ? bt->c_cc[VEOF] : 0;
|
||||
st->c_cc[IBCS2_VEOL] =
|
||||
bt->c_cc[VEOL] != _POSIX_VDISABLE ? bt->c_cc[VEOL] : 0;
|
||||
} else {
|
||||
st->c_cc[IBCS2_VMIN] = bt->c_cc[VMIN];
|
||||
st->c_cc[IBCS2_VTIME] = bt->c_cc[VTIME];
|
||||
}
|
||||
st->c_cc[IBCS2_VEOL2] =
|
||||
bt->c_cc[VEOL2] != _POSIX_VDISABLE ? bt->c_cc[VEOL2] : 0;
|
||||
st->c_cc[IBCS2_VSWTCH] =
|
||||
|
@ -290,6 +300,7 @@ stios2stio(ts, t)
|
|||
struct ibcs2_termios *ts;
|
||||
struct ibcs2_termio *t;
|
||||
{
|
||||
|
||||
t->c_iflag = ts->c_iflag;
|
||||
t->c_oflag = ts->c_oflag;
|
||||
t->c_cflag = ts->c_cflag;
|
||||
|
@ -303,6 +314,7 @@ stio2stios(t, ts)
|
|||
struct ibcs2_termio *t;
|
||||
struct ibcs2_termios *ts;
|
||||
{
|
||||
|
||||
ts->c_iflag = t->c_iflag;
|
||||
ts->c_oflag = t->c_oflag;
|
||||
ts->c_cflag = t->c_cflag;
|
||||
|
|
Loading…
Reference in New Issue