From: Chris Hanson Date: Wed, 2 Oct 1996 19:01:40 +0000 (+0000) Subject: Many small changes to eliminate errors and warnings when compiling X-Git-Tag: 20090517-FFI~5380 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d444f0b9f33fa9a7bdbf0079b0a8a974e43ad3a8;p=mit-scheme.git Many small changes to eliminate errors and warnings when compiling under Win32 using either Visual C++ 4.0 or Watcom C/C++ 10.6. --- diff --git a/v7/src/microcode/ansidecl.h b/v7/src/microcode/ansidecl.h index 6075b9f16..b295c1e1e 100644 --- a/v7/src/microcode/ansidecl.h +++ b/v7/src/microcode/ansidecl.h @@ -1,7 +1,7 @@ /* Copyright (C) 1990 Free Software Foundation, Inc. This file is part of the GNU C Library. -$Id: ansidecl.h,v 1.4 1995/10/08 15:29:45 cph Exp $ +$Id: ansidecl.h,v 1.5 1996/10/02 18:56:19 cph Exp $ The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,7 +63,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ version 3.0 that is no longer allowed. What these fascists hope to gain by this, besides angering programmers, is unclear. */ -#if defined(__STDC__) || defined(__IBMC__) +#if defined(__STDC__) || defined(__IBMC__) || defined(CL386) #define PTR void * #define PTRCONST void *CONST diff --git a/v7/src/microcode/avltree.c b/v7/src/microcode/avltree.c index 02af61c43..9890ca02f 100644 --- a/v7/src/microcode/avltree.c +++ b/v7/src/microcode/avltree.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: avltree.c,v 1.1 1993/11/05 00:45:09 gjr Exp $ +$Id: avltree.c,v 1.2 1996/10/02 18:56:52 cph Exp $ -Copyright (c) 1993 Massachusetts Institute of Technology +Copyright (c) 1993-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -39,6 +39,8 @@ MIT in each case. */ #include "avltree.h" +int EXFUN (strcmp_ci, (char * s1, char * s2)); + #ifndef NULL # define NULL ((PTR) 0) #endif diff --git a/v7/src/microcode/bignmint.h b/v7/src/microcode/bignmint.h index 161d3fc59..cc7440c22 100644 --- a/v7/src/microcode/bignmint.h +++ b/v7/src/microcode/bignmint.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bignmint.h,v 1.4 1993/10/27 23:57:07 gjr Exp $ +$Id: bignmint.h,v 1.5 1996/10/02 18:56:54 cph Exp $ -Copyright (c) 1989-1992 Massachusetts Institute of Technology +Copyright (c) 1989-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -47,6 +47,8 @@ typedef long bignum_length_type; #ifdef MIT_SCHEME +#include "prims.h" + /* BIGNUM_ALLOCATE allocates a (length + 1)-element array of `bignum_digit_type'; deallocation is the responsibility of the user (in Scheme, the garbage collector handles this). */ diff --git a/v7/src/microcode/bignum.c b/v7/src/microcode/bignum.c index 70750cb97..207a373a0 100644 --- a/v7/src/microcode/bignum.c +++ b/v7/src/microcode/bignum.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bignum.c,v 9.41 1994/02/09 00:53:27 cph Exp $ +$Id: bignum.c,v 9.42 1996/10/02 18:56:56 cph Exp $ -Copyright (c) 1989-94 Massachusetts Institute of Technology +Copyright (c) 1989-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -492,7 +492,10 @@ DEFUN (bignum_to_long, (bignum), bignum_type bignum) fast bignum_digit_type * scan = (start + (BIGNUM_LENGTH (bignum))); while (start < scan) accumulator = ((accumulator << BIGNUM_DIGIT_LENGTH) + (*--scan)); - return ((BIGNUM_NEGATIVE_P (bignum)) ? (-accumulator) : accumulator); + return + ((BIGNUM_NEGATIVE_P (bignum)) + ? (- ((long) accumulator)) + : ((long) accumulator)); } } @@ -607,15 +610,20 @@ DEFUN (bignum_fits_in_word_p, (bignum, word_length, twos_complement_p), { fast bignum_length_type length = (BIGNUM_LENGTH (bignum)); fast unsigned int max_digits = (BIGNUM_BITS_TO_DIGITS (n_bits)); - bignum_digit_type msd, max; - return - ((length < max_digits) || - ((length == max_digits) && - ((((msd = (BIGNUM_REF (bignum, (length - 1)))) < - (max = (1L << (n_bits - ((length - 1) * BIGNUM_DIGIT_LENGTH))))) || - (twos_complement_p && - (msd == max) && - (BIGNUM_NEGATIVE_P (bignum))))))); + if (((unsigned int) length) < max_digits) + return (1); + if (((unsigned int) length) > max_digits) + return (0); + { + bignum_digit_type msd = (BIGNUM_REF (bignum, (length - 1))); + bignum_digit_type max + = (1L << (n_bits - ((length - 1) * BIGNUM_DIGIT_LENGTH))); + return + (((msd < max) + || (twos_complement_p + && (msd == max) + && (BIGNUM_NEGATIVE_P (bignum))))); + } } } @@ -696,8 +704,7 @@ void DEFUN (bignum_to_digit_stream, (bignum, radix, consumer, context), bignum_type bignum AND unsigned int radix - AND void EXFUN ((*consumer), - (bignum_procedure_context, bignum_digit_type)) + AND void EXFUN ((*consumer), (bignum_procedure_context, long)) AND bignum_procedure_context context) { BIGNUM_ASSERT ((radix > 1) && (radix <= BIGNUM_RADIX_ROOT)); @@ -732,7 +739,7 @@ DEFUN (bignum_equal_p_unsigned, (x, y), bignum_type x AND bignum_type y) { bignum_length_type length = (BIGNUM_LENGTH (x)); - if (length != (BIGNUM_LENGTH (y))) + if (length != ((bignum_length_type) (BIGNUM_LENGTH (y)))) return (0); else { diff --git a/v7/src/microcode/bignum.h b/v7/src/microcode/bignum.h index 8ae9040e6..a25a24b48 100644 --- a/v7/src/microcode/bignum.h +++ b/v7/src/microcode/bignum.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bignum.h,v 9.28 1992/09/18 16:52:34 jinx Exp $ +$Id: bignum.h,v 9.29 1996/10/02 18:57:02 cph Exp $ -Copyright (c) 1989-1992 Massachusetts Institute of Technology +Copyright (c) 1989-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -65,15 +65,17 @@ extern bignum_type EXFUN (bignum_make_zero, (void)); extern bignum_type EXFUN (bignum_make_one, (int negative_p)); extern int EXFUN (bignum_equal_p, (bignum_type, bignum_type)); extern enum bignum_comparison EXFUN (bignum_test, (bignum_type)); -extern enum bignum_comparison EXFUN (bignum_compare, - (bignum_type, bignum_type)); +extern enum bignum_comparison EXFUN + (bignum_compare, (bignum_type, bignum_type)); extern bignum_type EXFUN (bignum_add, (bignum_type, bignum_type)); extern bignum_type EXFUN (bignum_subtract, (bignum_type, bignum_type)); extern bignum_type EXFUN (bignum_negate, (bignum_type)); extern bignum_type EXFUN (bignum_multiply, (bignum_type, bignum_type)); -extern int EXFUN (bignum_divide, - (bignum_type numerator, bignum_type denominator, - bignum_type * quotient, bignum_type * remainder)); +extern int EXFUN + (bignum_divide, (bignum_type numerator, + bignum_type denominator, + bignum_type * quotient, + bignum_type * remainder)); extern bignum_type EXFUN (bignum_quotient, (bignum_type, bignum_type)); extern bignum_type EXFUN (bignum_remainder, (bignum_type, bignum_type)); #ifndef BIGNUM_NO_ULONG @@ -84,17 +86,22 @@ extern unsigned long EXFUN (bignum_to_ulong, (bignum_type)); #endif /* not BIGNUM_NO_ULONG */ extern bignum_type EXFUN (double_to_bignum, (double)); extern double EXFUN (bignum_to_double, (bignum_type)); -extern int EXFUN (bignum_fits_in_word_p, - (bignum_type, long word_length, int twos_complement_p)); +extern int EXFUN + (bignum_fits_in_word_p, (bignum_type, + long word_length, + int twos_complement_p)); extern bignum_type EXFUN (bignum_length_in_bits, (bignum_type)); extern bignum_type EXFUN (bignum_length_upper_limit, (void)); -extern bignum_type EXFUN (digit_stream_to_bignum, - (unsigned int n_digits, - unsigned int EXFUN ((*producer), ()), - bignum_procedure_context context, - unsigned int radix, int negative_p)); -extern void EXFUN (bignum_to_digit_stream, - (bignum_type, unsigned int radix, - void EXFUN((*consumer), ()), - bignum_procedure_context context)); +extern bignum_type EXFUN + (digit_stream_to_bignum, + (unsigned int n_digits, + unsigned int EXFUN ((*producer), (bignum_procedure_context)), + bignum_procedure_context context, + unsigned int radix, + int negative_p)); +extern void EXFUN + (bignum_to_digit_stream, + (bignum_type, unsigned int radix, + void EXFUN ((*consumer), (bignum_procedure_context, long)), + bignum_procedure_context context)); extern long EXFUN (bignum_max_digit_stream_radix, (void)); diff --git a/v7/src/microcode/bigprm.c b/v7/src/microcode/bigprm.c index 11f4d07d4..2f45459de 100644 --- a/v7/src/microcode/bigprm.c +++ b/v7/src/microcode/bigprm.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bigprm.c,v 1.3 1993/06/24 07:07:02 gjr Exp $ +$Id: bigprm.c,v 1.4 1996/10/02 18:57:03 cph Exp $ -Copyright (c) 1989-1991 Massachusetts Institute of Technology +Copyright (c) 1989-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -117,11 +117,12 @@ DEFINE_PRIMITIVE ("BIGNUM-REMAINDER", Prim_bignum_remainder, 2, 2, 0) static void DEFUN (listify_bignum_consumer, (previous_cdr, digit), - SCHEME_OBJECT * previous_cdr AND unsigned int digit) + PTR previous_cdr AND + long digit) { - (*previous_cdr) = - (cons ((LONG_TO_UNSIGNED_FIXNUM (digit)), (*previous_cdr))); - return; + (* ((SCHEME_OBJECT *) previous_cdr)) = + (cons ((LONG_TO_UNSIGNED_FIXNUM (digit)), + (* ((SCHEME_OBJECT *) previous_cdr)))); } DEFINE_PRIMITIVE ("LISTIFY-BIGNUM", Prim_listify_bignum, 2, 2, diff --git a/v7/src/microcode/bitstr.c b/v7/src/microcode/bitstr.c index b7103f973..556d8f28d 100644 --- a/v7/src/microcode/bitstr.c +++ b/v7/src/microcode/bitstr.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: bitstr.c,v 9.56 1995/04/21 04:28:25 adams Exp $ +$Id: bitstr.c,v 9.57 1996/10/02 18:57:05 cph Exp $ -Copyright (c) 1987-95 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -78,7 +78,8 @@ DEFINE_PRIMITIVE ("BIT-STRING?", Prim_bit_string_p, 1, 1, 0) void DEFUN (fill_bit_string, (bit_string, sense), - SCHEME_OBJECT bit_string AND Boolean sense) + SCHEME_OBJECT bit_string AND + int sense) { SCHEME_OBJECT *scanner; SCHEME_OBJECT filler; @@ -614,7 +615,7 @@ DEFUN (bignum_to_bit_string, (length, bignum), if (! (bignum_fits_in_word_p (bignum, length, 0))) error_bad_range_arg (2); { - void EXFUN (btbs_consumer, (unsigned char **, unsigned int)); + void EXFUN (btbs_consumer, (unsigned char **, long)); SCHEME_OBJECT result = (zero_to_bit_string (length)); unsigned char * result_ptr = ((unsigned char *) (BIT_STRING_LOW_PTR (result))); @@ -628,10 +629,9 @@ DEFUN (bignum_to_bit_string, (length, bignum), void DEFUN (btbs_consumer, (result_ptr, digit), unsigned char ** result_ptr - AND unsigned int digit) + AND long digit) { - (* (INC_BIT_STRING_PTR (*result_ptr))) = digit; - return; + (* (INC_BIT_STRING_PTR (*result_ptr))) = ((unsigned char) digit); } struct bitstr_to_bignm_context diff --git a/v7/src/microcode/boot.c b/v7/src/microcode/boot.c index e0aa2eaa3..6bbf75031 100644 --- a/v7/src/microcode/boot.c +++ b/v7/src/microcode/boot.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: boot.c,v 9.96 1995/07/26 18:31:47 adams Exp $ +$Id: boot.c,v 9.97 1996/10/02 18:57:09 cph Exp $ -Copyright (c) 1988-95 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -52,6 +52,7 @@ extern void EXFUN (Setup_Memory, (int, int, int)); extern void EXFUN (compiler_initialize, (long fasl_p)); extern SCHEME_OBJECT EXFUN (make_primitive, (char *, int)); extern void EXFUN (OS_announcement, (void)); +extern SCHEME_OBJECT EXFUN (char_pointer_to_symbol, (unsigned char *)); static void EXFUN (Start_Scheme, (int, CONST char *)); static void EXFUN (Enter_Interpreter, (void)); diff --git a/v7/src/microcode/cmpint.c b/v7/src/microcode/cmpint.c index 525cc1f45..a6b70bab2 100644 --- a/v7/src/microcode/cmpint.c +++ b/v7/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.89 1996/03/23 19:25:23 adams Exp $ +$Id: cmpint.c,v 1.90 1996/10/02 19:01:12 cph Exp $ Copyright (c) 1989-96 Massachusetts Institute of Technology @@ -139,7 +139,7 @@ MIT in each case. */ #define ASM_ENTRY_POINT(name) name #endif -#if defined(__STDC__) || defined(__IBMC__) +#if defined(__STDC__) || defined(__IBMC__) || defined(CL386) #define EXFNX(name, proto) ASM_ENTRY_POINT (name) proto #define DEFNX(name, arglist, args) ASM_ENTRY_POINT (name) (args) #define DEFNX_VOID(name) ASM_ENTRY_POINT (name) (void) @@ -2949,7 +2949,7 @@ DEFUN (bkpt_remove, (ep, handle), PTR ep AND SCHEME_OBJECT handle) C_UTILITY Boolean DEFUN (bkpt_p, (ep), PTR ep) { - return (SHARP_F); + return (FALSE); } C_UTILITY SCHEME_OBJECT @@ -2957,6 +2957,7 @@ DEFUN (bkpt_proceed, (ep, handle, state), PTR ep AND SCHEME_OBJECT handle AND SCHEME_OBJECT state) { error_external_return (); + return (UNSPECIFIC); } C_UTILITY PTR diff --git a/v7/src/microcode/debug.c b/v7/src/microcode/debug.c index 4659fc55f..c32dab7f7 100644 --- a/v7/src/microcode/debug.c +++ b/v7/src/microcode/debug.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: debug.c,v 9.47 1995/07/26 21:04:40 adams Exp $ +$Id: debug.c,v 9.48 1996/10/02 18:57:21 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -144,7 +144,7 @@ DEFUN_VOID (Show_Pure) outf_console ("Missing constant header.\n"); return; } - if (OBJECT_DATUM (Obj_Address[Pure_Size]) != Pure_Size) + if (((long) (OBJECT_DATUM (Obj_Address[Pure_Size]))) != Pure_Size) { outf_console ("Pure size mismatch 0x%lx.\n", ((long) (OBJECT_DATUM (Obj_Address[Pure_Size])))); @@ -160,7 +160,7 @@ DEFUN_VOID (Show_Pure) outf_console ("Missing ending header.\n"); return; } - if (OBJECT_DATUM (Obj_Address[Total_Size]) != Total_Size) + if (((long) (OBJECT_DATUM (Obj_Address[Total_Size]))) != Total_Size) { outf_console ("Total size mismatch 0x%lx.\n", ((long) (OBJECT_DATUM (Obj_Address[Total_Size])))); @@ -791,7 +791,7 @@ DEFUN (Back_Trace, (stream), outf_channel stream) print_expression (stream, Temp, " ..."); if ((OBJECT_TYPE (Temp)) == TC_MANIFEST_NM_VECTOR) { - Stack_Pointer = (STACK_LOC (OBJECT_DATUM (Temp))); + Stack_Pointer = (STACK_LOC (- ((long) (OBJECT_DATUM (Temp))))); outf (stream, " (skipping)"); } outf (stream, "\n"); @@ -1047,6 +1047,7 @@ DEFUN (set_flag, (flag_number, value), int flag_number AND int value) { signal_error_from_primitive (ERR_UNIMPLEMENTED_PRIMITIVE); /*NOTREACHED*/ + return (0); } #endif /* not ENABLE_DEBUGGING_FLAGS */ diff --git a/v7/src/microcode/extern.c b/v7/src/microcode/extern.c index 08b3120f2..2bbebe1ae 100644 --- a/v7/src/microcode/extern.c +++ b/v7/src/microcode/extern.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: extern.c,v 9.34 1993/08/03 08:29:45 gjr Exp $ +$Id: extern.c,v 9.35 1996/10/02 18:57:24 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -76,7 +76,7 @@ a machine ADDRESS and a TYPE-CODE (either return code or primitive\n\ procedure), it finds the number for the external representation for\n\ the internal address.") { - fast long tc; + fast SCHEME_OBJECT tc; fast SCHEME_OBJECT address; PRIMITIVE_HEADER (2); tc = (arg_nonnegative_integer (1)); @@ -109,7 +109,8 @@ DEFINE_PRIMITIVE ("PRIMITIVE-PROCEDURE-ARITY", Prim_primitive_procedure_arity, 1 CHECK_ARG (1, PRIMITIVE_P); { fast SCHEME_OBJECT primitive = (ARG_REF (1)); - if ((PRIMITIVE_NUMBER (primitive)) > (NUMBER_OF_PRIMITIVES ())) + if ((PRIMITIVE_NUMBER (primitive)) + > ((unsigned long) (NUMBER_OF_PRIMITIVES ()))) error_bad_range_arg (1); PRIMITIVE_RETURN (LONG_TO_FIXNUM (PRIMITIVE_ARITY (primitive))); } @@ -123,7 +124,8 @@ DEFINE_PRIMITIVE ("PRIMITIVE-PROCEDURE-DOCUMENTATION", CHECK_ARG (1, PRIMITIVE_P); { fast SCHEME_OBJECT primitive = (ARG_REF (1)); - if ((PRIMITIVE_NUMBER (primitive)) > (NUMBER_OF_PRIMITIVES ())) + if ((PRIMITIVE_NUMBER (primitive)) + > ((unsigned long) (NUMBER_OF_PRIMITIVES ()))) error_bad_range_arg (1); { fast char * answer = (PRIMITIVE_DOCUMENTATION (primitive)); diff --git a/v7/src/microcode/fasdump.c b/v7/src/microcode/fasdump.c index 629287766..9fe93d533 100644 --- a/v7/src/microcode/fasdump.c +++ b/v7/src/microcode/fasdump.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: fasdump.c,v 9.60 1993/12/07 20:35:58 gjr Exp $ +$Id: fasdump.c,v 9.61 1996/10/02 18:57:28 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -36,6 +36,7 @@ MIT in each case. */ #include "scheme.h" #include "prims.h" +#include "osscheme.h" #include "osio.h" #include "osfile.h" #include "osfs.h" @@ -48,11 +49,12 @@ MIT in each case. */ static Tchannel dump_channel; #define Write_Data(size, buffer) \ - ((OS_channel_write_dump_file \ - (dump_channel, \ - ((char *) (buffer)), \ - ((size) * (sizeof (SCHEME_OBJECT))))) \ - / (sizeof (SCHEME_OBJECT))) + ((long) \ + ((OS_channel_write_dump_file \ + (dump_channel, \ + ((char *) (buffer)), \ + ((size) * (sizeof (SCHEME_OBJECT))))) \ + / (sizeof (SCHEME_OBJECT)))) #include "dump.c" diff --git a/v7/src/microcode/fasload.c b/v7/src/microcode/fasload.c index 09bccefcb..92a0baa61 100644 --- a/v7/src/microcode/fasload.c +++ b/v7/src/microcode/fasload.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: fasload.c,v 9.81 1995/07/26 23:23:38 adams Exp $ +$Id: fasload.c,v 9.82 1996/10/02 18:57:31 cph Exp $ -Copyright (c) 1987-1994 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -50,15 +50,18 @@ MIT in each case. */ static Tchannel load_channel; #define Load_Data(size, buffer) \ - ((OS_channel_read_load_file \ - (load_channel, \ - ((char *) (buffer)), \ - ((size) * (sizeof (SCHEME_OBJECT))))) \ - / (sizeof (SCHEME_OBJECT))) + ((long) \ + ((OS_channel_read_load_file \ + (load_channel, \ + ((char *) (buffer)), \ + ((size) * (sizeof (SCHEME_OBJECT))))) \ + / (sizeof (SCHEME_OBJECT)))) #include "load.c" extern char * EXFUN (malloc, (int)); +extern int EXFUN (strlen, (const char *)); +extern char * EXFUN (strcpy, (char *, const char *)); extern char * Error_Names []; extern char * Abort_Names []; @@ -254,7 +257,7 @@ DEFUN (read_file_end, (mode, prim_table_ptr, c_code_table_ptr), AND SCHEME_OBJECT ** prim_table_ptr AND SCHEME_OBJECT ** c_code_table_ptr) { - SCHEME_OBJECT * prim_table, * c_code_table, * ignore; + SCHEME_OBJECT * prim_table, * c_code_table; extern unsigned long checksum_area (); if ((Load_Data (Heap_Count, ((char *) Free))) != Heap_Count) @@ -596,7 +599,7 @@ static Boolean DEFUN (check_primitive_numbers, (table, length), fast SCHEME_OBJECT * table AND fast long length) { - fast long count, top; + fast long count; for (count = 0; count < length; count += 1) if (table[count] != (MAKE_PRIMITIVE_OBJECT (count))) @@ -1081,6 +1084,7 @@ DEFINE_PRIMITIVE ("LOAD-BAND", Prim_band_load, 1, 1, 0) /* Return in a non-standard way. */ PRIMITIVE_ABORT (PRIM_DO_EXPRESSION); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } #ifdef BYTE_INVERSION diff --git a/v7/src/microcode/findprim.c b/v7/src/microcode/findprim.c index d70f9b318..3c259037c 100644 --- a/v7/src/microcode/findprim.c +++ b/v7/src/microcode/findprim.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: findprim.c,v 9.49 1993/08/21 01:56:51 gjr Exp $ +$Id: findprim.c,v 9.50 1996/10/02 18:57:35 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -138,6 +138,8 @@ DEFUN (xrealloc, (ptr, length), return (result); } +extern void EXFUN (free, (void *)); + #define FIND_INDEX_LENGTH(index, size) \ { \ char index_buffer [64]; \ @@ -562,6 +564,7 @@ DEFUN (print_procedure, (output, primitive_descriptor, error_string), fprintf (output, "\n"); fprintf (output, " %s;\n", error_string); fprintf (output, " /%cNOTREACHED%c/\n", '*', '*'); + fprintf (output, " PRIMITIVE_RETURN (UNSPECIFIC);\n"); fprintf (output, "}\n"); return; diff --git a/v7/src/microcode/generic.c b/v7/src/microcode/generic.c index 8d2e740fd..fad4c125b 100644 --- a/v7/src/microcode/generic.c +++ b/v7/src/microcode/generic.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: generic.c,v 9.37 1993/06/24 07:08:40 gjr Exp $ +$Id: generic.c,v 9.38 1996/10/02 18:57:39 cph Exp $ -Copyright (c) 1987-1991 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -44,6 +44,7 @@ MIT in each case. */ Pushed (); \ PRIMITIVE_ABORT (PRIM_APPLY); \ /*NOTREACHED*/ \ + PRIMITIVE_RETURN (UNSPECIFIC); \ } #define INDIRECT_TEST_1(test, slot) \ diff --git a/v7/src/microcode/hooks.c b/v7/src/microcode/hooks.c index 4da388288..031cab35b 100644 --- a/v7/src/microcode/hooks.c +++ b/v7/src/microcode/hooks.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: hooks.c,v 9.53 1993/09/12 03:21:01 gjr Exp $ +$Id: hooks.c,v 9.54 1996/10/02 18:57:42 cph Exp $ -Copyright (c) 1988-1993 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -344,6 +344,7 @@ Invoke RECEIVER with a reentrant copy of the current control stack.") PRIMITIVE_CANONICALIZE_CONTEXT (); CWCC (RC_RESTORE_HISTORY, SHARP_F, (ARG_REF (1))); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("NON-REENTRANT-CALL-WITH-CURRENT-CONTINUATION", @@ -355,6 +356,7 @@ Invoke RECEIVER with a non-reentrant copy of the current control stack.") PRIMITIVE_CANONICALIZE_CONTEXT(); CWCC (NON_REENTRANT_RC_RESTORE, NON_REENTRANT_FLAG, (ARG_REF (1))); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } /* (WITHIN-CONTROL-POINT control-point thunk) @@ -401,6 +403,7 @@ Invoke THUNK with CONTROL-POINT as its control stack.") PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("ERROR-PROCEDURE", Prim_error_procedure, 3, 3, @@ -427,6 +430,7 @@ DEFINE_PRIMITIVE ("ERROR-PROCEDURE", Prim_error_procedure, 3, 3, Pushed (); PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } } @@ -446,6 +450,7 @@ Evaluate SCODE-EXPRESSION in ENVIRONMENT.") } PRIMITIVE_ABORT (PRIM_DO_EXPRESSION); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("FORCE", Prim_force, 1, 1, @@ -549,6 +554,7 @@ space is used as the starting point.") Pushed (); Translate_To_Point (new_point); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } } } @@ -753,6 +759,7 @@ identified by the continuation parser.") } PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("WITH-STACK-MARKER", Prim_with_stack_marker, 3, 3, @@ -879,6 +886,7 @@ Set the interpreter's history object to HISTORY.") POP_PRIMITIVE_FRAME (1); PRIMITIVE_ABORT (PRIM_POP_RETURN); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("WITH-HISTORY-DISABLED", Prim_with_history_disabled, 1, 1, @@ -919,6 +927,7 @@ DEFINE_PRIMITIVE ("WITH-HISTORY-DISABLED", Prim_with_history_disabled, 1, 1, Pushed (); PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } } diff --git a/v7/src/microcode/intern.c b/v7/src/microcode/intern.c index cd44f3d2f..8d1f38945 100644 --- a/v7/src/microcode/intern.c +++ b/v7/src/microcode/intern.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: intern.c,v 9.54 1994/10/04 21:09:15 cph Exp $ +$Id: intern.c,v 9.55 1996/10/02 18:57:45 cph Exp $ -Copyright (c) 1987-94 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -38,6 +38,8 @@ MIT in each case. */ #include "prims.h" #include "trap.h" +extern int EXFUN (strlen, (const char *)); + /* These are exported to other parts of the system. */ extern SCHEME_OBJECT EXFUN (string_to_symbol, (SCHEME_OBJECT)); diff --git a/v7/src/microcode/interp.c b/v7/src/microcode/interp.c index 5bfb157a6..a33a4fdf4 100644 --- a/v7/src/microcode/interp.c +++ b/v7/src/microcode/interp.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: interp.c,v 9.85 1995/09/15 05:51:12 cph Exp $ +$Id: interp.c,v 9.86 1996/10/02 19:01:28 cph Exp $ -Copyright (c) 1988-94 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1528,7 +1528,7 @@ apply_dispatch: nactuals = (OBJECT_DATUM (nargs)); data = (MEMORY_REF (Function, ENTITY_DATA)); if ((VECTOR_P (data)) - && (nactuals < (VECTOR_LENGTH (data))) + && (nactuals < ((long) (VECTOR_LENGTH (data)))) && ((VECTOR_REF (data, nactuals)) != SHARP_F) && ((VECTOR_REF (data, 0)) == (Get_Fixed_Obj_Slot (ARITY_DISPATCHER_TAG)))) @@ -1599,9 +1599,9 @@ apply_dispatch: Apply_Future_Check(formals, FAST_MEMORY_REF (Function, LAMBDA_FORMALS)); - if ((nargs != VECTOR_LENGTH (formals)) && - ((OBJECT_TYPE (Function) != TC_LEXPR) || - (nargs < VECTOR_LENGTH (formals)))) + if ((nargs != ((long) (VECTOR_LENGTH (formals)))) + && ((OBJECT_TYPE (Function) != TC_LEXPR) + || (nargs < ((long) (VECTOR_LENGTH (formals)))))) { STACK_PUSH (STACK_FRAME_HEADER + nargs - 1); Apply_Error(ERR_WRONG_NUMBER_OF_ARGUMENTS); diff --git a/v7/src/microcode/lookup.c b/v7/src/microcode/lookup.c index 03d8db96f..41a05b022 100644 --- a/v7/src/microcode/lookup.c +++ b/v7/src/microcode/lookup.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: lookup.c,v 9.54 1993/09/09 18:17:46 gjr Exp $ +$Id: lookup.c,v 9.55 1996/10/02 19:01:34 cph Exp $ -Copyright (c) 1988-1993 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1192,7 +1192,7 @@ redo_aux_lookup: scan = (OBJECT_ADDRESS (extension)); - if ((temp + (AUX_LIST_FIRST - 1)) == (VECTOR_LENGTH (extension))) + if ((temp + (AUX_LIST_FIRST - 1)) == ((long) (VECTOR_LENGTH (extension)))) { fast long i; fast SCHEME_OBJECT *fast_free; diff --git a/v7/src/microcode/lookup.h b/v7/src/microcode/lookup.h index 255e13aad..5da5713e5 100644 --- a/v7/src/microcode/lookup.h +++ b/v7/src/microcode/lookup.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: lookup.h,v 9.48 1993/06/24 07:08:58 gjr Exp $ +$Id: lookup.h,v 9.49 1996/10/02 19:01:38 cph Exp $ -Copyright (c) 1988-92 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -192,7 +192,8 @@ extern SCHEME_OBJECT { \ fast SCHEME_OBJECT frame; \ \ -label: \ +/* Deleted this label to eliminate compiler warnings: */ \ +/* label: */ \ \ frame = (MEMORY_FETCH (hunk [VARIABLE_COMPILED_TYPE])); \ \ @@ -263,7 +264,7 @@ label: \ break; \ } \ depth = verified_offset(offset, get_offset(hunk)); \ - if (depth > VECTOR_LENGTH (frame)) \ + if (depth > ((long) (VECTOR_LENGTH (frame)))) \ { \ cell = uncompiled_trap_object; \ break; \ diff --git a/v7/src/microcode/memmag.c b/v7/src/microcode/memmag.c index 027a5d38b..68aea0c60 100644 --- a/v7/src/microcode/memmag.c +++ b/v7/src/microcode/memmag.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: memmag.c,v 9.62 1996/04/08 23:41:35 cph Exp $ +$Id: memmag.c,v 9.63 1996/10/02 19:01:40 cph Exp $ Copyright (c) 1987-96 Massachusetts Institute of Technology @@ -673,6 +673,7 @@ DEFINE_PRIMITIVE ("GARBAGE-COLLECT", Prim_garbage_collect, 1, 1, 0) Pushed (); PRIMITIVE_ABORT (PRIM_APPLY); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("GC-TRACE-REFERENCES", Prim_gc_trace_references, 2, 2, 0) diff --git a/v7/src/microcode/memmag.h b/v7/src/microcode/memmag.h index 933c2c66c..830cc9445 100644 --- a/v7/src/microcode/memmag.h +++ b/v7/src/microcode/memmag.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: memmag.h,v 1.4 1996/03/23 19:25:10 adams Exp $ +$Id: memmag.h,v 1.5 1996/10/02 18:58:05 cph Exp $ Copyright (c) 1993-96 Massachusetts Institute of Technology @@ -46,6 +46,8 @@ extern void winnt_deallocate_registers (void); #include "ntscmlib.h" +extern BOOL win32_under_win32s_p (void); + #ifdef WINNT_RAW_ADDRESSES #define WIN32_ALLOCATE_HEAP win32_system_utilities.allocate_heap diff --git a/v7/src/microcode/ntfile.c b/v7/src/microcode/ntfile.c index 7804c09c8..844571d6d 100644 --- a/v7/src/microcode/ntfile.c +++ b/v7/src/microcode/ntfile.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntfile.c,v 1.5 1996/04/09 20:19:13 adams Exp $ +$Id: ntfile.c,v 1.6 1996/10/02 18:58:07 cph Exp $ -Copyright (c) 1992-1996 Massachusetts Institute of Technology +Copyright (c) 1992-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -226,7 +226,7 @@ DEFUN (OS_file_position, (channel), Tchannel channel) STD_UINT_SYSTEM_CALL (syscall_lseek, result, - (_llseek ((CHANNEL_HANDLE (channel)), 0L, SEEK_CUR))); + (_llseek (((HFILE) (CHANNEL_HANDLE (channel))), 0L, SEEK_CUR))); return (result); } @@ -239,7 +239,7 @@ DEFUN (OS_file_set_position, (channel, position), STD_UINT_SYSTEM_CALL (syscall_lseek, result, - (_llseek ((CHANNEL_HANDLE (channel)), position, SEEK_SET))); + (_llseek (((HFILE) (CHANNEL_HANDLE (channel))), position, SEEK_SET))); if (result != position) error_external_return (); } diff --git a/v7/src/microcode/ntgui.c b/v7/src/microcode/ntgui.c index 0e4f459f7..42130641d 100644 --- a/v7/src/microcode/ntgui.c +++ b/v7/src/microcode/ntgui.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntgui.c,v 1.16 1996/03/21 16:38:16 adams Exp $ +$Id: ntgui.c,v 1.17 1996/10/02 18:58:10 cph Exp $ Copyright (c) 1993-96 Massachusetts Institute of Technology @@ -43,6 +43,7 @@ MIT in each case. */ #include "ntscreen.h" extern /*static*/ HANDLE ghInstance = 0; +extern void scheme_main (int argc, const char ** argv); BOOL InitApplication(HANDLE); BOOL InitInstance(HANDLE, int); @@ -50,7 +51,7 @@ void *xmalloc(int); void xfree(void*); #ifdef GUI -int PASCAL +int WINAPI WinMain (HANDLE hInst, HANDLE hPrevInst, LPSTR lpCmdLine, int nCmdShow) { int argc; @@ -96,7 +97,8 @@ WinMain (HANDLE hInst, HANDLE hPrevInst, LPSTR lpCmdLine, int nCmdShow) if (!InitInstance(ghInstance, nCmdShow)) return FALSE; - return (scheme_main (argc, argv)); + scheme_main (argc, argv); + return (0); } #endif @@ -338,9 +340,12 @@ C_to_Scheme_WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (thunk==0) return DefWindowProc (hwnd, message, wParam, lParam); - result = apply4(thunk, - ulong_to_integer(hwnd), ulong_to_integer(message), - ulong_to_integer(wParam), ulong_to_integer(lParam)); + result + = (apply4 (thunk, + (ulong_to_integer ((unsigned long) hwnd)), + (ulong_to_integer (message)), + (ulong_to_integer (wParam)), + (ulong_to_integer (lParam)))); return scheme_object_to_windows_object (result); } @@ -405,9 +410,12 @@ C_to_Scheme_WndProc_2 (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (general_scheme_wndproc == SHARP_F) return DefWindowProc (hwnd, message, wParam, lParam); - result = apply4(general_scheme_wndproc, - ulong_to_integer(hwnd), ulong_to_integer(message), - ulong_to_integer(wParam), ulong_to_integer(lParam)); + result + = (apply4 (general_scheme_wndproc, + (ulong_to_integer ((unsigned long) hwnd)), + (ulong_to_integer (message)), + (ulong_to_integer (wParam)), + (ulong_to_integer (lParam)))); return scheme_object_to_windows_object (result); } @@ -491,10 +499,10 @@ DEFINE_PRIMITIVE ("WIN:CREATE-WINDOW", Prim_create_window, 10, 10, class_name = STRING_LOC (ARG_REF (1), 0); window_name = STRING_LOC (ARG_REF (2), 0); style = integer_to_ulong (ARG_REF (3)); - x = arg_ulong_default (4, CW_USEDEFAULT); - y = arg_ulong_default (5, CW_USEDEFAULT); - w = arg_ulong_default (6, CW_USEDEFAULT); - h = arg_ulong_default (7, CW_USEDEFAULT); + x = (int) arg_ulong_default (4, ((unsigned long) CW_USEDEFAULT)); + y = (int) arg_ulong_default (5, ((unsigned long) CW_USEDEFAULT)); + w = (int) arg_ulong_default (6, ((unsigned long) CW_USEDEFAULT)); + h = (int) arg_ulong_default (7, ((unsigned long) CW_USEDEFAULT)); hWndParent = (HWND) arg_ulong_default (8, 0); hMenu = (HMENU) arg_ulong_default (9, 0); lpvParam = (LPVOID) ARG_REF (10); @@ -502,7 +510,7 @@ DEFINE_PRIMITIVE ("WIN:CREATE-WINDOW", Prim_create_window, 10, 10, result = CreateWindowEx (0, class_name, window_name, style, x, y, w, h, hWndParent, hMenu, ghInstance, lpvParam); - return ulong_to_integer (result); + return ulong_to_integer ((unsigned long) result); } @@ -576,7 +584,7 @@ DEFINE_PRIMITIVE ("NT:GET-MODULE-HANDLE", Prim_get_module_handle, 1, 1, CHECK_ARG (1, STRING_P); it = GetModuleHandle (STRING_LOC (ARG_REF (1), 0)); - PRIMITIVE_RETURN (long_to_integer (it)); + PRIMITIVE_RETURN (long_to_integer ((long) it)); } DEFINE_PRIMITIVE ("NT:LOAD-LIBRARY", Prim_nt_load_library, 1, 1, @@ -588,7 +596,7 @@ DEFINE_PRIMITIVE ("NT:LOAD-LIBRARY", Prim_nt_load_library, 1, 1, CHECK_ARG (1, STRING_P); it = LoadLibrary ((LPSTR)STRING_LOC (ARG_REF (1), 0)); - PRIMITIVE_RETURN (long_to_integer (it)); + PRIMITIVE_RETURN (long_to_integer ((long) it)); } DEFINE_PRIMITIVE ("NT:FREE-LIBRARY", Prim_nt_free_library, 1, 1, @@ -623,7 +631,7 @@ DEFINE_PRIMITIVE ("NT:GET-PROC-ADDRESS", Prim_nt_get_proc_address, 2, 2, it = GetProcAddress (module, function_name); - PRIMITIVE_RETURN (it==NULL ? SHARP_F : long_to_integer (it)); + PRIMITIVE_RETURN (it==NULL ? SHARP_F : long_to_integer ((long) it)); } DEFINE_PRIMITIVE ("NT:SEND-MESSAGE", Prim_send_message, 4, 4, @@ -1227,7 +1235,7 @@ DEFINE_PRIMITIVE ("WIN32-SCREEN-CREATE!", SendMessage (hwnd, SCREEN_SETMODES, (WPARAM) arg_integer (2), (LPARAM) 0); - PRIMITIVE_RETURN (hwnd ? long_to_integer (hwnd) : SHARP_F); + PRIMITIVE_RETURN (hwnd ? long_to_integer ((long) hwnd) : SHARP_F); } } diff --git a/v7/src/microcode/ntscreen.c b/v7/src/microcode/ntscreen.c index 5ba6a655e..c4f6bc41f 100644 --- a/v7/src/microcode/ntscreen.c +++ b/v7/src/microcode/ntscreen.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntscreen.c,v 1.23 1996/03/21 16:35:15 adams Exp $ +$Id: ntscreen.c,v 1.24 1996/10/02 18:58:14 cph Exp $ -Copyright (c) 1993-1996 Massachusetts Institute of Technology +Copyright (c) 1993-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -189,7 +189,7 @@ int GetControlKeyState(void); #define xfree free #define xmalloc malloc -LRESULT FAR PASCAL ScreenWndProc (HWND, UINT, WPARAM, LPARAM); +LRESULT FAR CALLBACK ScreenWndProc (HWND, UINT, WPARAM, LPARAM); VOID RegisterScreen (SCREEN); VOID UnregisterScreen (SCREEN); @@ -436,15 +436,15 @@ Screen_IsScreenHandle (HANDLE handle) } //--------------------------------------------------------------------------- -// LRESULT FAR PASCAL ScreenWndProc (HWND hWnd, UINT uMsg, -// WPARAM wParam, LPARAM lParam ) +// LRESULT FAR CALLBACK ScreenWndProc (HWND hWnd, UINT uMsg, +// WPARAM wParam, LPARAM lParam ) // // This is the TTY Window Proc. This handles ALL messages to the tty // window. // //--------------------------------------------------------------------------- -LRESULT FAR PASCAL +LRESULT FAR CALLBACK ScreenWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { SCREEN screen = GETSCREEN (hWnd); diff --git a/v7/src/microcode/ntsig.c b/v7/src/microcode/ntsig.c index 680ca3bb0..e187849b2 100644 --- a/v7/src/microcode/ntsig.c +++ b/v7/src/microcode/ntsig.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntsig.c,v 1.17 1996/03/23 19:24:53 adams Exp $ +$Id: ntsig.c,v 1.18 1996/10/02 18:58:19 cph Exp $ Copyright (c) 1992-96 Massachusetts Institute of Technology @@ -320,7 +320,7 @@ extern void EXFUN (tty_set_next_interrupt_char, (cc_t)); { \ if (keyboard_interrupt_enables & (mask)) \ { \ - tty_set_next_interrupt_char (interrupt_char); \ + tty_set_next_interrupt_char ((cc_t) interrupt_char); \ interrupt_p = 1; \ } \ else \ diff --git a/v7/src/microcode/ntsys.c b/v7/src/microcode/ntsys.c index 28fbfbf42..1c9213576 100644 --- a/v7/src/microcode/ntsys.c +++ b/v7/src/microcode/ntsys.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ntsys.c,v 1.5 1996/04/09 20:16:32 adams Exp $ +$Id: ntsys.c,v 1.6 1996/10/02 18:58:21 cph Exp $ -Copyright (c) 1992-1996 Massachusetts Institute of Technology +Copyright (c) 1992-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -42,7 +42,7 @@ nt_console_write (void * vbuffer, size_t nsize) unsigned char * buffer = vbuffer; int i; - for (i = 0; i < nsize; i++) + for (i = 0; i < ((int) nsize); i++) putchar (buffer[i]); return (nsize); diff --git a/v7/src/microcode/nttty.c b/v7/src/microcode/nttty.c index a86b60687..531cc2c9c 100644 --- a/v7/src/microcode/nttty.c +++ b/v7/src/microcode/nttty.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: nttty.c,v 1.5 1995/10/24 05:07:31 cph Exp $ +$Id: nttty.c,v 1.6 1996/10/02 18:58:24 cph Exp $ -Copyright (c) 1992-95 Massachusetts Institute of Technology +Copyright (c) 1992-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -106,7 +106,7 @@ void DEFUN_VOID (NT_initialize_tty) { extern Tchannel EXFUN (OS_open_handle, (int fd)); - input_channel = (OS_open_handle (master_tty_window)); + input_channel = (OS_open_handle ((int) master_tty_window)); (CHANNEL_INTERNAL (input_channel)) = 1; output_channel = input_channel; (CHANNEL_INTERNAL (output_channel)) = 1; @@ -114,8 +114,6 @@ DEFUN_VOID (NT_initialize_tty) tty_command_beep = ALERT_STRING; tty_command_clear = "\014"; - - return; } /* Fake TERMCAP capability */ diff --git a/v7/src/microcode/ntutl/scheme32.c b/v7/src/microcode/ntutl/scheme32.c index 7684fbd52..f71a7decd 100644 --- a/v7/src/microcode/ntutl/scheme32.c +++ b/v7/src/microcode/ntutl/scheme32.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: scheme32.c,v 1.10 1996/04/09 20:09:04 adams Exp $ +$Id: scheme32.c,v 1.11 1996/10/02 19:00:09 cph Exp $ Copyright (c) 1993-96 Massachusetts Institute of Technology @@ -40,7 +40,7 @@ MIT in each case. */ #include #include -static BOOL +static BOOL __cdecl win32_under_win32s_p (void) { return ((BOOL) 0); @@ -66,7 +66,7 @@ win32_under_win32s_p (void) //} -static char * +static char * __cdecl win32_allocate_heap (unsigned long size, unsigned long * handle) { LPVOID base; @@ -79,7 +79,7 @@ win32_allocate_heap (unsigned long size, unsigned long * handle) return ((char *) base); } -static void +static void __cdecl win32_release_heap (char * area, unsigned long handle) { VirtualFree (((LPVOID) area), @@ -91,13 +91,13 @@ win32_release_heap (char * area, unsigned long handle) return; } -static BOOL +static BOOL __cdecl win32_lock_memory_area (void * area, unsigned long size) { return (VirtualLock (area, size)); } -static void +static void __cdecl win32_unlock_memory_area (void * area, unsigned long size) { (void) VirtualUnlock (area, size); @@ -161,7 +161,7 @@ win32_nt_timer_tick (UINT wID, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2) return; } -static void +static void __cdecl win32_flush_async_timer (void * state) { struct win32_timer_closure_s * scm_timer @@ -180,7 +180,7 @@ win32_flush_async_timer (void * state) return; } -static UINT +static UINT __cdecl win32_install_async_timer (void ** state_ptr, unsigned long * base, long memtop_off, @@ -249,7 +249,7 @@ win32_install_async_timer (void ** state_ptr, /* These are NOPs in this version. */ -static BOOL +static BOOL __cdecl win32_alloc_scheme_selectors (unsigned long base, unsigned long size, unsigned short * scheme_cs, @@ -259,7 +259,7 @@ win32_alloc_scheme_selectors (unsigned long base, return (FALSE); } -static void +static void __cdecl win32_release_scheme_selectors (unsigned short scheme_cs, unsigned short scheme_ds, unsigned short scheme_ss) @@ -268,7 +268,7 @@ win32_release_scheme_selectors (unsigned short scheme_cs, } -void +void FAR WINAPI install_win32_system_utilities (WIN32_SYSTEM_UTILITIES *utils) { #define EXPORT(field) utils->field = win32_##field diff --git a/v7/src/microcode/ntutl/scm-cl3.lst b/v7/src/microcode/ntutl/scm-cl3.lst index 192397503..64c2a210d 100644 --- a/v7/src/microcode/ntutl/scm-cl3.lst +++ b/v7/src/microcode/ntutl/scm-cl3.lst @@ -67,7 +67,7 @@ ntenv.obj ntfile.obj ntfs.obj ntgui.obj -ntgui.rbj +ntgui.res ntio.obj ntsig.obj ntsys.obj diff --git a/v7/src/microcode/option.c b/v7/src/microcode/option.c index d4d5e6ff3..7a4199bd3 100644 --- a/v7/src/microcode/option.c +++ b/v7/src/microcode/option.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: option.c,v 1.42 1995/07/27 00:10:55 adams Exp $ +$Id: option.c,v 1.43 1996/10/02 18:58:26 cph Exp $ -Copyright (c) 1990-95 Massachusetts Institute of Technology +Copyright (c) 1990-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -51,8 +51,10 @@ extern int atoi (); #ifdef WINNT #include #include +#include #else extern int strlen (); +extern char * malloc (); #endif #ifndef NULL @@ -546,7 +548,6 @@ DEFUN (strchr, (s, c), CONST char * s AND int c) static PTR DEFUN (xmalloc, (n), unsigned long n) { - extern char * malloc (); PTR result = (malloc (n)); if (result == 0) { diff --git a/v7/src/microcode/osscheme.c b/v7/src/microcode/osscheme.c index d8c56f035..b81899499 100644 --- a/v7/src/microcode/osscheme.c +++ b/v7/src/microcode/osscheme.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: osscheme.c,v 1.8 1994/11/14 05:10:53 cph Exp $ +$Id: osscheme.c,v 1.9 1996/10/02 18:58:30 cph Exp $ -Copyright (c) 1990-94 Massachusetts Institute of Technology +Copyright (c) 1990-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -34,6 +34,7 @@ MIT in each case. */ #include "scheme.h" #include "osscheme.h" +#include "prims.h" extern void EXFUN (signal_error_from_primitive, (long error_code)); diff --git a/v7/src/microcode/prim.c b/v7/src/microcode/prim.c index 03b081aae..78986cf51 100644 --- a/v7/src/microcode/prim.c +++ b/v7/src/microcode/prim.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prim.c,v 9.37 1993/10/27 23:55:26 gjr Exp $ +$Id: prim.c,v 9.38 1996/10/02 18:58:31 cph Exp $ -Copyright (c) 1988-92 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -59,8 +59,8 @@ DEFINE_PRIMITIVE ("PRIMITIVE-OBJECT-TYPE?", Prim_prim_obj_type_p, 2, 2, PRIMITIVE_HEADER (2); PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT - ((OBJECT_TYPE (ARG_REF (2))) == - (arg_index_integer (1, (MAX_TYPE_CODE + 1))))); + (((long) (OBJECT_TYPE (ARG_REF (2)))) + == (arg_index_integer (1, (MAX_TYPE_CODE + 1))))); } DEFINE_PRIMITIVE ("PRIMITIVE-OBJECT-DATUM", Prim_prim_obj_datum, 1, 1, @@ -149,8 +149,8 @@ DEFINE_PRIMITIVE ("OBJECT-TYPE?", Prim_object_type_p, 2, 2, 0) TOUCH_IN_PRIMITIVE ((ARG_REF (2)), object); PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT - ((OBJECT_TYPE (object)) == - (arg_index_integer (1, (MAX_TYPE_CODE + 1))))); + (((long) (OBJECT_TYPE (object))) + == (arg_index_integer (1, (MAX_TYPE_CODE + 1))))); } DEFINE_PRIMITIVE ("OBJECT-DATUM", Prim_object_datum, 1, 1, 0) diff --git a/v7/src/microcode/primutl.c b/v7/src/microcode/primutl.c index e577f431a..24ae8d0b7 100644 --- a/v7/src/microcode/primutl.c +++ b/v7/src/microcode/primutl.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: primutl.c,v 9.69 1993/11/05 00:44:57 gjr Exp $ +$Id: primutl.c,v 9.70 1996/10/02 18:58:34 cph Exp $ -Copyright (c) 1988-1993 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -140,6 +140,7 @@ DEFUN_VOID (Prim_unimplemented) signal_error_from_primitive (ERR_UNIMPLEMENTED_PRIMITIVE); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } static void diff --git a/v7/src/microcode/prntfs.c b/v7/src/microcode/prntfs.c index 244f86820..61dc31410 100644 --- a/v7/src/microcode/prntfs.c +++ b/v7/src/microcode/prntfs.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prntfs.c,v 1.5 1995/10/28 01:03:30 cph Exp $ +$Id: prntfs.c,v 1.6 1996/10/02 18:58:37 cph Exp $ -Copyright (c) 1993-95 Massachusetts Institute of Technology +Copyright (c) 1993-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -194,9 +194,9 @@ static void DEFUN (file_mode_string, (s, a), struct stat * s AND char * a) { (a[0]) = (file_type_letter (s)); - rwx ((((s -> st_mode) & 0700) << 0), (& (a [1]))); - rwx ((((s -> st_mode) & 0070) << 3), (& (a [4]))); - rwx ((((s -> st_mode) & 0007) << 6), (& (a [7]))); + rwx (((unsigned short) (((s -> st_mode) & 0700) << 0)), (& (a [1]))); + rwx (((unsigned short) (((s -> st_mode) & 0070) << 3)), (& (a [4]))); + rwx (((unsigned short) (((s -> st_mode) & 0007) << 6)), (& (a [7]))); #ifdef S_ISUID if (((s -> st_mode) & S_ISUID) != 0) (a[3]) = (((a[3]) == 'x') ? 's' : 'S'); @@ -365,11 +365,11 @@ The file must exist and you must be the owner (or superuser).") { PRIMITIVE_HEADER (3); { - time_t times[2]; - - times[0] = (time_t) arg_integer (2); - times[1] = (time_t) arg_integer (3); - STD_VOID_SYSTEM_CALL(syscall_utime, (utime ((STRING_ARG (1)), ×))); + struct utimbuf times; + (times . actime) = ((time_t) (arg_integer (2))); + (times . modtime) = ((time_t) (arg_integer (3))); + STD_VOID_SYSTEM_CALL + (syscall_utime, (utime ((STRING_ARG (1)), (×)))); PRIMITIVE_RETURN (SHARP_F); } } diff --git a/v7/src/microcode/prntio.c b/v7/src/microcode/prntio.c index 031fcdf37..3caaf78eb 100644 --- a/v7/src/microcode/prntio.c +++ b/v7/src/microcode/prntio.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prntio.c,v 1.2 1993/09/03 17:52:46 gjr Exp $ +$Id: prntio.c,v 1.3 1996/10/02 18:58:40 cph Exp $ -Copyright (c) 1993 Massachusetts Institute of Technology +Copyright (c) 1993-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -45,7 +45,8 @@ MIT in each case. */ DEFINE_PRIMITIVE ("CHANNEL-DESCRIPTOR", Prim_channel_descriptor, 1, 1, 0) { PRIMITIVE_HEADER (1); - PRIMITIVE_RETURN (long_to_integer (CHANNEL_HANDLE (arg_channel (1)))); + PRIMITIVE_RETURN + (long_to_integer ((long) (CHANNEL_HANDLE (arg_channel (1))))); } static HANDLE * @@ -71,10 +72,12 @@ DEFUN (wait_result, (result, limit_object, limit_abandoned), { if (result == WAIT_TIMEOUT) return (FIXNUM_ZERO); - else if ((result >= WAIT_OBJECT_0) && (result <= (WAIT_OBJECT_0 + limit_object))) + else if ((result >= WAIT_OBJECT_0) + && (result <= (WAIT_OBJECT_0 + limit_object))) return (long_to_integer ((result + 1) - WAIT_OBJECT_0)); - else if ((result >= WAIT_ABANDONED_0) && (result <= (WAIT_ABANDONED_0 + limit_abandoned))) - return (long_to_integer (- ((result + 1) - WAIT_ABANDONED_0))); + else if ((result >= WAIT_ABANDONED_0) + && (result <= (WAIT_ABANDONED_0 + limit_abandoned))) + return (long_to_integer (- ((long) ((result + 1) - WAIT_ABANDONED_0)))); else error_system_call ((GetLastError ()), syscall_select); } @@ -114,8 +117,8 @@ DEFINE_PRIMITIVE ("NT:WAITFORMULTIPLEOBJECTS", Prim_nt_waitformultipleobjects, 3 int timeout = (arg_nonnegative_integer (3)); int nhand = (VECTOR_LENGTH (schhands)); HANDLE * handles = (to_win_hand_vec (nhand, (VECTOR_LOC (schhands, 0)))); - DWORD result = (WaitForMultipleObjects (nhand, handles, wait_for_all, timeout)); - + DWORD result + = (WaitForMultipleObjects (nhand, handles, wait_for_all, timeout)); if (handles != ((HANDLE *) NULL)) free (handles); PRIMITIVE_RETURN (wait_result (result, (nhand - 1), (nhand - 1))); diff --git a/v7/src/microcode/prosio.c b/v7/src/microcode/prosio.c index a37be4289..18a876e57 100644 --- a/v7/src/microcode/prosio.c +++ b/v7/src/microcode/prosio.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prosio.c,v 1.12 1994/11/14 02:50:58 cph Exp $ +$Id: prosio.c,v 1.13 1996/10/02 18:58:41 cph Exp $ -Copyright (c) 1987-94 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -51,7 +51,7 @@ DEFUN (arg_to_channel, (argument, arg_number), error_wrong_type_arg (arg_number); { fast long channel = (integer_to_long (argument)); - if (! ((channel >= 0) || (channel < OS_channel_table_size))) + if (! ((channel >= 0) || (channel < ((long) OS_channel_table_size)))) error_wrong_type_arg (arg_number); return (channel); } diff --git a/v7/src/microcode/prosterm.c b/v7/src/microcode/prosterm.c index f206dcf91..dc517ea3a 100644 --- a/v7/src/microcode/prosterm.c +++ b/v7/src/microcode/prosterm.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prosterm.c,v 1.14 1994/11/28 07:36:06 cph Exp $ +$Id: prosterm.c,v 1.15 1996/10/02 18:58:43 cph Exp $ -Copyright (c) 1990-94 Massachusetts Institute of Technology +Copyright (c) 1990-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -113,7 +113,8 @@ DEFINE_PRIMITIVE ("TERMINAL-SET-STATE", Prim_terminal_set_state, 2, 2, 0) CHECK_ARG (2, STRING_P); { SCHEME_OBJECT state = (ARG_REF (2)); - if ((STRING_LENGTH (state)) != (OS_terminal_state_size ())) + if (((unsigned int) (STRING_LENGTH (state))) + != (OS_terminal_state_size ())) error_bad_range_arg (2); OS_terminal_set_state ((arg_terminal (1)), (STRING_LOC (state, 0))); } diff --git a/v7/src/microcode/prostty.c b/v7/src/microcode/prostty.c index 909f8ea22..f014fb6da 100644 --- a/v7/src/microcode/prostty.c +++ b/v7/src/microcode/prostty.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: prostty.c,v 1.5 1993/06/24 07:09:30 gjr Exp $ +$Id: prostty.c,v 1.6 1996/10/02 18:58:47 cph Exp $ -Copyright (c) 1987-1992 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -150,7 +150,8 @@ STRING must be in the correct form for this operating system.") unsigned char * scan; if (! ((STRING_P (argument)) - && ((STRING_LENGTH (argument)) == (num_chars * 2)))) + && (((unsigned int) (STRING_LENGTH (argument))) + == (num_chars * 2)))) error_wrong_type_arg (1); for (i = 0, scan = (STRING_LOC (argument, 0)); i < num_chars; i++) diff --git a/v7/src/microcode/purutl.c b/v7/src/microcode/purutl.c index 73a7f47b7..2c56e0990 100644 --- a/v7/src/microcode/purutl.c +++ b/v7/src/microcode/purutl.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: purutl.c,v 9.47 1993/12/07 20:36:04 gjr Exp $ +$Id: purutl.c,v 9.48 1996/10/02 18:58:49 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -38,6 +38,11 @@ MIT in each case. */ #include "prims.h" #include "gccode.h" #include "zones.h" + +#ifdef WINNT +#include +#include +#endif static void DEFUN (update, (From, To, Was, Will_Be), diff --git a/v7/src/microcode/step.c b/v7/src/microcode/step.c index 88e8bf7e6..33b19702f 100644 --- a/v7/src/microcode/step.c +++ b/v7/src/microcode/step.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: step.c,v 9.32 1994/06/28 19:03:13 cph Exp $ +$Id: step.c,v 9.33 1996/10/02 18:58:51 cph Exp $ -Copyright (c) 1987-94 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -85,6 +85,7 @@ DEFINE_PRIMITIVE ("PRIMITIVE-EVAL-STEP", Prim_eval_step, 3, 3, 0) } PRIMITIVE_ABORT (PRIM_NO_TRAP_EVAL); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } /* (PRIMITIVE-APPLY-STEP OPERATOR OPERANDS HUNK3) @@ -140,6 +141,7 @@ DEFINE_PRIMITIVE ("PRIMITIVE-APPLY-STEP", Prim_apply_step, 3, 3, 0) } PRIMITIVE_ABORT (PRIM_NO_TRAP_APPLY); /*NOTREACHED*/ + PRIMITIVE_RETURN (UNSPECIFIC); } /* (PRIMITIVE-RETURN-STEP VALUE HUNK3) @@ -161,5 +163,6 @@ DEFINE_PRIMITIVE ("PRIMITIVE-RETURN-STEP", Prim_return_step, 2, 2, 0) Install_Traps (hooks); Val = (value); PRIMITIVE_ABORT (PRIM_NO_TRAP_POP_RETURN); + PRIMITIVE_RETURN (UNSPECIFIC); } } diff --git a/v7/src/microcode/string.c b/v7/src/microcode/string.c index 3576d2b48..db0b6c614 100644 --- a/v7/src/microcode/string.c +++ b/v7/src/microcode/string.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: string.c,v 9.36 1993/06/24 07:09:55 gjr Exp $ +$Id: string.c,v 9.37 1996/10/02 18:58:53 cph Exp $ -Copyright (c) 1987-92 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -161,7 +161,7 @@ DEFINE_PRIMITIVE ("VECTOR-8B-REF", Prim_vec_8b_ref, 2, 2, 0) STRING_SET \ (string, \ (arg_index_integer (2, (STRING_LENGTH (string)))), \ - (get_ascii (3))); \ + ((unsigned char) (get_ascii (3)))); \ } \ PRIMITIVE_RETURN (UNSPECIFIC); \ } @@ -232,7 +232,7 @@ DEFINE_PRIMITIVE ("SUBSTRING-MOVE-LEFT!", Prim_substring_move_left, 5, 5, 0) while ((length--) > 0) \ { \ temp = (*scan); \ - (*scan++) = (char_map (temp)); \ + (*scan++) = ((unsigned char) (char_map (temp))); \ } \ PRIMITIVE_RETURN (UNSPECIFIC); \ } @@ -271,7 +271,7 @@ DEFINE_PRIMITIVE ("VECTOR-8B-FILL!", Prim_vec_8b_fill, 4, 4, 0) { VECTOR_8B_SUBSTRING_PREFIX_FORWARD (); while (scan < limit) - (*scan++) = ascii; + (*scan++) = ((unsigned char) ascii); PRIMITIVE_RETURN (UNSPECIFIC); } @@ -297,7 +297,7 @@ DEFINE_PRIMITIVE ("VECTOR-8B-FIND-NEXT-CHAR-CI", Prim_vec_8b_find_next_char_ci, { VECTOR_8B_SUBSTRING_PREFIX_FORWARD (); { - fast unsigned char char1 = (char_upcase (ascii)); + fast unsigned char char1 = ((unsigned char) (char_upcase (ascii))); while (scan < limit) if ((char_upcase (*scan++)) == char1) PRIMITIVE_RETURN (LONG_TO_UNSIGNED_FIXNUM ((scan - 1) - string_start)); @@ -309,7 +309,7 @@ DEFINE_PRIMITIVE ("VECTOR-8B-FIND-PREVIOUS-CHAR-CI", Prim_vec_8b_find_prev_char_ { VECTOR_8B_SUBSTRING_PREFIX_BACKWARD (); { - fast unsigned char char1 = (char_upcase (ascii)); + fast unsigned char char1 = ((unsigned char) (char_upcase (ascii))); while (scan > limit) if ((char_upcase (*--scan)) == char1) PRIMITIVE_RETURN (LONG_TO_UNSIGNED_FIXNUM (scan - string_start)); diff --git a/v7/src/microcode/sysprim.c b/v7/src/microcode/sysprim.c index ba9c5c17d..649e75fe3 100644 --- a/v7/src/microcode/sysprim.c +++ b/v7/src/microcode/sysprim.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: sysprim.c,v 9.41 1995/06/30 22:28:11 nick Exp $ +$Id: sysprim.c,v 9.42 1996/10/02 18:58:56 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -47,6 +47,7 @@ DEFINE_PRIMITIVE ("EXIT", Prim_non_restartable_exit, 0, 0, { PRIMITIVE_HEADER (0); termination_normal (0); + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("EXIT-WITH-VALUE", @@ -56,6 +57,7 @@ as exit status.") { PRIMITIVE_HEADER (1); termination_normal ((int) arg_integer (1)); + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("HALT", Prim_restartable_exit, 0, 0, @@ -63,6 +65,7 @@ DEFINE_PRIMITIVE ("HALT", Prim_restartable_exit, 0, 0, { PRIMITIVE_HEADER (0); OS_restartable_exit (); + PRIMITIVE_RETURN (UNSPECIFIC); } DEFINE_PRIMITIVE ("UNDER-EMACS?", Prim_under_emacs_p, 0, 0, 0) diff --git a/v7/src/microcode/term.c b/v7/src/microcode/term.c index 67e594034..ca217bddd 100644 --- a/v7/src/microcode/term.c +++ b/v7/src/microcode/term.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: term.c,v 1.12 1995/10/24 05:11:10 cph Exp $ +$Id: term.c,v 1.13 1996/10/02 18:58:59 cph Exp $ -Copyright (c) 1990-95 Massachusetts Institute of Technology +Copyright (c) 1990-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -34,6 +34,9 @@ MIT in each case. */ #include "scheme.h" #include "ostop.h" +#include "osio.h" +#include "osfs.h" +#include "osfile.h" #include "edwin.h" extern long death_blow; @@ -43,6 +46,7 @@ extern void EXFUN (Reset_Memory, (void)); #if defined(WINNT) || defined(_OS2) #define USING_MESSAGE_BOX_FOR_FATAL_OUTPUT +extern void winnt_deallocate_registers (void); #endif static void EXFUN (edwin_auto_save, (void)); @@ -78,7 +82,7 @@ DEFUN (attempt_termination_backout, (code), int code) { SCHEME_OBJECT Term_Vector = (Get_Fixed_Obj_Slot (Termination_Proc_Vector)); if ((! (VECTOR_P (Term_Vector))) - || ((VECTOR_LENGTH (Term_Vector)) <= code)) + || (((long) (VECTOR_LENGTH (Term_Vector))) <= code)) return; { SCHEME_OBJECT Handler = (VECTOR_REF (Term_Vector, code)); diff --git a/v7/src/microcode/usrdef.h b/v7/src/microcode/usrdef.h index 63da155c9..8135c821f 100644 --- a/v7/src/microcode/usrdef.h +++ b/v7/src/microcode/usrdef.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: usrdef.h,v 9.41 1993/08/28 05:43:00 gjr Exp $ +$Id: usrdef.h,v 9.42 1996/10/02 18:59:01 cph Exp $ -Copyright (c) 1987-1993 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -37,11 +37,7 @@ MIT in each case. */ #ifndef SCM_USRDEF_H #define SCM_USRDEF_H -#include "ansidecl.h" -#include "config.h" -#include "object.h" -#include "errors.h" -#include "prim.h" +#include "scheme.h" #include "prims.h" extern SCHEME_OBJECT EXFUN ((* (Static_Primitive_Procedure_Table[])), (void)); diff --git a/v7/src/microcode/utils.c b/v7/src/microcode/utils.c index 5192b3c06..6fbc8d141 100644 --- a/v7/src/microcode/utils.c +++ b/v7/src/microcode/utils.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: utils.c,v 9.69 1995/10/24 05:11:33 cph Exp $ +$Id: utils.c,v 9.70 1996/10/02 18:59:03 cph Exp $ -Copyright (c) 1987-95 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -70,7 +70,7 @@ DEFUN (compute_interrupt_handler_mask, (interrupt_masks, interrupt_number), long interrupt_number) { if ((VECTOR_P (interrupt_masks)) - && (interrupt_number <= (VECTOR_LENGTH (interrupt_masks)))) + && (interrupt_number <= ((long) (VECTOR_LENGTH (interrupt_masks))))) { SCHEME_OBJECT mask = (VECTOR_REF (interrupt_masks, interrupt_number)); @@ -149,7 +149,7 @@ DEFUN (Setup_Interrupt, (masked_interrupts), long masked_interrupts) outf_fatal ("\nInvalid handlers vector (0x%lx).", interrupt_handlers); terminate_no_interrupt_handler (masked_interrupts); } - if (interrupt_number >= (VECTOR_LENGTH (interrupt_handlers))) + if (interrupt_number >= ((long) (VECTOR_LENGTH (interrupt_handlers)))) { outf_fatal("\nInterrupt out of range: %ld (vector length = %ld).", interrupt_number, @@ -622,7 +622,7 @@ DEFUN (Do_Micro_Error, (Err, From_Pop_Return), /*NOTREACHED*/ } - if ((Err < 0) || (Err >= (VECTOR_LENGTH (Error_Vector)))) + if ((Err < 0) || (Err >= ((long) (VECTOR_LENGTH (Error_Vector))))) { if (VECTOR_LENGTH (Error_Vector) == 0) error_death (Err, "No error handlers: Empty handlers vector"); diff --git a/v7/src/microcode/vector.c b/v7/src/microcode/vector.c index 6a922a84a..56bdee99f 100644 --- a/v7/src/microcode/vector.c +++ b/v7/src/microcode/vector.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: vector.c,v 9.36 1992/12/02 19:29:50 cph Exp $ +$Id: vector.c,v 9.37 1996/10/02 18:59:08 cph Exp $ -Copyright (c) 1987-92 Massachusetts Institute of Technology +Copyright (c) 1987-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -214,7 +214,7 @@ DEFINE_PRIMITIVE ("SYSTEM-VECTOR-SET!", Prim_sys_vec_set, 3, 3, 0) TOUCH_IN_PRIMITIVE ((arg_type (1)), vector); \ start = (arg_nonnegative_integer (2)); \ end = (arg_nonnegative_integer (3)); \ - if (end > (VECTOR_LENGTH (vector))) \ + if (end > ((long) (VECTOR_LENGTH (vector)))) \ error_bad_range_arg (3); \ if (start > end) \ error_bad_range_arg (2); \ @@ -310,13 +310,13 @@ DEFINE_PRIMITIVE ("SYSTEM-LIST-TO-VECTOR", Prim_sys_list_to_vector, 2, 2, 0) end1 = (arg_nonnegative_integer (3)); \ TOUCH_IN_PRIMITIVE ((ARG_VECTOR (4)), vector2); \ start2 = (arg_nonnegative_integer (5)); \ - if (end1 > (VECTOR_LENGTH (vector1))) \ + if (end1 > ((long) (VECTOR_LENGTH (vector1)))) \ error_bad_range_arg (3); \ if (start1 > end1) \ error_bad_range_arg (2); \ length = (end1 - start1); \ end2 = (start2 + length); \ - if (end2 > (VECTOR_LENGTH (vector2))) \ + if (end2 > ((long) (VECTOR_LENGTH (vector2)))) \ error_bad_range_arg (5); \ if (ADDRESS_PURE_P (OBJECT_ADDRESS (vector2))) \ signal_error_from_primitive (ERR_WRITE_INTO_PURE_SPACE) @@ -353,7 +353,7 @@ DEFINE_PRIMITIVE ("SUBVECTOR-FILL!", Prim_vector_fill, 4, 4, 0) start = (arg_nonnegative_integer (2)); end = (arg_nonnegative_integer (3)); fill_value = (ARG_REF (4)); - if (end > (VECTOR_LENGTH (vector))) + if (end > ((long) (VECTOR_LENGTH (vector)))) error_bad_range_arg (3); if (start > end) error_bad_range_arg (2); diff --git a/v7/src/microcode/wabbit.c b/v7/src/microcode/wabbit.c index ea8006575..b232cdf5e 100644 --- a/v7/src/microcode/wabbit.c +++ b/v7/src/microcode/wabbit.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: wabbit.c,v 1.3 1994/03/25 00:58:52 gjr Exp $ +$Id: wabbit.c,v 1.4 1996/10/02 18:59:11 cph Exp $ -Copyright (c) 1994 Massachusetts Institute of Technology +Copyright (c) 1994-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -614,7 +614,7 @@ DEFUN (wabbit_season, (wabbit_descriptor), { long n_wabbits, buf_len, ctr; SCHEME_OBJECT - * result, * area, * saved_area, * wabbit_ptr, + * result, * area, * saved_area, wabbit_buffer, wabbit_vector, * wabbit_vector_ptr; wabbit_vector = (VECTOR_REF (wabbit_descriptor, 1)); diff --git a/v8/src/microcode/cmpint.c b/v8/src/microcode/cmpint.c index ee8464c7c..8d5a30968 100644 --- a/v8/src/microcode/cmpint.c +++ b/v8/src/microcode/cmpint.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: cmpint.c,v 1.87 1995/10/08 15:31:46 cph Exp $ +$Id: cmpint.c,v 1.88 1996/10/02 18:57:13 cph Exp $ -Copyright (c) 1989-1995 Massachusetts Institute of Technology +Copyright (c) 1989-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -151,7 +151,7 @@ MIT in each case. */ #define ASM_ENTRY_POINT(name) name #endif -#if defined(__STDC__) || defined(__IBMC__) +#if defined(__STDC__) || defined(__IBMC__) || defined(CL386) #define EXFNX(name, proto) ASM_ENTRY_POINT (name) proto #define DEFNX(name, arglist, args) ASM_ENTRY_POINT (name) (args) #define DEFNX_VOID(name) ASM_ENTRY_POINT (name) (void) @@ -3119,7 +3119,7 @@ DEFUN (bkpt_remove, (ep, handle), PTR ep AND SCHEME_OBJECT handle) C_UTILITY Boolean DEFUN (bkpt_p, (ep), PTR ep) { - return (SHARP_F); + return (FALSE); } C_UTILITY SCHEME_OBJECT @@ -3127,6 +3127,7 @@ DEFUN (bkpt_proceed, (ep, handle, state), PTR ep AND SCHEME_OBJECT handle AND SCHEME_OBJECT state) { error_external_return (); + return (UNSPECIFIC); } C_UTILITY PTR diff --git a/v8/src/microcode/interp.c b/v8/src/microcode/interp.c index 7067006d0..f72d88057 100644 --- a/v8/src/microcode/interp.c +++ b/v8/src/microcode/interp.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: interp.c,v 9.87 1995/09/15 05:48:48 cph Exp $ +$Id: interp.c,v 9.88 1996/10/02 18:57:49 cph Exp $ -Copyright (c) 1988-1995 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1539,7 +1539,7 @@ apply_dispatch: nactuals = (OBJECT_DATUM (nargs)); data = (MEMORY_REF (Function, ENTITY_DATA)); if ((VECTOR_P (data)) - && (nactuals < (VECTOR_LENGTH (data))) + && (nactuals < ((long) (VECTOR_LENGTH (data)))) && ((VECTOR_REF (data, nactuals)) != SHARP_F) && ((VECTOR_REF (data, 0)) == (Get_Fixed_Obj_Slot (ARITY_DISPATCHER_TAG)))) @@ -1610,9 +1610,9 @@ apply_dispatch: Apply_Future_Check(formals, FAST_MEMORY_REF (Function, LAMBDA_FORMALS)); - if ((nargs != VECTOR_LENGTH (formals)) && - ((OBJECT_TYPE (Function) != TC_LEXPR) || - (nargs < VECTOR_LENGTH (formals)))) + if ((nargs != ((long) (VECTOR_LENGTH (formals)))) + && ((OBJECT_TYPE (Function) != TC_LEXPR) + || (nargs < ((long) (VECTOR_LENGTH (formals)))))) { STACK_PUSH (STACK_FRAME_HEADER + nargs - 1); Apply_Error(ERR_WRONG_NUMBER_OF_ARGUMENTS); diff --git a/v8/src/microcode/lookup.c b/v8/src/microcode/lookup.c index 1029ad5a2..97dc067dc 100644 --- a/v8/src/microcode/lookup.c +++ b/v8/src/microcode/lookup.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: lookup.c,v 9.55 1995/07/26 23:44:54 adams Exp $ +$Id: lookup.c,v 9.56 1996/10/02 18:57:55 cph Exp $ -Copyright (c) 1988-1993 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -1192,7 +1192,7 @@ redo_aux_lookup: scan = (OBJECT_ADDRESS (extension)); - if ((temp + (AUX_LIST_FIRST - 1)) == (VECTOR_LENGTH (extension))) + if ((temp + (AUX_LIST_FIRST - 1)) == ((long) (VECTOR_LENGTH (extension)))) { fast long i; fast SCHEME_OBJECT *fast_free; diff --git a/v8/src/microcode/lookup.h b/v8/src/microcode/lookup.h index 89ddc8742..81dea21a8 100644 --- a/v8/src/microcode/lookup.h +++ b/v8/src/microcode/lookup.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: lookup.h,v 9.49 1995/07/26 23:45:49 adams Exp $ +$Id: lookup.h,v 9.50 1996/10/02 18:58:01 cph Exp $ -Copyright (c) 1988-92 Massachusetts Institute of Technology +Copyright (c) 1988-96 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -192,7 +192,8 @@ extern SCHEME_OBJECT { \ fast SCHEME_OBJECT frame; \ \ -label: \ +/* Deleted this label to eliminate compiler warnings: */ \ +/* label: */ \ \ frame = (MEMORY_FETCH (hunk [VARIABLE_COMPILED_TYPE])); \ \ @@ -263,7 +264,7 @@ label: \ break; \ } \ depth = verified_offset(offset, get_offset(hunk)); \ - if (depth > VECTOR_LENGTH (frame)) \ + if (depth > ((long) (VECTOR_LENGTH (frame)))) \ { \ cell = uncompiled_trap_object; \ break; \