diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2001-08-28 14:47:48 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2001-08-28 14:47:48 +0000 |
commit | ddd99c7e5d2f0f8e7364e8521fa7e8308999344e (patch) | |
tree | 3c0158d035a52c0cf185c08c3288c3c76d6718d0 /otherlibs/unix/termios.c | |
parent | c345611817d76ccc3bbd02db1f942774220739f9 (diff) |
Chargement dynamique de primitives C
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3677 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix/termios.c')
-rw-r--r-- | otherlibs/unix/termios.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/otherlibs/unix/termios.c b/otherlibs/unix/termios.c index 9a8b58616..29f8c70ca 100644 --- a/otherlibs/unix/termios.c +++ b/otherlibs/unix/termios.c @@ -229,7 +229,7 @@ static void decode_terminal_status(value *src) } } -value unix_tcgetattr(value fd) /* ML */ +CAMLprim value unix_tcgetattr(value fd) { value res; @@ -244,7 +244,7 @@ static int when_flag_table[] = { TCSANOW, TCSADRAIN, TCSAFLUSH }; -value unix_tcsetattr(value fd, value when, value arg) /* ML */ +CAMLprim value unix_tcsetattr(value fd, value when, value arg) { if (tcgetattr(Int_val(fd), &terminal_status) == -1) uerror("tcsetattr", Nothing); @@ -256,14 +256,14 @@ value unix_tcsetattr(value fd, value when, value arg) /* ML */ return Val_unit; } -value unix_tcsendbreak(value fd, value delay) /* ML */ +CAMLprim value unix_tcsendbreak(value fd, value delay) { if (tcsendbreak(Int_val(fd), Int_val(delay)) == -1) uerror("tcsendbreak", Nothing); return Val_unit; } -value unix_tcdrain(value fd) /* ML */ +CAMLprim value unix_tcdrain(value fd) { if (tcdrain(Int_val(fd)) == -1) uerror("tcdrain", Nothing); return Val_unit; @@ -273,7 +273,7 @@ static int queue_flag_table[] = { TCIFLUSH, TCOFLUSH, TCIOFLUSH }; -value unix_tcflush(value fd, value queue) /* ML */ +CAMLprim value unix_tcflush(value fd, value queue) { if (tcflush(Int_val(fd), queue_flag_table[Int_val(queue)]) == -1) uerror("tcflush", Nothing); @@ -284,7 +284,7 @@ static int action_flag_table[] = { TCOOFF, TCOON, TCIOFF, TCION }; -value unix_tcflow(value fd, value action) /* ML */ +CAMLprim value unix_tcflow(value fd, value action) { if (tcflow(Int_val(fd), action_flag_table[Int_val(action)]) == -1) uerror("tcflow", Nothing); @@ -293,22 +293,22 @@ value unix_tcflow(value fd, value action) /* ML */ #else -value unix_tcgetattr(value fd) +CAMLprim value unix_tcgetattr(value fd) { invalid_argument("tcgetattr not implemented"); } -value unix_tcsetattr(value fd, value when, value arg) +CAMLprim value unix_tcsetattr(value fd, value when, value arg) { invalid_argument("tcsetattr not implemented"); } -value unix_tcsendbreak(value fd, value delay) +CAMLprim value unix_tcsendbreak(value fd, value delay) { invalid_argument("tcsendbreak not implemented"); } -value unix_tcdrain(value fd) +CAMLprim value unix_tcdrain(value fd) { invalid_argument("tcdrain not implemented"); } -value unix_tcflush(value fd, value queue) +CAMLprim value unix_tcflush(value fd, value queue) { invalid_argument("tcflush not implemented"); } -value unix_tcflow(value fd, value action) +CAMLprim value unix_tcflow(value fd, value action) { invalid_argument("tcflow not implemented"); } #endif |