home *** CD-ROM | disk | FTP | other *** search
-
- #include "compat.h"
-
-
- extern int do_exec (char *xfn, char *pars, int spwn,
- unsigned needed, char **envp);
-
- void main (void)
- {
- char fn [255], par [130], *com;
- char far *x;
- char far *y;
-
- x = farmalloc (64L * 1024L); /* test swapping of non-contiguous memory */
- y = farmalloc (64L * 1024L);
- putenv ("XYZ=This is an environment string for the spawned process");
- while (1)
- {
- printf ("\nEXEC filename,params ('.' to exit): ");
- gets (fn);
- if (fn [0] == '.')
- return;
- com = strchr (fn, ',');
- if (com != NULL)
- {
- strcpy (par, &com [1]);
- *com = 0;
- }
- else
- par [0] = 0;
-
- printf ("\nDO_EXEC returns %04x\n", do_exec (fn, par, 1, 0xffff, environ));
- }
- }
-