Deleted Added
full compact
tty.c (30354) tty.c (31016)
1/*-
2 * Copyright (c) 1982, 1986, 1990, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)tty.c 8.8 (Berkeley) 1/21/94
1/*-
2 * Copyright (c) 1982, 1986, 1990, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)tty.c 8.8 (Berkeley) 1/21/94
39 * $Id: tty.c,v 1.96 1997/09/14 02:40:44 peter Exp $
39 * $Id: tty.c,v 1.97 1997/10/12 20:24:05 phk Exp $
40 */
41
42/*-
43 * TODO:
44 * o Fix races for sending the start char in ttyflush().
45 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect().
46 * With luck, there will be MIN chars before select() returns().
47 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it.

--- 1433 unchanged lines hidden (view full) ---

1481 }
1482 splx(s);
1483 return (EWOULDBLOCK);
1484 }
1485 if (!ISSET(lflag, ICANON)) {
1486 int m = cc[VMIN];
1487 long t = cc[VTIME];
1488 struct timeval stime, timecopy;
40 */
41
42/*-
43 * TODO:
44 * o Fix races for sending the start char in ttyflush().
45 * o Handle inter-byte timeout for "MIN > 0, TIME > 0" in ttyselect().
46 * With luck, there will be MIN chars before select() returns().
47 * o Handle CLOCAL consistently for ptys. Perhaps disallow setting it.

--- 1433 unchanged lines hidden (view full) ---

1481 }
1482 splx(s);
1483 return (EWOULDBLOCK);
1484 }
1485 if (!ISSET(lflag, ICANON)) {
1486 int m = cc[VMIN];
1487 long t = cc[VTIME];
1488 struct timeval stime, timecopy;
1489 int x;
1490
1491 /*
1492 * Check each of the four combinations.
1493 * (m > 0 && t == 0) is the normal read case.
1494 * It should be fairly efficient, so we check that and its
1495 * companion case (m == 0 && t == 0) first.
1496 * For the other two cases, we compute the target sleep time
1497 * into slp.

--- 879 unchanged lines hidden ---
1489
1490 /*
1491 * Check each of the four combinations.
1492 * (m > 0 && t == 0) is the normal read case.
1493 * It should be fairly efficient, so we check that and its
1494 * companion case (m == 0 && t == 0) first.
1495 * For the other two cases, we compute the target sleep time
1496 * into slp.

--- 879 unchanged lines hidden ---