Replaced // comments.
This commit is contained in:
parent
fbb912c9eb
commit
2da600ffbb
14
c/external.c
14
c/external.c
|
@ -762,7 +762,7 @@ s48_enter_unsigned_integer(unsigned long value)
|
||||||
|
|
||||||
return s48_call_scheme(S48_SHARED_BINDING_REF(long_to_bignum_binding),
|
return s48_call_scheme(S48_SHARED_BINDING_REF(long_to_bignum_binding),
|
||||||
3,
|
3,
|
||||||
S48_FALSE, // this is ok
|
S48_FALSE, /* this is ok */
|
||||||
S48_UNSAFE_ENTER_FIXNUM(value >> 16),
|
S48_UNSAFE_ENTER_FIXNUM(value >> 16),
|
||||||
S48_UNSAFE_ENTER_FIXNUM(value & 0xFFFF));
|
S48_UNSAFE_ENTER_FIXNUM(value & 0xFFFF));
|
||||||
}
|
}
|
||||||
|
@ -1089,14 +1089,14 @@ s48_length(s48_value list)
|
||||||
return S48_UNSAFE_ENTER_FIXNUM(i);
|
return S48_UNSAFE_ENTER_FIXNUM(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
/*
|
||||||
//
|
**
|
||||||
// Support for libscsh.a: add external initializers without the Makefile
|
** Support for libscsh.a: add external initializers without the Makefile
|
||||||
//
|
**
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
*/
|
||||||
|
|
||||||
struct simple_list{
|
struct simple_list{
|
||||||
void (*init)(); // pointer to init-function
|
void (*init)(); /* pointer to init-function */
|
||||||
struct simple_list* next;
|
struct simple_list* next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
2
c/init.c
2
c/init.c
|
@ -10,7 +10,7 @@
|
||||||
extern void s48_sysdep_init(void);
|
extern void s48_sysdep_init(void);
|
||||||
extern void s48_initialize_external_modules(void);
|
extern void s48_initialize_external_modules(void);
|
||||||
|
|
||||||
// JMG: s48_object_file is obsolete according to s48 manual
|
/* JMG: s48_object_file is obsolete according to s48 manual */
|
||||||
char *s48_object_file; /* specified via a command line argument */
|
char *s48_object_file; /* specified via a command line argument */
|
||||||
|
|
||||||
char *s48_reloc_file; /* dynamic loading will set this */
|
char *s48_reloc_file; /* dynamic loading will set this */
|
||||||
|
|
2
c/main.c
2
c/main.c
|
@ -46,7 +46,7 @@ int
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc; char **argv;
|
int argc; char **argv;
|
||||||
{
|
{
|
||||||
char **argp; //JMG
|
char **argp; /* JMG */
|
||||||
char *image_name = DEFAULT_IMAGE_NAME;
|
char *image_name = DEFAULT_IMAGE_NAME;
|
||||||
long heap_size = DEFAULT_HEAP_SIZE; /* in numbers of cells */
|
long heap_size = DEFAULT_HEAP_SIZE; /* in numbers of cells */
|
||||||
long stack_size = DEFAULT_STACK_SIZE; /* in numbers of cells */
|
long stack_size = DEFAULT_STACK_SIZE; /* in numbers of cells */
|
||||||
|
|
|
@ -26,7 +26,7 @@ static void when_keyboard_interrupt();
|
||||||
static void when_alarm_interrupt();
|
static void when_alarm_interrupt();
|
||||||
static void when_sigpipe_interrupt();
|
static void when_sigpipe_interrupt();
|
||||||
|
|
||||||
//JMG:
|
/* JMG:*/
|
||||||
static void when_scsh_interrupt();
|
static void when_scsh_interrupt();
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ s48_sysdep_init(void)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//JMG: for scsh
|
/* JMG: for scsh */
|
||||||
s48_setcatcher(SIGCHLD, when_scsh_interrupt);
|
s48_setcatcher(SIGCHLD, when_scsh_interrupt);
|
||||||
s48_setcatcher(SIGCONT, when_scsh_interrupt);
|
s48_setcatcher(SIGCONT, when_scsh_interrupt);
|
||||||
s48_setcatcher(SIGHUP, when_scsh_interrupt);
|
s48_setcatcher(SIGHUP, when_scsh_interrupt);
|
||||||
|
@ -101,9 +101,9 @@ s48_setcatcher(int signum, void (*catcher)(int))
|
||||||
fprintf(stderr, "Failed to get sigaction for signal %d\n", signum);
|
fprintf(stderr, "Failed to get sigaction for signal %d\n", signum);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
// JMG: what's the point of not setting the handler in this case?
|
/* JMG: what's the point of not setting the handler in this case?
|
||||||
// if (sa.sa_handler == SIG_IGN)
|
if (sa.sa_handler == SIG_IGN)
|
||||||
// return (TRUE);
|
return (TRUE);*/
|
||||||
sa.sa_handler = catcher;
|
sa.sa_handler = catcher;
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = 0;
|
||||||
|
@ -333,7 +333,7 @@ s48_get_next_event(long *ready_fd, long *status)
|
||||||
/* fprintf(stderr, "[alarm]\n"); */
|
/* fprintf(stderr, "[alarm]\n"); */
|
||||||
return (ALARM_EVENT);
|
return (ALARM_EVENT);
|
||||||
}
|
}
|
||||||
//JMG: scsh should handle this
|
/* JMG: scsh should handle this */
|
||||||
if (s48_os_signal_pending())
|
if (s48_os_signal_pending())
|
||||||
return (OS_SIGNAL_EVENT);
|
return (OS_SIGNAL_EVENT);
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ queue_ready_ports(bool wait, long seconds, long ticks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//JMG: for scsh
|
/* JMG: for scsh */
|
||||||
static long interrupt_count[32];
|
static long interrupt_count[32];
|
||||||
|
|
||||||
static void when_scsh_interrupt(int signo)
|
static void when_scsh_interrupt(int signo)
|
||||||
|
|
|
@ -186,12 +186,12 @@
|
||||||
;;; Emit C code to copy a C string into its carrier.
|
;;; Emit C code to copy a C string into its carrier.
|
||||||
(define (str-and-len->carrier carrier str)
|
(define (str-and-len->carrier carrier str)
|
||||||
(format #f
|
(format #f
|
||||||
"SetAlienVal(S48_CAR(~a),(long) ~a); S48_SET_CDR(~a,strlen_or_false(~a));//str-and-len"
|
"SetAlienVal(S48_CAR(~a),(long) ~a); S48_SET_CDR(~a,strlen_or_false(~a));"
|
||||||
carrier str carrier str))
|
carrier str carrier str))
|
||||||
|
|
||||||
;;; Carrier and assignment-generator for alien values:
|
;;; Carrier and assignment-generator for alien values:
|
||||||
(define (simple-assign carrier val)
|
(define (simple-assign carrier val)
|
||||||
(format #f "SetAlienVal(~a,(long) ~a);//simple-assign" carrier val)) ;;JMG: untested
|
(format #f "SetAlienVal(~a,(long) ~a);" carrier val)) ;;JMG: untested
|
||||||
|
|
||||||
;;; Note: When MAKE-CARRIER and S-CVTR fields are taken from this table,
|
;;; Note: When MAKE-CARRIER and S-CVTR fields are taken from this table,
|
||||||
;;; they are symbols that are syntactically closed in the macro expander's
|
;;; they are symbols that are syntactically closed in the macro expander's
|
||||||
|
|
10
cig/libcig.h
10
cig/libcig.h
|
@ -5,20 +5,20 @@
|
||||||
#define StobData(x) (S48_ADDRESS_AFTER_HEADER(x, s48_value))
|
#define StobData(x) (S48_ADDRESS_AFTER_HEADER(x, s48_value))
|
||||||
|
|
||||||
#define IsChar(x) ((((long) x) & 0xff) == S48_CHAR)
|
#define IsChar(x) ((((long) x) & 0xff) == S48_CHAR)
|
||||||
//JMG: untested !!
|
/* JMG: untested !! */
|
||||||
|
|
||||||
#define StrByte(x, i) ((i) + S48_ADDRESS_AFTER_HEADER((x), char))
|
#define StrByte(x, i) ((i) + S48_ADDRESS_AFTER_HEADER((x), char))
|
||||||
#define cig_string_body(x) (S48_ADDRESS_AFTER_HEADER((x), char))
|
#define cig_string_body(x) (S48_ADDRESS_AFTER_HEADER((x), char))
|
||||||
|
|
||||||
#define AlienVal(x) (S48_STOB_REF((x),0))
|
#define AlienVal(x) (S48_STOB_REF((x),0))
|
||||||
//JMG: no () around this, because it's a do..while(0)
|
/* JMG: no () around this, because it's a do..while(0) */
|
||||||
#define SetAlienVal(x, v) S48_STOB_SET((x), 0, (v))
|
#define SetAlienVal(x, v) S48_STOB_SET((x), 0, (v))
|
||||||
|
|
||||||
// JMG: some hacks to leave to old sources untouched
|
/* JMG: some hacks to leave to old sources untouched */
|
||||||
#define ENTER_BOOLEAN(x) (x ? S48_TRUE : S48_FALSE)
|
#define ENTER_BOOLEAN(x) (x ? S48_TRUE : S48_FALSE)
|
||||||
#define EXTRACT_BOOLEAN(x) ((x==S48_TRUE) ? 1 : 0)
|
#define EXTRACT_BOOLEAN(x) ((x==S48_TRUE) ? 1 : 0)
|
||||||
//#define ENTER_FIXNUM(x) (s48_enter_fixnum(x))
|
/* #define ENTER_FIXNUM(x) (s48_enter_fixnum(x)) */
|
||||||
//#define SCHFALSE S48_FALSE
|
/* #define SCHFALSE S48_FALSE */
|
||||||
|
|
||||||
extern char *scheme2c_strcpy(s48_value sstr);
|
extern char *scheme2c_strcpy(s48_value sstr);
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ void set_strvec_carriers(s48_value svec, char const * const * cvec)
|
||||||
char const * const * cv = cvec;
|
char const * const * cv = cvec;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
// JMG: now using normal array access, instead of pointer++ on a s48_value
|
/* JMG: now using normal array access, instead of pointer++ on a s48_value */
|
||||||
for(; svec_len > 0; i++, cv++, svec_len-- ) {
|
for(; svec_len > 0; i++, cv++, svec_len-- ) {
|
||||||
s48_value carrier, alien;
|
s48_value carrier, alien;
|
||||||
int strl;
|
int strl;
|
||||||
|
|
|
@ -169,7 +169,7 @@ s48_value scheme_accept(s48_value sockfd_tagged, s48_value family)
|
||||||
{
|
{
|
||||||
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
||||||
s48_raise_os_error_2(errno, sockfd_tagged, family);
|
s48_raise_os_error_2(errno, sockfd_tagged, family);
|
||||||
if (! s48_add_pending_fd(sockfd, 1))// 1 for is_input
|
if (! s48_add_pending_fd(sockfd, 1))/* 1 for is_input */
|
||||||
s48_raise_out_of_memory_error();
|
s48_raise_out_of_memory_error();
|
||||||
return S48_FALSE;
|
return S48_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ s48_value scheme_accept(s48_value sockfd_tagged, s48_value family)
|
||||||
{
|
{
|
||||||
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
||||||
s48_raise_os_error_2(errno, sockfd_tagged, family);
|
s48_raise_os_error_2(errno, sockfd_tagged, family);
|
||||||
if (! s48_add_pending_fd(sockfd, 1))// 1 for is_input
|
if (! s48_add_pending_fd(sockfd, 1))/* 1 for is_input */
|
||||||
s48_raise_out_of_memory_error();
|
s48_raise_out_of_memory_error();
|
||||||
return S48_FALSE;
|
return S48_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ recv_substring(s48_value scm_sockfd, s48_value flags, s48_value buf,
|
||||||
|
|
||||||
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN))
|
||||||
s48_raise_os_error_5(errno, scm_sockfd, flags, buf, scm_start, scm_end);
|
s48_raise_os_error_5(errno, scm_sockfd, flags, buf, scm_start, scm_end);
|
||||||
if (! s48_add_pending_fd(sockfd, 1))// 1 for is_input
|
if (! s48_add_pending_fd(sockfd, 1))/* 1 for is_input */
|
||||||
s48_raise_out_of_memory_error();
|
s48_raise_out_of_memory_error();
|
||||||
return S48_FALSE;
|
return S48_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ s48_value send_substring(s48_value scm_sockfd,
|
||||||
scm_family,
|
scm_family,
|
||||||
scheme_name);
|
scheme_name);
|
||||||
|
|
||||||
if (! s48_add_pending_fd(s, 0))// 0 for is_input
|
if (! s48_add_pending_fd(s, 0))/* 0 for is_input */
|
||||||
s48_raise_out_of_memory_error();
|
s48_raise_out_of_memory_error();
|
||||||
|
|
||||||
return S48_FALSE;
|
return S48_FALSE;
|
||||||
|
@ -647,7 +647,7 @@ s48_value netent2net_info(struct netent *net)
|
||||||
s48_value scheme_net_address2net_info(s48_value net_addr)
|
s48_value scheme_net_address2net_info(s48_value net_addr)
|
||||||
{
|
{
|
||||||
struct netent *net;
|
struct netent *net;
|
||||||
// expects host byte order :
|
/* expects host byte order */
|
||||||
net=getnetbyaddr(s48_extract_unsigned_integer (net_addr),AF_INET);
|
net=getnetbyaddr(s48_extract_unsigned_integer (net_addr),AF_INET);
|
||||||
|
|
||||||
return netent2net_info (net);
|
return netent2net_info (net);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
#define scshint_alarm (0) /* S48 Unix SIGALRM signal */
|
#define scshint_alarm (0) /* S48 Unix SIGALRM signal */
|
||||||
#define scshint_keyboard (1) /* S48 Unix SIGINT signal */
|
#define scshint_keyboard (1) /* S48 Unix SIGINT signal */
|
||||||
// left out post-gc and i/o-completion
|
/* left out post-gc and i/o-completion */
|
||||||
#define scshint_chld (4) /* Interrupts from here down are */
|
#define scshint_chld (4) /* Interrupts from here down are */
|
||||||
#define scshint_cont (5) /* Unix signals. The last ten are */
|
#define scshint_cont (5) /* Unix signals. The last ten are */
|
||||||
#define scshint_hup (6) /* non-Posix, hence not necessarily */
|
#define scshint_hup (6) /* non-Posix, hence not necessarily */
|
||||||
|
|
|
@ -140,7 +140,7 @@ static int copyback_fdvec(s48_value portvec, fd_set *fdset)
|
||||||
for( i = -1; ++i < vlen; ) {
|
for( i = -1; ++i < vlen; ) {
|
||||||
s48_value elt = S48_VECTOR_REF(portvec, i);
|
s48_value elt = S48_VECTOR_REF(portvec, i);
|
||||||
int fd = s48_extract_fixnum((S48_FIXNUM_P(elt)) ? elt : (1 / 0));
|
int fd = s48_extract_fixnum((S48_FIXNUM_P(elt)) ? elt : (1 / 0));
|
||||||
//JMG *PortFd(elt));
|
/* JMG *PortFd(elt));*/
|
||||||
if( FD_ISSET(fd,fdset) ) {
|
if( FD_ISSET(fd,fdset) ) {
|
||||||
FD_CLR(fd,fdset); /* In case luser put elt in multiple times. */
|
FD_CLR(fd,fdset); /* In case luser put elt in multiple times. */
|
||||||
S48_VECTOR_SET(portvec, j, elt);
|
S48_VECTOR_SET(portvec, j, elt);
|
||||||
|
@ -163,7 +163,7 @@ static int clobber_inactives(s48_value portvec, fd_set *fdset)
|
||||||
while( --i >= 0 ) {
|
while( --i >= 0 ) {
|
||||||
s48_value elt = S48_VECTOR_REF(portvec, i);
|
s48_value elt = S48_VECTOR_REF(portvec, i);
|
||||||
if( elt != S48_FALSE ) {
|
if( elt != S48_FALSE ) {
|
||||||
int fd = s48_extract_fixnum((S48_FIXNUM_P(elt)) ? elt : (1/0)); //JMG *PortFd(elt));
|
int fd = s48_extract_fixnum((S48_FIXNUM_P(elt)) ? elt : (1/0)); /* JMG *PortFd(elt));*/
|
||||||
if( FD_ISSET(fd,fdset) ) {
|
if( FD_ISSET(fd,fdset) ) {
|
||||||
FD_CLR(fd,fdset); /* In case luser put elt in multiple times. */
|
FD_CLR(fd,fdset); /* In case luser put elt in multiple times. */
|
||||||
++count;
|
++count;
|
||||||
|
|
|
@ -116,8 +116,8 @@ s48_value scheme_exec(s48_value prog, s48_value argv, s48_value env)
|
||||||
Free(unix_env);
|
Free(unix_env);
|
||||||
}
|
}
|
||||||
Free(unix_argv);
|
Free(unix_argv);
|
||||||
return s48_enter_fixnum(e); // Don't raise an exception since
|
return s48_enter_fixnum(e); /* Don't raise an exception since
|
||||||
// we're maybe just testing the path
|
we're maybe just testing the path */
|
||||||
}
|
}
|
||||||
|
|
||||||
s48_value scsh_exit(s48_value status)
|
s48_value scsh_exit(s48_value status)
|
||||||
|
@ -651,7 +651,7 @@ s48_value get_groups()
|
||||||
if (veclen > 20) Free(gp);
|
if (veclen > 20) Free(gp);
|
||||||
s48_raise_os_error(errno);
|
s48_raise_os_error(errno);
|
||||||
}
|
}
|
||||||
else if (retval != veclen){ // paranoia...
|
else if (retval != veclen){ /* paranoia... */
|
||||||
get_groups();
|
get_groups();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -907,7 +907,7 @@ s48_value scm_crypt(s48_value key, s48_value salt)
|
||||||
char * ret = crypt (s48_extract_string (key),
|
char * ret = crypt (s48_extract_string (key),
|
||||||
s48_extract_string(salt));
|
s48_extract_string(salt));
|
||||||
|
|
||||||
// FreeBSD does this on error:
|
/* FreeBSD does this on error:*/
|
||||||
if (ret == NULL) return s48_enter_string("");
|
if (ret == NULL) return s48_enter_string("");
|
||||||
|
|
||||||
return s48_enter_string (ret);
|
return s48_enter_string (ret);
|
||||||
|
|
12
scsh/time1.c
12
scsh/time1.c
|
@ -46,7 +46,7 @@
|
||||||
#include "cstuff.h"
|
#include "cstuff.h"
|
||||||
#include "time1.h" /* Make sure the .h interface agrees with the code. */
|
#include "time1.h" /* Make sure the .h interface agrees with the code. */
|
||||||
|
|
||||||
#include <stdio.h> // JMG debug
|
#include <stdio.h> /* JMG debug */
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
|
@ -76,12 +76,12 @@ static char **make_newenv(s48_value zone, char *newenv[2])
|
||||||
|
|
||||||
char * extracted_zone = s48_extract_string(zone);
|
char * extracted_zone = s48_extract_string(zone);
|
||||||
|
|
||||||
// s48_value temp;
|
/* s48_value temp; */
|
||||||
if( !tz ) return NULL;
|
if( !tz ) return NULL;
|
||||||
strcpy(tz, "TZ=");
|
strcpy(tz, "TZ=");
|
||||||
|
|
||||||
// temp = S48_STRING_REF(zone,0); //JMG
|
/* temp = S48_STRING_REF(zone,0);*/ /* JMG */
|
||||||
// strncpy(tz+3, &temp, zonelen);
|
/* strncpy(tz+3, &temp, zonelen);*/
|
||||||
strncpy(tz+3, extracted_zone, zonelen);
|
strncpy(tz+3, extracted_zone, zonelen);
|
||||||
tz[zonelen+3] = '\0';
|
tz[zonelen+3] = '\0';
|
||||||
newenv[0] = tz;
|
newenv[0] = tz;
|
||||||
|
@ -113,7 +113,7 @@ s48_value scheme_time()
|
||||||
return s48_enter_integer (t);
|
return s48_enter_integer (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
// should be part of the FFI interface
|
/* should be part of the FFI interface */
|
||||||
s48_value s48_list_11 (s48_value e1, s48_value e2, s48_value e3,
|
s48_value s48_list_11 (s48_value e1, s48_value e2, s48_value e3,
|
||||||
s48_value e4, s48_value e5, s48_value e6,
|
s48_value e4, s48_value e5, s48_value e6,
|
||||||
s48_value e7, s48_value e8, s48_value e9,
|
s48_value e7, s48_value e8, s48_value e9,
|
||||||
|
@ -255,7 +255,7 @@ s48_value date2time(s48_value sec, s48_value min, s48_value hour,
|
||||||
t = mktime(&d);
|
t = mktime(&d);
|
||||||
/* t == -1 => you probably have an error. */
|
/* t == -1 => you probably have an error. */
|
||||||
if ((t == -1) && (errno != 0))
|
if ((t == -1) && (errno != 0))
|
||||||
// Sorry, we only have a version with 5 arguments...
|
/* Sorry, we only have a version with 5 arguments..*/
|
||||||
s48_raise_os_error_5 (errno, sec, min, hour, mday, month);
|
s48_raise_os_error_5 (errno, sec, min, hour, mday, month);
|
||||||
t -= s48_extract_fixnum(tz_secs);
|
t -= s48_extract_fixnum(tz_secs);
|
||||||
environ = oldenv;
|
environ = oldenv;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "tty1.h" /* Make sure the .h interface agrees with the code. */
|
#include "tty1.h" /* Make sure the .h interface agrees with the code. */
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// should be part of the FFI interface
|
/* should be part of the FFI interface */
|
||||||
s48_value s48_list_6 (s48_value e1, s48_value e2, s48_value e3,
|
s48_value s48_list_6 (s48_value e1, s48_value e2, s48_value e3,
|
||||||
s48_value e4, s48_value e5, s48_value e6)
|
s48_value e4, s48_value e5, s48_value e6)
|
||||||
{
|
{
|
||||||
|
@ -63,14 +63,14 @@ s48_value scheme_tcgetattr(s48_value sch_fd, s48_value sch_control_chars)
|
||||||
s48_enter_integer (cfgetospeed(&t)));
|
s48_enter_integer (cfgetospeed(&t)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Scheme caller of this is commented out...
|
/* The Scheme caller of this is commented out...*/
|
||||||
int scheme_tcgetattrB(int fd, char *control_chars, s48_value scmvec)
|
int scheme_tcgetattrB(int fd, char *control_chars, s48_value scmvec)
|
||||||
{
|
{
|
||||||
struct termios t;
|
struct termios t;
|
||||||
int result = tcgetattr(fd, &t);
|
int result = tcgetattr(fd, &t);
|
||||||
S48_DECLARE_GC_PROTECT(1);
|
S48_DECLARE_GC_PROTECT(1);
|
||||||
S48_GC_PROTECT_1(scmvec);
|
S48_GC_PROTECT_1(scmvec);
|
||||||
// JMG int *ivec = ADDRESS_AFTER_HEADER(scmvec, int);
|
/* JMG int *ivec = ADDRESS_AFTER_HEADER(scmvec, int);*/
|
||||||
|
|
||||||
if (result != -1) {
|
if (result != -1) {
|
||||||
memcpy(control_chars, t.c_cc, NCCS);
|
memcpy(control_chars, t.c_cc, NCCS);
|
||||||
|
|
Loading…
Reference in New Issue