diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-11-06 15:32:44 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-11-06 15:32:44 +0000 |
commit | 00bcc2f94f80af4176b401454bdc99fa961f4a4b (patch) | |
tree | db818ddb32bf1a9c81c5450be925d98798f2ec1c /otherlibs/unix | |
parent | a9313788e182755c5ed28444f9bd60962107d1c5 (diff) |
Interface Termios rendue plus conforme a POSIX
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix')
-rw-r--r-- | otherlibs/unix/termios.c | 45 | ||||
-rw-r--r-- | otherlibs/unix/unix.ml | 13 | ||||
-rw-r--r-- | otherlibs/unix/unix.mli | 13 |
3 files changed, 16 insertions, 55 deletions
diff --git a/otherlibs/unix/termios.c b/otherlibs/unix/termios.c index 8ac91ea54..314132cf4 100644 --- a/otherlibs/unix/termios.c +++ b/otherlibs/unix/termios.c @@ -34,7 +34,7 @@ enum { Input, Output }; /* Number of fields in the terminal_io record field. Cf. unix.mli */ -#define NFIELDS 51 +#define NFIELDS 38 /* Structure of the terminal_io record. Cf. unix.mli */ @@ -53,19 +53,6 @@ static long terminal_io_descr[] = { Bool, iflags, IXOFF, /* Output modes */ Bool, oflags, OPOST, - Bool, oflags, OLCUC, - Bool, oflags, ONLCR, - Bool, oflags, OCRNL, - Bool, oflags, ONOCR, - Bool, oflags, ONLRET, - Bool, oflags, OFILL, - Bool, oflags, OFDEL, - Enum, oflags, 0, 2, NLDLY, NL0, NL1, - Enum, oflags, 0, 2, CRDLY, CR0, CR1, - Enum, oflags, 0, 4, TABDLY, TAB0, TAB1, TAB2, TAB3, - Enum, oflags, 0, 2, BSDLY, BS0, BS1, - Enum, oflags, 0, 2, VTDLY, VT0, VT1, - Enum, oflags, 0, 2, FFDLY, FF0, FF1, /* Control modes */ Speed, Output, Speed, Input, @@ -110,21 +97,21 @@ static struct { speed_t speed; int baud; } speedtable[] = { - B0, 0, - B50, 50, - B75, 75, - B110, 110, - B134, 134, - B150, 150, - B300, 300, - B600, 600, - B1200, 1200, - B1800, 1800, - B2400, 2400, - B4800, 4800, - B9600, 9600, - B19200, 19200, - B38400, 38400 + {B0, 0}, + {B50, 50}, + {B75, 75}, + {B110, 110}, + {B134, 134}, + {B150, 150}, + {B300, 300}, + {B600, 600}, + {B1200, 1200}, + {B1800, 1800}, + {B2400, 2400}, + {B4800, 4800}, + {B9600, 9600}, + {B19200, 19200}, + {B38400, 38400} }; #define NSPEEDS (sizeof(speedtable) / sizeof(speedtable[0])) diff --git a/otherlibs/unix/unix.ml b/otherlibs/unix/unix.ml index 160fb10a2..ed1b1c0d8 100644 --- a/otherlibs/unix/unix.ml +++ b/otherlibs/unix/unix.ml @@ -400,19 +400,6 @@ type terminal_io = { mutable c_ixon: bool; mutable c_ixoff: bool; mutable c_opost: bool; - mutable c_olcuc: bool; - mutable c_onlcr: bool; - mutable c_ocrnl: bool; - mutable c_onocr: bool; - mutable c_onlret: bool; - mutable c_ofill: bool; - mutable c_ofdel: bool; - mutable c_nldly: int; - mutable c_crdly: int; - mutable c_tabdly: int; - mutable c_bsdly: int; - mutable c_vtdly: int; - mutable c_ffdly: int; mutable c_obaud: int; mutable c_ibaud: int; mutable c_csize: int; diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli index 007809f33..1801234ac 100644 --- a/otherlibs/unix/unix.mli +++ b/otherlibs/unix/unix.mli @@ -758,19 +758,6 @@ type terminal_io = { mutable c_ixoff: bool; (* Emit XON/XOFF chars to control input flow. *) (* Output modes: *) mutable c_opost: bool; (* Enable output processing. *) - mutable c_olcuc: bool; (* Map lowercase to uppercase on output. *) - mutable c_onlcr: bool; (* Map NL to CR/NL on output. *) - mutable c_ocrnl: bool; (* Map CR to NL on output. *) - mutable c_onocr: bool; (* No CR output at column 0. *) - mutable c_onlret: bool; (* NL is assumed to perform as CR. *) - mutable c_ofill: bool; (* Use fill characters instead of delays. *) - mutable c_ofdel: bool; (* Fill character is DEL instead of NULL. *) - mutable c_nldly: int; (* Newline delay type (0-1). *) - mutable c_crdly: int; (* Carriage return delay type (0-3). *) - mutable c_tabdly: int; (* Horizontal tab delay type (0-3). *) - mutable c_bsdly: int; (* Backspace delay type (0-1). *) - mutable c_vtdly: int; (* Vertical tab delay type (0-1). *) - mutable c_ffdly: int; (* Form feed delay type (0-1). *) (* Control modes: *) mutable c_obaud: int; (* Output baud rate (0 means close connection).*) mutable c_ibaud: int; (* Input baud rate. *) |