Add primitive EXIT-WITH-VALUE that takes an integer value as argument.
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Mon, 26 Aug 1991 15:00:24 +0000 (15:00 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Mon, 26 Aug 1991 15:00:24 +0000 (15:00 +0000)
ANSIdecl-ify various primitive procedure utilities in prims.h.

v7/src/microcode/debug.c
v7/src/microcode/extern.h
v7/src/microcode/osscheme.h
v7/src/microcode/prims.h
v7/src/microcode/sysprim.c
v7/src/microcode/term.c
v7/src/microcode/uxsig.c
v7/src/microcode/version.h
v8/src/microcode/version.h

index dc97edf2153ba01a72e0786d5f23e56a1266a5fb..0b78efda68d62d47b6764e57b0c2c48da3c30470 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/debug.c,v 9.37 1990/08/16 08:42:15 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/debug.c,v 9.38 1991/08/26 15:00:09 arthur Exp $
 
 Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology
 
@@ -1002,7 +1002,7 @@ DEFUN_VOID (debug_edit_flags)
             return;
           case 'h':
           case 'H':
-            termination_normal ();
+            termination_normal (0);
           case '?':
           default:
             show_flags (1);
index 5aa4dbfa4d55e9c86606e3fa4a3e9f8dc03574af..2b266e925212355928ceba55e3aaafbeb68ebbdc 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/extern.h,v 9.40 1991/03/01 00:54:24 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/extern.h,v 9.41 1991/08/26 15:00:11 arthur Exp $
 
 Copyright (c) 1987-91 Massachusetts Institute of Technology
 
@@ -225,7 +225,7 @@ extern Boolean Pure_Test ();
 /* Interpreter utilities */
 
 extern void EXFUN (Microcode_Termination, (int code));
-extern void EXFUN (termination_normal, (void));
+extern void EXFUN (termination_normal, (int));
 extern void EXFUN (termination_init_error, (void));
 extern void EXFUN (termination_end_of_computation, (void));
 extern void EXFUN (termination_trap, (void));
index 0eb84e3ceb360d63fbae8214cc737a3f0162f712..2f21780886cccdc5cdad38cefcdefa2cbd5d8449 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osscheme.h,v 1.3 1991/03/01 00:55:17 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osscheme.h,v 1.4 1991/08/26 15:00:14 arthur Exp $
 
 Copyright (c) 1990-91 Massachusetts Institute of Technology
 
@@ -54,7 +54,7 @@ extern void EXFUN (error_out_of_processes, (void));
 extern void EXFUN (error_floating_point_exception, (void));
 
 extern void EXFUN (termination_eof, (void));
-extern void EXFUN (termination_normal, (void));
+extern void EXFUN (termination_normal, (int));
 extern void EXFUN (termination_init_error, (void));
 extern void EXFUN (termination_signal, (CONST char * signal_name));
 extern void EXFUN (termination_trap, (void));
index 2d397a015149b50a55ae67cf03635a69787cd3a9..01d12116bbfe93a48813eac1b95e6b67a2b0b1ff 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prims.h,v 9.38 1991/03/01 00:55:21 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prims.h,v 9.39 1991/08/26 15:00:15 arthur Exp $
 
 Copyright (c) 1987-91 Massachusetts Institute of Technology
 
@@ -87,17 +87,17 @@ extern void canonicalize_primitive_context ();
 \f
 extern void EXFUN (signal_error_from_primitive, (long error_code));
 extern void EXFUN (signal_interrupt_from_primitive, (void));
-extern void error_wrong_type_arg ();
-extern void error_bad_range_arg ();
-extern void error_external_return ();
-extern long arg_integer ();
-extern long arg_nonnegative_integer ();
-extern long arg_index_integer ();
-extern long arg_integer_in_range ();
-extern double arg_real_number ();
-extern double arg_real_in_range ();
-extern long arg_ascii_char ();
-extern long arg_ascii_integer ();
+extern void EXFUN (error_wrong_type_arg, (int));
+extern void EXFUN (error_bad_range_arg, (int));
+extern void EXFUN (error_external_return, (void));
+extern long EXFUN (arg_integer, (int));
+extern long EXFUN (arg_nonnegative_integer, (int));
+extern long EXFUN (arg_index_integer, (int, long));
+extern long EXFUN (arg_integer_in_range, (int, long, long));
+extern double EXFUN (arg_real_number, (int));
+extern double EXFUN (arg_real_in_range, (int, double, double));
+extern long EXFUN (arg_ascii_char, (int));
+extern long EXFUN (arg_ascii_integer, (int));
 
 #define UNSIGNED_FIXNUM_ARG(arg)                                       \
   ((FIXNUM_P (ARG_REF (arg)))                                          \
index ed52919af812d8dfd19f4f4627ac05f261861217..352ef10034b3574781b9bcb6fba9a9235ca3006f 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/sysprim.c,v 9.35 1990/11/05 11:55:19 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/sysprim.c,v 9.36 1991/08/26 15:00:18 arthur Exp $
 
-Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1987, 1988, 1989, 1990, 1991 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -46,7 +46,16 @@ DEFINE_PRIMITIVE ("EXIT", Prim_non_restartable_exit, 0, 0,
   "Exit Scheme with no option to restart.")
 {
   PRIMITIVE_HEADER (0);
-  termination_normal ();
+  termination_normal (0);
+}
+
+DEFINE_PRIMITIVE ("EXIT-WITH-VALUE", 
+                 Prim_non_restartable_exit_with_value, 1, 1,
+  "Exit Scheme with no option to restart, returning integer argument\n\
+as exit status.")
+{
+  PRIMITIVE_HEADER (1);
+  termination_normal ((int) arg_integer (1));
 }
 
 DEFINE_PRIMITIVE ("HALT", Prim_restartable_exit, 0, 0,
index d9671ad32f9f0f07ca44def810cccf9b07b98bb9..e55ba1b7ad78112f3cc7eca07ad2249f22954d5a 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/term.c,v 1.4 1990/11/13 08:44:58 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/term.c,v 1.5 1991/08/26 15:00:20 arthur Exp $
 
 Copyright (c) 1990 Massachusetts Institute of Technology
 
@@ -143,10 +143,10 @@ DEFUN (Microcode_Termination, (code), int code)
 }
 \f
 void
-DEFUN_VOID (termination_normal)
+DEFUN (termination_normal, (value), CONST int value)
 {
   termination_prefix (TERM_HALT);
-  termination_suffix (TERM_HALT, 0, 0);
+  termination_suffix (TERM_HALT, value, 0);
 }
 
 void
index 330f1ce02b0e332b4156b9c410a3e08820c28ffc..f107ccdbf097a97a5302a085a1346c5a9bc365c7 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxsig.c,v 1.14 1991/08/24 02:10:15 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxsig.c,v 1.15 1991/08/26 15:00:22 arthur Exp $
 
 Copyright (c) 1990-91 Massachusetts Institute of Technology
 
@@ -742,7 +742,7 @@ DEFUN (interactive_interrupt_handler, (scp), struct FULL_SIGCONTEXT * scp)
        case 'Q':
        case 'q':
          INTERACTIVE_NEWLINE ();
-         termination_normal ();
+         termination_normal (0);
          return;
        case '\f':
          if (!option_emacs_subprocess)
index f646f6ed9f263714caa52b8df808b71a4913d9e2..83785a6e06d066b043d2d814cbc655c5c42cc0c3 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.94 1991/08/13 06:45:17 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.95 1991/08/26 15:00:24 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     94
+#define SUBVERSION     95
 #endif
index d2b7d3adba66d1d09427ee95dc2ac4df1ba211cf..69a3e2f06e41a8cb6eb3bde31a67b0d8f4d324b5 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.94 1991/08/13 06:45:17 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.95 1991/08/26 15:00:24 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     94
+#define SUBVERSION     95
 #endif