diff --git a/c/external.c b/c/external.c index 67c4053..d6cf637 100644 --- a/c/external.c +++ b/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), 3, - S48_FALSE, // this is ok + S48_FALSE, /* this is ok */ S48_UNSAFE_ENTER_FIXNUM(value >> 16), S48_UNSAFE_ENTER_FIXNUM(value & 0xFFFF)); } @@ -1089,14 +1089,14 @@ s48_length(s48_value list) 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{ - void (*init)(); // pointer to init-function + void (*init)(); /* pointer to init-function */ struct simple_list* next; }; diff --git a/c/init.c b/c/init.c index 8a4f185..4b63075 100644 --- a/c/init.c +++ b/c/init.c @@ -10,7 +10,7 @@ extern void s48_sysdep_init(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_reloc_file; /* dynamic loading will set this */ diff --git a/c/main.c b/c/main.c index 2c44c4a..6d4c0e0 100644 --- a/c/main.c +++ b/c/main.c @@ -46,7 +46,7 @@ int main(argc, argv) int argc; char **argv; { - char **argp; //JMG + char **argp; /* JMG */ char *image_name = DEFAULT_IMAGE_NAME; long heap_size = DEFAULT_HEAP_SIZE; /* in numbers of cells */ long stack_size = DEFAULT_STACK_SIZE; /* in numbers of cells */ diff --git a/c/unix/event.c b/c/unix/event.c index fb46fd6..63a8fa0 100644 --- a/c/unix/event.c +++ b/c/unix/event.c @@ -26,7 +26,7 @@ static void when_keyboard_interrupt(); static void when_alarm_interrupt(); static void when_sigpipe_interrupt(); -//JMG: +/* JMG:*/ static void when_scsh_interrupt(); @@ -46,7 +46,7 @@ s48_sysdep_init(void) exit(1); } - //JMG: for scsh + /* JMG: for scsh */ s48_setcatcher(SIGCHLD, when_scsh_interrupt); s48_setcatcher(SIGCONT, 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); exit(1); } - // JMG: what's the point of not setting the handler in this case? - // if (sa.sa_handler == SIG_IGN) - // return (TRUE); + /* JMG: what's the point of not setting the handler in this case? + if (sa.sa_handler == SIG_IGN) + return (TRUE);*/ sa.sa_handler = catcher; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; @@ -333,7 +333,7 @@ s48_get_next_event(long *ready_fd, long *status) /* fprintf(stderr, "[alarm]\n"); */ return (ALARM_EVENT); } - //JMG: scsh should handle this + /* JMG: scsh should handle this */ if (s48_os_signal_pending()) 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 void when_scsh_interrupt(int signo) diff --git a/cig/cig.scm b/cig/cig.scm index 466785c..5d46356 100644 --- a/cig/cig.scm +++ b/cig/cig.scm @@ -186,12 +186,12 @@ ;;; Emit C code to copy a C string into its carrier. (define (str-and-len->carrier carrier str) (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 and assignment-generator for alien values: (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, ;;; they are symbols that are syntactically closed in the macro expander's diff --git a/cig/libcig.h b/cig/libcig.h index b0a30e7..9f5bb45 100644 --- a/cig/libcig.h +++ b/cig/libcig.h @@ -5,20 +5,20 @@ #define StobData(x) (S48_ADDRESS_AFTER_HEADER(x, s48_value)) #define IsChar(x) ((((long) x) & 0xff) == S48_CHAR) -//JMG: untested !! +/* JMG: untested !! */ #define StrByte(x, i) ((i) + 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)) -//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)) -// 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 EXTRACT_BOOLEAN(x) ((x==S48_TRUE) ? 1 : 0) -//#define ENTER_FIXNUM(x) (s48_enter_fixnum(x)) -//#define SCHFALSE S48_FALSE +/* #define ENTER_FIXNUM(x) (s48_enter_fixnum(x)) */ +/* #define SCHFALSE S48_FALSE */ extern char *scheme2c_strcpy(s48_value sstr); diff --git a/cig/libcig1.c b/cig/libcig1.c index c8a22c5..f312500 100644 --- a/cig/libcig1.c +++ b/cig/libcig1.c @@ -127,7 +127,7 @@ void set_strvec_carriers(s48_value svec, char const * const * cvec) char const * const * cv = cvec; 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-- ) { s48_value carrier, alien; int strl; diff --git a/scsh/network1.c b/scsh/network1.c index 4662857..3eaddb5 100644 --- a/scsh/network1.c +++ b/scsh/network1.c @@ -169,7 +169,7 @@ s48_value scheme_accept(s48_value sockfd_tagged, s48_value family) { if ((errno != EWOULDBLOCK) && (errno != EINTR) && (errno != EAGAIN)) 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(); 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)) 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(); 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)) 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(); return S48_FALSE; } @@ -400,7 +400,7 @@ s48_value send_substring(s48_value scm_sockfd, scm_family, 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(); return S48_FALSE; @@ -647,7 +647,7 @@ s48_value netent2net_info(struct netent *net) s48_value scheme_net_address2net_info(s48_value net_addr) { struct netent *net; - // expects host byte order : + /* expects host byte order */ net=getnetbyaddr(s48_extract_unsigned_integer (net_addr),AF_INET); return netent2net_info (net); diff --git a/scsh/scsh_aux.h b/scsh/scsh_aux.h index 774c20c..1af5425 100644 --- a/scsh/scsh_aux.h +++ b/scsh/scsh_aux.h @@ -16,7 +16,7 @@ */ #define scshint_alarm (0) /* S48 Unix SIGALRM 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_cont (5) /* Unix signals. The last ten are */ #define scshint_hup (6) /* non-Posix, hence not necessarily */ diff --git a/scsh/select1.c b/scsh/select1.c index 7c29f95..984af8e 100644 --- a/scsh/select1.c +++ b/scsh/select1.c @@ -140,7 +140,7 @@ static int copyback_fdvec(s48_value portvec, fd_set *fdset) for( i = -1; ++i < vlen; ) { s48_value elt = S48_VECTOR_REF(portvec, i); int fd = s48_extract_fixnum((S48_FIXNUM_P(elt)) ? elt : (1 / 0)); - //JMG *PortFd(elt)); + /* JMG *PortFd(elt));*/ if( FD_ISSET(fd,fdset) ) { FD_CLR(fd,fdset); /* In case luser put elt in multiple times. */ S48_VECTOR_SET(portvec, j, elt); @@ -163,7 +163,7 @@ static int clobber_inactives(s48_value portvec, fd_set *fdset) while( --i >= 0 ) { s48_value elt = S48_VECTOR_REF(portvec, i); 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) ) { FD_CLR(fd,fdset); /* In case luser put elt in multiple times. */ ++count; diff --git a/scsh/syscalls1.c b/scsh/syscalls1.c index be40c8d..df6b08d 100644 --- a/scsh/syscalls1.c +++ b/scsh/syscalls1.c @@ -116,8 +116,8 @@ s48_value scheme_exec(s48_value prog, s48_value argv, s48_value env) Free(unix_env); } Free(unix_argv); - return s48_enter_fixnum(e); // Don't raise an exception since - // we're maybe just testing the path + return s48_enter_fixnum(e); /* Don't raise an exception since + we're maybe just testing the path */ } s48_value scsh_exit(s48_value status) @@ -651,7 +651,7 @@ s48_value get_groups() if (veclen > 20) Free(gp); s48_raise_os_error(errno); } - else if (retval != veclen){ // paranoia... + else if (retval != veclen){ /* paranoia... */ get_groups(); } else{ @@ -907,7 +907,7 @@ s48_value scm_crypt(s48_value key, s48_value salt) char * ret = crypt (s48_extract_string (key), s48_extract_string(salt)); - // FreeBSD does this on error: + /* FreeBSD does this on error:*/ if (ret == NULL) return s48_enter_string(""); return s48_enter_string (ret); diff --git a/scsh/time1.c b/scsh/time1.c index fd6fd73..ee5acd7 100644 --- a/scsh/time1.c +++ b/scsh/time1.c @@ -46,7 +46,7 @@ #include "cstuff.h" #include "time1.h" /* Make sure the .h interface agrees with the code. */ -#include // JMG debug +#include /* JMG debug */ extern char **environ; @@ -76,12 +76,12 @@ static char **make_newenv(s48_value zone, char *newenv[2]) char * extracted_zone = s48_extract_string(zone); - // s48_value temp; + /* s48_value temp; */ if( !tz ) return NULL; strcpy(tz, "TZ="); - // temp = S48_STRING_REF(zone,0); //JMG - // strncpy(tz+3, &temp, zonelen); + /* temp = S48_STRING_REF(zone,0);*/ /* JMG */ + /* strncpy(tz+3, &temp, zonelen);*/ strncpy(tz+3, extracted_zone, zonelen); tz[zonelen+3] = '\0'; newenv[0] = tz; @@ -113,7 +113,7 @@ s48_value scheme_time() 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 e4, s48_value e5, s48_value e6, 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 == -1 => you probably have an error. */ 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); t -= s48_extract_fixnum(tz_secs); environ = oldenv; diff --git a/scsh/tty1.c b/scsh/tty1.c index 50e27df..58559d8 100644 --- a/scsh/tty1.c +++ b/scsh/tty1.c @@ -29,7 +29,7 @@ #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 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))); } -// 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) { struct termios t; int result = tcgetattr(fd, &t); S48_DECLARE_GC_PROTECT(1); S48_GC_PROTECT_1(scmvec); - // JMG int *ivec = ADDRESS_AFTER_HEADER(scmvec, int); + /* JMG int *ivec = ADDRESS_AFTER_HEADER(scmvec, int);*/ if (result != -1) { memcpy(control_chars, t.c_cc, NCCS);