From: Chris Hanson Date: Wed, 2 Oct 1996 21:14:10 +0000 (+0000) Subject: Many small changes to eliminate errors and warnings when compiling X-Git-Tag: 20090517-FFI~5378 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=7ea509b702a72a566beaae882dd18f1371547c18;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/bitstr.c b/v7/src/microcode/bitstr.c index 556d8f28d..47d288896 100644 --- a/v7/src/microcode/bitstr.c +++ b/v7/src/microcode/bitstr.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bitstr.c,v 9.57 1996/10/02 18:57:05 cph Exp $ +$Id: bitstr.c,v 9.58 1996/10/02 21:14:10 cph Exp $ Copyright (c) 1987-96 Massachusetts Institute of Technology @@ -601,6 +601,15 @@ DEFUN (long_to_bit_string, (length, number), long length AND long number) } } +static void +DEFUN (btbs_consumer, (result_ptr, digit), + PTR result_ptr + AND long digit) +{ + (* (INC_BIT_STRING_PTR (* ((unsigned char **) result_ptr)))) + = ((unsigned char) digit); +} + SCHEME_OBJECT DEFUN (bignum_to_bit_string, (length, bignum), long length AND SCHEME_OBJECT bignum) @@ -626,20 +635,22 @@ DEFUN (bignum_to_bit_string, (length, bignum), } } -void -DEFUN (btbs_consumer, (result_ptr, digit), - unsigned char ** result_ptr - AND long digit) -{ - (* (INC_BIT_STRING_PTR (*result_ptr))) = ((unsigned char) digit); -} - struct bitstr_to_bignm_context { unsigned char *source_ptr; unsigned int mask; }; +static unsigned int +DEFUN (bstb_producer, (context), PTR context) +{ + struct bitstr_to_bignm_context * c = context; + unsigned int result = (c->mask & (BIT_STRING_WORD (c->source_ptr))); + c->mask = (LOW_MASK (CHAR_BIT)); + DEC_BIT_STRING_PTR (c->source_ptr); + return (result); +} + SCHEME_OBJECT DEFUN (bit_string_to_bignum, (nbits, bitstr), long nbits AND SCHEME_OBJECT bitstr) @@ -670,18 +681,6 @@ DEFUN (bit_string_to_bignum, (nbits, bitstr), (&context), (1L << CHAR_BIT), 0)); } - -unsigned int -DEFUN (bstb_producer, (context), - struct bitstr_to_bignm_context * context) -{ - unsigned int result; - - result = (context->mask & (BIT_STRING_WORD (context->source_ptr))); - context->mask = (LOW_MASK (CHAR_BIT)); - DEC_BIT_STRING_PTR (context->source_ptr); - return (result); -} DEFINE_PRIMITIVE ("UNSIGNED-INTEGER->BIT-STRING", Prim_unsigned_to_bit_string, 2, 2, "(LENGTH INTEGER)\n\ diff --git a/v7/src/microcode/pruxfs.c b/v7/src/microcode/pruxfs.c index 257346dac..3f04fcdae 100644 --- a/v7/src/microcode/pruxfs.c +++ b/v7/src/microcode/pruxfs.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pruxfs.c,v 9.52 1996/04/23 20:50:35 cph Exp $ +$Id: pruxfs.c,v 9.53 1996/10/02 21:13:59 cph Exp $ Copyright (c) 1987-96 Massachusetts Institute of Technology @@ -422,8 +422,10 @@ DEFINE_PRIMITIVE ("FILE-SYSTEM-TYPE", Prim_file_system_type, 1, 1, 0) { PRIMITIVE_HEADER (1); { - char * result = (UX_file_system_type (STRING_ARG (1))); + CONST char * result = (UX_file_system_type (STRING_ARG (1))); PRIMITIVE_RETURN - (char_pointer_to_string ((result == 0) ? "unknown" : result)); + (char_pointer_to_string ((result == 0) + ? "unknown" + : ((unsigned char *) result))); } }