aboutsummaryrefslogtreecommitdiffstats
path: root/scm.c
diff options
context:
space:
mode:
Diffstat (limited to 'scm.c')
-rw-r--r--scm.c57
1 files changed, 19 insertions, 38 deletions
diff --git a/scm.c b/scm.c
index dc0ad7b..f226db1 100644
--- a/scm.c
+++ b/scm.c
@@ -1,46 +1,22 @@
-/* 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *
- * As a special exception, the Free Software Foundation gives permission
- * for additional uses of the text contained in its release of SCM.
- *
- * The exception is that, if you link the SCM library with other files
- * to produce an executable, this does not by itself cause the
- * resulting executable to be covered by the GNU General Public License.
- * Your use of that executable is in no way restricted on account of
- * linking the SCM library code into it.
+/* "scm.c" Initialization and interrupt code.
+ * Copyright (C) 1990-2006 Free Software Foundation, Inc.
*
- * This exception does not however invalidate any other reasons why
- * the executable file might be covered by the GNU General Public License.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
- * This exception applies only to the code released by the
- * Free Software Foundation under the name SCM. If you copy
- * code from other Free Software Foundation releases into a copy of
- * SCM, as the General Public License permits, the exception does
- * not apply to the code that you add in this way. To avoid misleading
- * anyone as to the status of such modified files, you must delete
- * this exception notice from them.
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * If you write modifications of your own for SCM, it is your choice
- * whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/>.
*/
-/* "scm.c" Initialization and interrupt code.
- Author: Aubrey Jaffer */
+/* Author: Aubrey Jaffer */
#ifdef PLAN9
# define signal(a,b) 0/* no signals in Plan 9 */
@@ -527,6 +503,11 @@ void init_scm(iverbose, buf0stdin, init_heap_size)
init_types();
init_tables();
init_storage(&i, init_heap_size); /* CONT(rootcont)->stkbse gets set here */
+ } else {
+ /* The streams when the program was dumped need to be reset. */
+ SETSTREAM(def_inp, stdin);
+ SETSTREAM(def_outp, stdout);
+ SETSTREAM(def_errp, stderr);
}
if (buf0stdin) SCM_PORTFLAGS(def_inp) |= BUF0;
else SCM_PORTFLAGS(def_inp) &= ~BUF0;