aboutsummaryrefslogtreecommitdiffstats
path: root/scm.c
diff options
context:
space:
mode:
Diffstat (limited to 'scm.c')
-rw-r--r--scm.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/scm.c b/scm.c
index 90b14a1..dc0ad7b 100644
--- a/scm.c
+++ b/scm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1990-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1990-2006 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@
#include "patchlvl.h"
#ifdef _WIN32
-#include <io.h>
+# include <io.h>
#endif
#ifdef __IBMC__
@@ -111,7 +111,7 @@ void final_repl P((void));
void init_banner()
{
- fputs("SCM version "SCMVERSION", Copyright (C) 1990-2002 \
+ fputs("SCM version "SCMVERSION", Copyright (C) 1990-2006 \
Free Software Foundation.\n\
SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'.\n\
This is free software, and you are welcome to redistribute it\n\
@@ -175,19 +175,22 @@ SCM scm_init_extensions()
#endif
#define SIGNAL_BASE HUP_SIGNAL
-#define NUM_SIGNALS (sizeof(sigdesc)/sizeof(sigdesc[0]))
/* PROF_SIGNAL appears below because it is the last signal
defined in scm.h and in errmsgs in repl.c */
static struct {
int signo; SIGRETTYPE (*osig)(); SIGRETTYPE (*nsig)();
} sigdesc[PROF_SIGNAL - SIGNAL_BASE + 1];
+
+#define NUM_SIGNALS (sizeof(sigdesc)/sizeof(sigdesc[0]))
+
void process_signals()
{
int i, n;
unsigned long mask = 1L;
+ /* printf("process_signals; output_deferred=%d\n", output_deferred); fflush(stdout); */
if (output_deferred) {
output_deferred = 0;
- lflush(sys_errp);
+ /* if (NIMP(sys_errp) && OPOUTPORTP(sys_errp)) lfflush(sys_errp); */
}
for (n = 0; SIG_deferred && n < NUM_SIGNALS; n++) {
if (SIG_deferred & mask) {
@@ -289,11 +292,10 @@ static SIGRETTYPE scmable_signal(sig)
if (sig == sigdesc[i].signo) break;
ASRTER(i >= 0, MAKINUM(sig), s_unksig, "");
#ifdef WINSIGNALS
- if (SIGINT == sig)
- signal(sig, win32_sigint);
+ if (SIGINT == sig) signal(sig, win32_sigint);
else
#endif
- signal(sig, scmable_signal);
+ signal(sig, scmable_signal);
if (ints_disabled) {
deferred_proc = process_signals;
SIG_deferred |= (1L << i);
@@ -503,6 +505,7 @@ SCM lticks(i)
static SIGRETTYPE (*oldpipe) ();
#endif
+int case_sensitize_symbols = 0; /* set to 8 to read case-sensitive symbols */
int dumped = 0; /* Is this an invocation of unexec exe? */
#ifdef SHORT_ALIGN
@@ -684,20 +687,16 @@ void scm_init_from_argv(argc, argv, script_arg, iverbose, buf0stdin)
int buf0stdin;
{
long i = 0L;
- if ((2 <= argc) && argv[1] && (0==strncmp("-a", argv[1], 2))) {
- const char *str = (0==argv[1][2] && 3 <= argc && argv[2]) ?argv[2]:&argv[1][2];
- do {
- switch (*str) {
- case DIGITS:
- i = i * 10 + (*str - '0');
- if (i <= 10000L) continue; /* the size limit should match Init.scm */
- default:
- i = 0L;
- }
+ int j = 0;
+ if ((2 <= argc) && argv[1] && (0==strncmp("-a", argv[1], 2)))
+ i = atol((0==argv[1][2] && 3 <= argc && argv[2]) ? argv[2] : &argv[1][2]);
+ init_scm(iverbose, buf0stdin, (0 >= i) ? 0L : 1024L * i); /* size in kB */
+ for (j = 0; argv[j]; j++) {
+ if (0==strcmp(argv[j], "--no-symbol-case-fold")) {
+ case_sensitize_symbols = 8;
break;
- } while (* ++str);
+ }
}
- init_scm(iverbose, buf0stdin, (0 >= i) ? 0L : 1024L * i); /* size in kB */
progargs = EOL;
progargs = makfromstrs(argc, argv);
sysintern("*script*", script_arg ? makfrom0str(script_arg) : BOOL_F);