non-Unix systems.
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bintopsb.c,v 9.49 1992/02/03 22:38:18 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bintopsb.c,v 9.50 1992/02/11 21:14:38 mhwu Exp $
Copyright (c) 1987-1992 Massachusetts Institute of Technology
\f
/* IO definitions */
-#include "ansidecl.h"
#include "psbmap.h"
#include "trap.h"
#include "limits.h"
quit (1);
}
- setup_io ();
+ setup_io ("rb", "w");
do_it ();
quit (0);
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/ppband.c,v 9.42 1990/11/21 21:07:33 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/ppband.c,v 9.43 1992/02/11 21:15:00 mhwu Exp $
-Copyright (c) 1987, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define fast register
+/* These are needed when there is no compiler support. */
+
+extern void EXFUN (gc_death,
+ (long code, char *, SCHEME_OBJECT *, SCHEME_OBJECT *));
+
+extern char
+ gc_death_message_buffer[];
+
+void
+DEFUN (gc_death, (code, message, scan, free),
+ long code AND char * message
+ AND SCHEME_OBJECT * scan AND SCHEME_OBJECT * free)
+{
+ fprintf (stderr, "gc_death: %s.\n", message);
+ exit (1);
+}
+
/* These are needed by load.c */
static SCHEME_OBJECT * memory_base;
printf (" ");
break;
+#ifdef __STDC__
case '\a':
+#else
+ case '\007':
+#endif
printf (" \\a");
break;
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbmap.h,v 9.34 1992/01/15 17:31:41 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbmap.h,v 9.35 1992/02/11 21:14:07 mhwu Exp $
-Copyright (c) 1987-92 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define fast register
#include <stdio.h>
+#include "ansidecl.h"
#include "config.h"
#include "types.h"
#include "object.h"
FILE *input_file, *output_file;
Boolean
-strequal(s1, s2)
- register char *s1, *s2;
+DEFUN (strequal, (s1, s2), register char * s1 AND register char * s2)
{
for ( ; *s1 != '\0'; s1++, s2++)
{
}
\f
void
-setup_io()
+DEFUN (setup_io, (input_mode, output_mode),
+ CONST char * input_mode AND CONST char * output_mode)
{
- if (strequal(input_file_name, "-"))
+ if (strequal (input_file_name, "-"))
{
input_file = stdin;
}
else
{
- input_file = fopen(input_file_name, "r");
+ input_file = (fopen (input_file_name, input_mode));
if (input_file == ((FILE *) NULL))
{
- fprintf(stderr, "%s: failed to open %s for input.\n",
- input_file_name);
- exit(1);
+ fprintf (stderr, "%s: failed to open %s for input.\n",
+ input_file_name);
+ exit (1);
}
}
- if (strequal(output_file_name, "-"))
+ if (strequal (output_file_name, "-"))
{
output_file = stdout;
}
else
{
- output_file = fopen(output_file_name, "w");
+ output_file = (fopen (output_file_name, output_mode));
if (output_file == ((FILE *) NULL))
{
- fprintf(stderr, "%s: failed to open %s for output.\n",
- output_file_name);
- fclose(input_file);
- exit(1);
+ fprintf (stderr, "%s: failed to open %s for output.\n",
+ output_file_name);
+ fclose (input_file);
+ exit (1);
}
}
return;
}
void
-quit(code)
- int code;
+DEFUN (quit, (code), int code)
{
fclose(input_file);
fclose(output_file);
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbtobin.c,v 9.46 1992/02/03 22:39:43 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/psbtobin.c,v 9.47 1992/02/11 21:14:23 mhwu Exp $
-Copyright (c) 1987-92 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
\f
/* Cheap renames */
-#include "ansidecl.h"
#include "psbmap.h"
#include "float.h"
#include "limits.h"
}
allow_nmv_p = (allow_nmv_p || allow_compiled_p);
- setup_io ();
+ setup_io ("r", "wb");
do_it ();
quit (0);
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/bintopsb.c,v 9.49 1992/02/03 22:38:18 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/bintopsb.c,v 9.50 1992/02/11 21:14:38 mhwu Exp $
Copyright (c) 1987-1992 Massachusetts Institute of Technology
\f
/* IO definitions */
-#include "ansidecl.h"
#include "psbmap.h"
#include "trap.h"
#include "limits.h"
quit (1);
}
- setup_io ();
+ setup_io ("rb", "w");
do_it ();
quit (0);
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/ppband.c,v 9.42 1990/11/21 21:07:33 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/ppband.c,v 9.43 1992/02/11 21:15:00 mhwu Exp $
-Copyright (c) 1987, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define fast register
+/* These are needed when there is no compiler support. */
+
+extern void EXFUN (gc_death,
+ (long code, char *, SCHEME_OBJECT *, SCHEME_OBJECT *));
+
+extern char
+ gc_death_message_buffer[];
+
+void
+DEFUN (gc_death, (code, message, scan, free),
+ long code AND char * message
+ AND SCHEME_OBJECT * scan AND SCHEME_OBJECT * free)
+{
+ fprintf (stderr, "gc_death: %s.\n", message);
+ exit (1);
+}
+
/* These are needed by load.c */
static SCHEME_OBJECT * memory_base;
printf (" ");
break;
+#ifdef __STDC__
case '\a':
+#else
+ case '\007':
+#endif
printf (" \\a");
break;
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbmap.h,v 9.34 1992/01/15 17:31:41 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbmap.h,v 9.35 1992/02/11 21:14:07 mhwu Exp $
-Copyright (c) 1987-92 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
#define fast register
#include <stdio.h>
+#include "ansidecl.h"
#include "config.h"
#include "types.h"
#include "object.h"
FILE *input_file, *output_file;
Boolean
-strequal(s1, s2)
- register char *s1, *s2;
+DEFUN (strequal, (s1, s2), register char * s1 AND register char * s2)
{
for ( ; *s1 != '\0'; s1++, s2++)
{
}
\f
void
-setup_io()
+DEFUN (setup_io, (input_mode, output_mode),
+ CONST char * input_mode AND CONST char * output_mode)
{
- if (strequal(input_file_name, "-"))
+ if (strequal (input_file_name, "-"))
{
input_file = stdin;
}
else
{
- input_file = fopen(input_file_name, "r");
+ input_file = (fopen (input_file_name, input_mode));
if (input_file == ((FILE *) NULL))
{
- fprintf(stderr, "%s: failed to open %s for input.\n",
- input_file_name);
- exit(1);
+ fprintf (stderr, "%s: failed to open %s for input.\n",
+ input_file_name);
+ exit (1);
}
}
- if (strequal(output_file_name, "-"))
+ if (strequal (output_file_name, "-"))
{
output_file = stdout;
}
else
{
- output_file = fopen(output_file_name, "w");
+ output_file = (fopen (output_file_name, output_mode));
if (output_file == ((FILE *) NULL))
{
- fprintf(stderr, "%s: failed to open %s for output.\n",
- output_file_name);
- fclose(input_file);
- exit(1);
+ fprintf (stderr, "%s: failed to open %s for output.\n",
+ output_file_name);
+ fclose (input_file);
+ exit (1);
}
}
return;
}
void
-quit(code)
- int code;
+DEFUN (quit, (code), int code)
{
fclose(input_file);
fclose(output_file);
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbtobin.c,v 9.46 1992/02/03 22:39:43 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/psbtobin.c,v 9.47 1992/02/11 21:14:23 mhwu Exp $
-Copyright (c) 1987-92 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
\f
/* Cheap renames */
-#include "ansidecl.h"
#include "psbmap.h"
#include "float.h"
#include "limits.h"
}
allow_nmv_p = (allow_nmv_p || allow_compiled_p);
- setup_io ();
+ setup_io ("r", "wb");
do_it ();
quit (0);
}