Add -e command line flag, and bump version number.
Cat's Eye Technologies
13 years ago
8 | 8 |
it is simply to provide a modernized and generally backwards-compatible
|
9 | 9 |
source base for miniscm.
|
10 | 10 |
|
|
11 |
The current version of this fork of Mini-Scheme is:
|
|
12 |
|
|
13 |
Version 0.85p1 (as yet unreleased)
|
|
14 |
|
11 | 15 |
Some improvements that have been made:
|
12 | 16 |
|
13 | 17 |
- modernized Makefile (defaults to 4.3 BSD, which works for Linux)
|
|
15 | 19 |
- made compilable under AmigaOS 1.3 with DICE C
|
16 | 20 |
- added -q command line option to suppress all non-explicit output
|
17 | 21 |
(this includes the prompt; if you want output, use (display))
|
|
22 |
- added -e command line option to cause all errors to be treated
|
|
23 |
as fatal errors (exit interpreter immediately with error code 1)
|
18 | 24 |
|
19 | 25 |
Some further improvements I might consider:
|
20 | 26 |
|
13 | 13 |
/*--
|
14 | 14 |
*
|
15 | 15 |
* This version has been modified by Chris Pressey.
|
|
16 |
* current version is 0.85p1 (as yet unreleased)
|
16 | 17 |
*
|
17 | 18 |
* This version has been modified by R.C. Secrist.
|
18 | 19 |
*
|
|
103 | 104 |
|
104 | 105 |
|
105 | 106 |
|
106 | |
#define banner "Hello, This is Mini-Scheme Interpreter Version 0.85k4-a.\n"
|
|
107 |
#define banner "Hello, This is Mini-Scheme Interpreter Version 0.85p1.\n"
|
107 | 108 |
|
108 | 109 |
|
109 | 110 |
#include <stdio.h>
|
|
339 | 340 |
#endif
|
340 | 341 |
char gc_verbose; /* if gc_verbose is not zero, print gc status */
|
341 | 342 |
int quiet = 0; /* if not zero, print banner, prompt, results */
|
|
343 |
int all_errors_fatal = 0; /* if not zero, every error is a FatalError */
|
342 | 344 |
|
343 | 345 |
/* allocate new cell segment */
|
344 | 346 |
alloc_cellseg(n)
|
|
1794 | 1796 |
}
|
1795 | 1797 |
tmpfp = outfp;
|
1796 | 1798 |
outfp = stderr;
|
|
1799 |
if (all_errors_fatal) {
|
|
1800 |
FatalError(strvalue(car(args)));
|
|
1801 |
}
|
1797 | 1802 |
fprintf(outfp, "Error: ");
|
1798 | 1803 |
fprintf(outfp, "%s", strvalue(car(args)));
|
1799 | 1804 |
args = cdr(args);
|
|
2460 | 2465 |
|
2461 | 2466 |
#ifdef CMDLINE
|
2462 | 2467 |
for (i = 1; i < argc; i++) {
|
2463 | |
if (strcmp(argv[i], "-q") == 0) {
|
|
2468 |
if (strcmp(argv[i], "-e") == 0) {
|
|
2469 |
all_errors_fatal = 1;
|
|
2470 |
} else if (strcmp(argv[i], "-q") == 0) {
|
2464 | 2471 |
quiet = 1;
|
2465 | 2472 |
}
|
2466 | 2473 |
}
|