- Added (Cig-generated) file tty.c to list of maintained files.
- Tweaked the names of the named constants in the tty interface.
This commit is contained in:
parent
92b6357605
commit
0644d18c53
|
@ -732,22 +732,22 @@
|
|||
;; Posix
|
||||
ttychar/eof
|
||||
ttychar/eol
|
||||
ttychar/erase
|
||||
ttychar/kill
|
||||
ttychar/intr
|
||||
ttychar/delete-char
|
||||
ttychar/delete-line
|
||||
ttychar/interrupt
|
||||
ttychar/quit
|
||||
ttychar/susp
|
||||
ttychar/suspend
|
||||
ttychar/start
|
||||
ttychar/stop
|
||||
ttychar/min
|
||||
ttychar/time
|
||||
|
||||
;; SVR4 & 4.3+BSD
|
||||
ttychar/word-erase
|
||||
ttychar/delete-word
|
||||
ttychar/reprint
|
||||
ttychar/lnext
|
||||
ttychar/literal-next
|
||||
ttychar/discard
|
||||
ttychar/dsusp
|
||||
ttychar/delayed-suspend
|
||||
ttychar/eol2
|
||||
|
||||
;; 4.3+BSD
|
||||
|
@ -763,7 +763,7 @@
|
|||
ttyin/ignore-bad-parity-chars
|
||||
ttyin/mark-parity-errors
|
||||
ttyin/check-parity
|
||||
ttyin/strip-bit-8
|
||||
ttyin/7bits
|
||||
ttyin/nl->cr
|
||||
ttyin/ignore-cr
|
||||
ttyin/cr->nl
|
||||
|
@ -826,7 +826,7 @@
|
|||
ttyout/bs-delay1
|
||||
|
||||
;; Form-feed delay
|
||||
ttout/ff-delay ; mask (ffdly)
|
||||
ttyout/ff-delay ; mask (ffdly)
|
||||
ttyout/ff-delay0
|
||||
ttyout/ff-delay1
|
||||
|
||||
|
@ -857,8 +857,8 @@
|
|||
;; Local flag bits
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
;; POSIX
|
||||
ttyl/visual-erase ; echoe: Visually erase chars
|
||||
ttyl/echo-line-kill ; echok: Echo nl after line kill
|
||||
ttyl/visual-delete ; echoe: Visually erase chars
|
||||
ttyl/echo-delete-line ; echok: Echo nl after line kill
|
||||
ttyl/echo ; echo: Enable echoing
|
||||
ttyl/echo-nl ; echonl: Echo nl even if echo is off
|
||||
ttyl/canonical ; icanon: Canonicalize input
|
||||
|
@ -868,14 +868,14 @@
|
|||
ttyl/no-flush-on-interrupt ; noflsh
|
||||
|
||||
;; SVR4 & 4.3+BSD
|
||||
ttyl/visual-line-kill ; echoke: visually erase a line-kill
|
||||
ttyl/hardcopy-erase ; echoprt: visual erase for hardcopy
|
||||
ttyl/visual-delete-line ; echoke: visually erase a line-kill
|
||||
ttyl/hardcopy-delete ; echoprt: visual erase for hardcopy
|
||||
ttyl/echo-ctl ; echoctl: echo control chars as "^X"
|
||||
ttyl/flush-output ; flusho: output is being flushed
|
||||
ttyl/reprint-unread-chars ; pendin: retype pending input
|
||||
|
||||
;; 4.3+BSD
|
||||
ttyl/alt-word-erase ; altwerase
|
||||
ttyl/alt-delete-word ; altwerase
|
||||
ttyl/no-kernel-status ; nokerninfo: no kernel status on ^T
|
||||
|
||||
;; SVR4
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
/* This is an Scheme48/C interface file,
|
||||
** automatically generated by cig.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* For malloc. */
|
||||
#include "libcig.h"
|
||||
|
||||
#include <termios.h>
|
||||
|
||||
extern int errno;
|
||||
|
||||
#define errno_or_false(x) (((x) == -1) ? ENTER_FIXNUM(errno) : SCHFALSE)
|
||||
scheme_value df_scheme_tcgetattr(long nargs, scheme_value *args)
|
||||
{
|
||||
extern int scheme_tcgetattr(int , const char *, int *, int *, int *, int *, int *, int *, int *, int *, int *, int *);
|
||||
scheme_value ret1;
|
||||
int r1;
|
||||
int r2;
|
||||
int r3;
|
||||
int r4;
|
||||
int r5;
|
||||
int r6;
|
||||
int r7;
|
||||
int r8;
|
||||
int r9;
|
||||
int r10;
|
||||
int r11;
|
||||
|
||||
cig_check_nargs(3, nargs, "scheme_tcgetattr");
|
||||
r1 = scheme_tcgetattr(EXTRACT_FIXNUM(args[2]), cig_string_body(args[1]), &r2, &r3, &r4, &r5, &r6, &r7, &r8, &r9, &r10, &r11);
|
||||
ret1 = errno_or_false(r1);
|
||||
VECTOR_REF(*args,0) = ENTER_FIXNUM(r2);
|
||||
VECTOR_REF(*args,1) = ENTER_FIXNUM(r3);
|
||||
VECTOR_REF(*args,2) = ENTER_FIXNUM(r4);
|
||||
VECTOR_REF(*args,3) = ENTER_FIXNUM(r5);
|
||||
VECTOR_REF(*args,4) = ENTER_FIXNUM(r6);
|
||||
VECTOR_REF(*args,5) = ENTER_FIXNUM(r7);
|
||||
VECTOR_REF(*args,6) = ENTER_FIXNUM(r8);
|
||||
VECTOR_REF(*args,7) = ENTER_FIXNUM(r9);
|
||||
VECTOR_REF(*args,8) = ENTER_FIXNUM(r10);
|
||||
VECTOR_REF(*args,9) = ENTER_FIXNUM(r11);
|
||||
return ret1;
|
||||
}
|
||||
|
||||
scheme_value df_scheme_tcsetattr(long nargs, scheme_value *args)
|
||||
{
|
||||
extern int scheme_tcsetattr(int , int , const char *, int , int , int , int , int , int , int , int , int , int , int , int );
|
||||
scheme_value ret1;
|
||||
int r1;
|
||||
|
||||
cig_check_nargs(15, nargs, "scheme_tcsetattr");
|
||||
r1 = scheme_tcsetattr(EXTRACT_FIXNUM(args[14]), EXTRACT_FIXNUM(args[13]), cig_string_body(args[12]), EXTRACT_FIXNUM(args[11]), EXTRACT_FIXNUM(args[10]), EXTRACT_FIXNUM(args[9]), EXTRACT_FIXNUM(args[8]), EXTRACT_FIXNUM(args[7]), EXTRACT_FIXNUM(args[6]), EXTRACT_FIXNUM(args[5]), EXTRACT_FIXNUM(args[4]), EXTRACT_FIXNUM(args[3]), EXTRACT_FIXNUM(args[2]), EXTRACT_FIXNUM(args[1]), EXTRACT_FIXNUM(args[0]));
|
||||
ret1 = errno_or_false(r1);
|
||||
return ret1;
|
||||
}
|
||||
|
||||
scheme_value df_tcsendbreak(long nargs, scheme_value *args)
|
||||
{
|
||||
extern int tcsendbreak(int , int );
|
||||
scheme_value ret1;
|
||||
int r1;
|
||||
|
||||
cig_check_nargs(2, nargs, "tcsendbreak");
|
||||
r1 = tcsendbreak(EXTRACT_FIXNUM(args[1]), EXTRACT_FIXNUM(args[0]));
|
||||
ret1 = errno_or_false(r1);
|
||||
return ret1;
|
||||
}
|
||||
|
||||
scheme_value df_tcdrain(long nargs, scheme_value *args)
|
||||
{
|
||||
extern int tcdrain(int );
|
||||
scheme_value ret1;
|
||||
int r1;
|
||||
|
||||
cig_check_nargs(1, nargs, "tcdrain");
|
||||
r1 = tcdrain(EXTRACT_FIXNUM(args[0]));
|
||||
ret1 = errno_or_false(r1);
|
||||
return ret1;
|
||||
}
|
||||
|
||||
scheme_value df_tcflush(long nargs, scheme_value *args)
|
||||
{
|
||||
extern int tcflush(int , int );
|
||||
scheme_value ret1;
|
||||
int r1;
|
||||
|
||||
cig_check_nargs(2, nargs, "tcflush");
|
||||
r1 = tcflush(EXTRACT_FIXNUM(args[1]), EXTRACT_FIXNUM(args[0]));
|
||||
ret1 = errno_or_false(r1);
|
||||
return ret1;
|
||||
}
|
||||
|
||||
scheme_value df_tcflow(long nargs, scheme_value *args)
|
||||
{
|
||||
extern int tcflow(int , int );
|
||||
scheme_value ret1;
|
||||
int r1;
|
||||
|
||||
cig_check_nargs(2, nargs, "tcflow");
|
||||
r1 = tcflow(EXTRACT_FIXNUM(args[1]), EXTRACT_FIXNUM(args[0]));
|
||||
ret1 = errno_or_false(r1);
|
||||
return ret1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue