Skip to content

Commit

Permalink
Interface Termios rendue plus conforme a POSIX
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
xavierleroy committed Nov 6, 1995
1 parent a931378 commit 00bcc2f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 55 deletions.
45 changes: 16 additions & 29 deletions otherlibs/unix/termios.c
Expand Up @@ -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 */

Expand All @@ -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,
Expand Down Expand Up @@ -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]))
Expand Down
13 changes: 0 additions & 13 deletions otherlibs/unix/unix.ml
Expand Up @@ -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;
Expand Down
13 changes: 0 additions & 13 deletions otherlibs/unix/unix.mli
Expand Up @@ -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. *)
Expand Down

0 comments on commit 00bcc2f

Please sign in to comment.