git @ Cat's Eye Technologies minischeme / 28597aa
Add -e command line flag, and bump version number. Cat's Eye Technologies 13 years ago
2 changed file(s) with 15 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
88 it is simply to provide a modernized and generally backwards-compatible
99 source base for miniscm.
1010
11 The current version of this fork of Mini-Scheme is:
12
13 Version 0.85p1 (as yet unreleased)
14
1115 Some improvements that have been made:
1216
1317 - modernized Makefile (defaults to 4.3 BSD, which works for Linux)
1519 - made compilable under AmigaOS 1.3 with DICE C
1620 - added -q command line option to suppress all non-explicit output
1721 (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)
1824
1925 Some further improvements I might consider:
2026
1313 /*--
1414 *
1515 * This version has been modified by Chris Pressey.
16 * current version is 0.85p1 (as yet unreleased)
1617 *
1718 * This version has been modified by R.C. Secrist.
1819 *
103104
104105
105106
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"
107108
108109
109110 #include <stdio.h>
339340 #endif
340341 char gc_verbose; /* if gc_verbose is not zero, print gc status */
341342 int quiet = 0; /* if not zero, print banner, prompt, results */
343 int all_errors_fatal = 0; /* if not zero, every error is a FatalError */
342344
343345 /* allocate new cell segment */
344346 alloc_cellseg(n)
17941796 }
17951797 tmpfp = outfp;
17961798 outfp = stderr;
1799 if (all_errors_fatal) {
1800 FatalError(strvalue(car(args)));
1801 }
17971802 fprintf(outfp, "Error: ");
17981803 fprintf(outfp, "%s", strvalue(car(args)));
17991804 args = cdr(args);
24602465
24612466 #ifdef CMDLINE
24622467 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) {
24642471 quiet = 1;
24652472 }
24662473 }