home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
progm
/
spawno.zip
/
SPAWNVPE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-13
|
1KB
|
38 lines
/********************************************************************/
/* SPAWNO v2.0 XMS/disk swapping replacement for spawn...() */
/* (c) Copyright 1990 Ralf Brown All Rights Reserved */
/* */
/* May be freely copied provided that this copyright notice is */
/* not altered or removed. */
/********************************************************************/
#include "spawno.h"
#include <alloc.h>
#include <errno.h>
extern int errno ;
extern char *__spawn_env ;
char * pascal __spawn_search(const char *) ;
int pascal __spawn_buildenv(const char **) ;
int _Cdecl spawnvpeo(const char *overlay_path, const char *name, va_list args,
const char **env)
{
char *prog_path = __spawn_search(name) ;
int retval ;
if (prog_path)
{
retval = __spawnv(overlay_path,prog_path,args,__spawn_buildenv(env)) ;
free(__spawn_env) ;
return retval ;
}
else
{
errno = ENOENT ; /* path or filename not found */
/* _doserrno already set by __spawn_search() */
return -1 ;
}
}