diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1998-10-20 12:49:50 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1998-10-20 12:49:50 +0000 |
commit | 15af445322515efbbb994498f2e37b37aed89022 (patch) | |
tree | 392d400bdafb5f62ad180de54a3f249197678e01 | |
parent | 1568b2614a9addf74d0632f2beaaafc6127a2d20 (diff) |
Ajout des vitesses B57600 B115200 B230400
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2128 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/unix/termios.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/otherlibs/unix/termios.c b/otherlibs/unix/termios.c index 6c97c86f5..636e12a82 100644 --- a/otherlibs/unix/termios.c +++ b/otherlibs/unix/termios.c @@ -95,7 +95,6 @@ static struct { speed_t speed; int baud; } speedtable[] = { - {B0, 0}, {B50, 50}, {B75, 75}, {B110, 110}, @@ -109,7 +108,17 @@ static struct { {B4800, 4800}, {B9600, 9600}, {B19200, 19200}, - {B38400, 38400} + {B38400, 38400}, +#ifdef B57600 + {B57600, 57600}, +#endif +#ifdef B115200 + {B115200, 115200}, +#endif +#ifdef B230400 + {B230400, 230400}, +#endif + {B0, 0} }; #define NSPEEDS (sizeof(speedtable) / sizeof(speedtable[0])) @@ -142,6 +151,7 @@ static void encode_terminal_status(value *dst) case Speed: { int which = *pc++; speed_t speed = 0; + *dst = Val_int(9600); /* in case no speed in speedtable matches */ switch (which) { case Output: speed = cfgetospeed(&terminal_status); break; |