From aee0041adf39c63ab56d8c22023a6f657e21adf8 Mon Sep 17 00:00:00 2001 From: tholo Date: Sat, 29 Mar 1997 20:15:52 +0000 Subject: [PATCH] Change MIN & TIME to VMIN & VTIME; from NetBSD PR 3243 --- share/man/man4/termios.4 | 60 ++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index 78acf58d20d..fac6165d667 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -346,87 +346,87 @@ queue. .Ss Noncanonical Mode Input Processing In noncanonical mode input processing, input bytes are not assembled into lines, and erase and kill processing does not occur. The values of the -.Dv MIN +.Dv VMIN and -.Dv TIME +.Dv VTIME members of the .Fa c_cc array are used to determine how to process the bytes received. .Pp -.Dv MIN +.Dv VMIN represents the minimum number of bytes that should be received when the .Xr read function successfully returns. -.Dv TIME +.Dv VTIME is a timer of 0.1 second granularity that is used to time out bursty and short term data transmissions. If -.Dv MIN +.Dv VMIN is greater than .Dv \&{ Dv MAX_INPUT Ns \&} , the response to the request is undefined. The four possible values for -.Dv MIN +.Dv VMIN and -.Dv TIME +.Dv VTIME and their interactions are described below. -.Ss "Case A: MIN > 0, TIME > 0" +.Ss "Case A: VMIN > 0, VTIME > 0" In this case -.Dv TIME +.Dv VTIME serves as an inter-byte timer and is activated after the first byte is received. Since it is an inter-byte timer, it is reset after a byte is received. The interaction between -.Dv MIN +.Dv VMIN and -.Dv TIME +.Dv VTIME is as follows: as soon as one byte is received, the inter-byte timer is started. If -.Dv MIN +.Dv VMIN bytes are received before the inter-byte timer expires (remember that the timer is reset upon receipt of each byte), the read is satisfied. If the timer expires before -.Dv MIN +.Dv VMIN bytes are received, the characters received to that point are returned to the user. Note that if -.Dv TIME +.Dv VTIME expires at least one byte is returned because the timer would not have been enabled unless a byte was received. In this case -.Pf \&( Dv MIN +.Pf \&( Dv VMIN > 0, -.Dv TIME +.Dv VTIME > 0) the read blocks until the -.Dv MIN +.Dv VMIN and -.Dv TIME +.Dv VTIME mechanisms are activated by the receipt of the first byte, or a signal is received. If data is in the buffer at the time of the read(), the result is as if data had been received immediately after the read(). -.Ss "Case B: MIN > 0, TIME = 0" +.Ss "Case B: VMIN > 0, VTIME = 0" In this case, since the value of -.Dv TIME +.Dv VTIME is zero, the timer plays no role and only -.Dv MIN +.Dv VMIN is significant. A pending read is not satisfied until -.Dv MIN +.Dv VMIN bytes are received (i.e., the pending read blocks until -.Dv MIN +.Dv VMIN bytes are received), or a signal is received. A program that uses this case to read record-based terminal .Dv I/O may block indefinitely in the read operation. -.Ss "Case C: MIN = 0, TIME > 0" +.Ss "Case C: VMIN = 0, VTIME > 0" In this case, since -.Dv MIN +.Dv VMIN = 0, -.Dv TIME +.Dv VTIME no longer represents an inter-byte timer. It now serves as a read timer that is activated as soon as the read function is processed. A read is satisfied as soon as a single @@ -435,12 +435,12 @@ the timer expires, no bytes are returned. If the timer does not expire, the only way the read can be satisfied is if a byte is received. In this case the read will not block indefinitely waiting for a byte; if no byte is received within -.Dv TIME Ns *0.1 +.Dv VTIME Ns *0.1 seconds after the read is initiated, the read returns a value of zero, having read no data. If data is in the buffer at the time of the read, the timer is started as if data had been received immediately after the read. -.Ss Case D: MIN = 0, TIME = 0 +.Ss Case D: VMIN = 0, VTIME = 0 The minimum of either the number of bytes requested or the number of bytes currently available is returned without waiting for more bytes to be input. If no characters are available, read returns a @@ -1307,10 +1307,10 @@ If .Dv ICANON is not set, read requests are satisfied directly from the input queue. A read is not satisfied until at least -.Dv MIN +.Dv VMIN bytes have been received or the timeout value -.Dv TIME +.Dv VTIME expired between bytes. The time value represents tenths of seconds. See .Sx "Noncanonical Mode Input Processing" -- 2.20.1