/* -*-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
\f
/* 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,
channel_err_type, channel_err));
}
-static PSZ
+static const char *
rewrite_arguments (const char ** argv)
{
unsigned long nargs = 0;
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
}
}
-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));
/* -*-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
#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);
\f
DEFINE_PRIMITIVE ("OS2-SELECT-REGISTRY-LUB", Prim_OS2_select_registry_lub, 0, 0, 0)
{
{
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;