From: Chris Hanson Date: Wed, 22 Oct 1997 20:00:17 +0000 (+0000) Subject: Fix bugs from most recent changes. X-Git-Tag: 20090517-FFI~4972 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6644d481863834348fea2a0803b1a8f80a158813;p=mit-scheme.git Fix bugs from most recent changes. --- diff --git a/v7/src/microcode/os2proc.c b/v7/src/microcode/os2proc.c index 5dc93f64b..34d42c7a7 100644 --- a/v7/src/microcode/os2proc.c +++ b/v7/src/microcode/os2proc.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2proc.c,v 1.4 1997/10/22 05:24:30 cph Exp $ +$Id: os2proc.c,v 1.5 1997/10/22 19:59:57 cph Exp $ Copyright (c) 1995-97 Massachusetts Institute of Technology @@ -542,8 +542,8 @@ find_process (PID pid) /* OBSOLETE */ -static PSZ rewrite_arguments (const char **); -static PSZ rewrite_environment (const char **); +static const char * rewrite_arguments (const char **); +static const char * rewrite_environment (const char **); Tprocess OS_make_subprocess (const char * filename, @@ -573,7 +573,7 @@ OS_make_subprocess (const char * filename, channel_err_type, channel_err)); } -static PSZ +static const char * rewrite_arguments (const char ** argv) { unsigned long nargs = 0; @@ -584,8 +584,8 @@ rewrite_arguments (const char ** argv) nargs += 1; } { - PSZ result = (dstack_alloc (length + ((nargs < 2) ? 2 : nargs) + 1)); - PSZ scan_result = result; + char * result = (dstack_alloc (length + ((nargs < 2) ? 2 : nargs) + 1)); + char * scan_result = result; if (nargs == 0) (*scan_result++) = '\0'; else @@ -614,17 +614,17 @@ rewrite_arguments (const char ** argv) } } -static PSZ +static const char * rewrite_environment (const char ** envp) { - unsigned long length; - const char ** scan_env; + unsigned long length = 0; + const char ** scan_env = envp; const char * binding; - PSZ result; - PSZ scan_result; + char * result; + char * scan_result; - length = 0; - scan_env = envp; + if (envp == 0) + return (0); while ((binding = (*scan_env++)) != 0) length += ((strlen (binding)) + 1); result = (dstack_alloc (length + 1)); diff --git a/v7/src/microcode/pros2io.c b/v7/src/microcode/pros2io.c index e465e0ffc..99088c4e7 100644 --- a/v7/src/microcode/pros2io.c +++ b/v7/src/microcode/pros2io.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pros2io.c,v 1.6 1997/10/22 05:24:52 cph Exp $ +$Id: pros2io.c,v 1.7 1997/10/22 20:00:17 cph Exp $ Copyright (c) 1994-97 Massachusetts Institute of Technology @@ -38,11 +38,6 @@ MIT in each case. */ #include "osproc.h" extern qid_t OS2_channel_thread_descriptor (Tchannel); -extern Tprocess OS2_make_subprocess - (const char *, PSZ, PSZ, const char *, - enum process_channel_type, Tchannel, - enum process_channel_type, Tchannel, - enum process_channel_type, Tchannel); DEFINE_PRIMITIVE ("OS2-SELECT-REGISTRY-LUB", Prim_OS2_select_registry_lub, 0, 0, 0) { @@ -195,11 +190,11 @@ STDERR is the error channel for the subprocess.\n\ { PRIMITIVE_HEADER (7); { - CONST char * filename = (STRING_ARG (1)); - CONST char * command_line = (STRING_ARG (2)); - CONST char * env = (((ARG_REF (3)) == SHARP_F) ? 0 (STRING_ARG (3))); - CONST char * working_directory - = (((ARG_REF (4)) == SHARP_F) ? 0 (STRING_ARG (4))); + const char * filename = (STRING_ARG (1)); + const char * command_line = (STRING_ARG (2)); + const char * env = (((ARG_REF (3)) == SHARP_F) ? 0 : (STRING_ARG (3))); + const char * working_directory + = (((ARG_REF (4)) == SHARP_F) ? 0 : (STRING_ARG (4))); enum process_channel_type channel_in_type; Tchannel channel_in; enum process_channel_type channel_out_type;