Posix.TTY
structureThe structure Posix.TTY specifies a general terminal interface, as described in Section 7 of the POSIX standard [CITE]1003.1,1996/.
signature POSIX_TTY
structure TTY
: POSIX_TTY
eqtype pid
eqtype file_desc
structure V : sig
val eof : int
val eol : int
val erase : int
val intr : int
val kill : int
val min : int
val quit : int
val susp : int
val time : int
val start : int
val stop : int
val nccs : int
type cc
val cc : (int * char) list -> cc
val update : (cc * (int * char) list) -> cc
val sub : (cc * int) -> char
end
structure I : sig
include POSIX_FLAGS
val brkint : flags
val icrnl : flags
val ignbrk : flags
val igncr : flags
val ignpar : flags
val inlcr : flags
val inpck : flags
val istrip : flags
val ixoff : flags
val ixon : flags
val parmrk : flags
end
structure O : sig
include POSIX_FLAGS
val opost : flags
end
structure C : sig
include POSIX_FLAGS
val clocal : flags
val cread : flags
val cs5 : flags
val cs6 : flags
val cs7 : flags
val cs8 : flags
val csize : flags
val cstopb : flags
val hupcl : flags
val parenb : flags
val parodd : flags
end
structure L : sig
include POSIX_FLAGS
val echo : flags
val echoe : flags
val echok : flags
val echonl : flags
val icanon : flags
val iexten : flags
val isig : flags
val noflsh : flags
val tostop : flags
end
eqtype speed
val compareSpeed : (speed * speed) -> order
val speedToWord : speed -> SysWord.word
val wordToSpeed : SysWord.word -> speed
val b0 : speed
val b50 : speed
val b75 : speed
val b110 : speed
val b134 : speed
val b150 : speed
val b200 : speed
val b300 : speed
val b600 : speed
val b1200 : speed
val b1800 : speed
val b2400 : speed
val b4800 : speed
val b9600 : speed
val b19200 : speed
val b38400 : speed
type termios
val termios : {iflag : I.flags, oflag : O.flags, cflag : C.flags, lflag : L.flags, cc : V.cc, ispeed : speed, ospeed : speed} -> termios
val fieldsOf : termios -> {iflag : I.flags, oflag : O.flags, cflag : C.flags, lflag : L.flags, cc : V.cc, ispeed : speed, ospeed : speed}
val getiflag : termios -> I.flags
val getoflag : termios -> O.flags
val getcflag : termios -> C.flags
val getlflag : termios -> L.flags
val getcc : termios -> V.cc
structure CF : sig
val getospeed : termios -> speed
val setospeed : (termios * speed) -> termios
val getispeed : termios -> speed
val setispeed : (termios * speed) -> termios
end
structure TC : sig
eqtype set_action
val sanow : set_action
val sadrain : set_action
val saflush : set_action
eqtype flow_action
val ooff : flow_action
val oon : flow_action
val ioff : flow_action
val ion : flow_action
eqtype queue_sel
val iflush : queue_sel
val oflush : queue_sel
val ioflush : queue_sel
val getattr : file_desc -> termios
val setattr : (file_desc * set_action * termios) -> unit
val sendbreak : (file_desc * int) -> unit
val drain : file_desc -> unit
val flush : (file_desc * queue_sel) -> unit
val flow : (file_desc * flow_action) -> unit
end
val getpgrp : file_desc -> pid
val setpgrp : (file_desc * pid) -> unit
eqtype pid
eqtype file_desc
structure V
eof
EOF
character.
eol
EOL
character.
erase
ERASE
character.
intr
INTR
character.
kill
KILL
character.
min
MIN
value.
quit
QUIT
character.
susp
SUSP
character.
time
TIME
value.
start
START
character.
stop
STOP
character.
nccs
nccs
-1.
type cc
cc l
#"\000"
.
update (cs, l)
sub (cs, i)
structure I
brkint
icrnl
CR
(i.e., #"\^M"
) /to NL
(i.e., #"\n"
) on input.
ignbrk
igncr
CR
characters.
ignpar
inlcr
NL
to CR
on input.
inpck
istrip
ixoff
ixon
parmrk
structure O
opost
structure C
clocal
cread
cs5
cs6
cs7
cs8
csize
cstopb
hupcl
parenb
parodd
structure L
echo
echoe
ERASE
character on backspace in canonical mode.
echok
KILL
character in canonical mode.
echonl
NL
character if echonl is not set in canonical mode.
icanon
iexten
isig
noflsh
tostop
eqtype speed
compareSpeed (sp, sp2)
speedToWord sp
wordToSpeed w
b0
b50
b75
b110
b134
b150
b200
b300
b600
b1200
b1800
b2400
b4800
b9600
b19200
b38400
type termios
termios {iflag, oflag, cflag, lflag, cc, ispeed, ospeed}
fieldsOf te
getiflag te
getoflag te
getcflag te
fgetlflag te
getcc te
structure CF
getospeed te
setospeed (te, sp)
getispeed te
setispeed (te, sp)
structure TC
eqtype set_action
sanow
sadrain
saflush
eqtype flow_action
ooff
oon
ioff
STOP
character to the terminal device, to stop it transmitting data.
ion
START
character to the terminal device, to restart it transmitting data.
eqtype queue_sel
iflush
oflush
ioflush
getattr fd
setattr (fd, action, te)
sendbreak (fd, d)
drain fd
flush (fd, qs)
flow (fd, fa)
getpgrp fd
csetpgrp (fd, pid)
POSIX_FLAGS, Posix, OS, Posix.TTY, Posix.FileSys, Posix.Process, Posix.Error
Last Modified October 4, 1997
Comments to John Reppy.
Copyright © 1997 Bell Labs, Lucent Technologies