Mail Archives: djgpp/1997/01/28/08:56:45
Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote:
:
: On 24 Jan 1997, G.W. Owen wrote:
:
: > It could be just me being silly, but are the info pages for spawn* and
: > exec* in djgpp info totally incomprehensible and inconsistent. The
: > examples don't seem to use the same variable types as the function
: > definitions.
Actually that's totally overboard. I was having a bad hair day. Sorry.
:
: Can you please elaborate what seems to be wrong? As far as I can see,
: there's nothing wrong with either the info pages or the examples for
: these functions. If your problem is that sometimes the use char **args
: and sometimes char *args[], then these are the same as far as the
: compiler is concerned (when passing arguments to functions).
Sure I apologise for not posting first time, but it was at home, not
in the office.
This is from the reference manual for libc.a
spawn*
======
Syntax
------
#include <process.h>
int spawnl(int mode, const char *path, const char *argv0, ...);
int spawnle(int mode, const char *path, const char *argv0, ...
/*, const char **envp */);
int spawnlp(int mode, const char *path, const char *argv0, ...);
int spawnlpe(int mode, const char *path, const char *argv0, ...
/*,const char **envp */);
int spawnv(int mode, const char *path, const char **argv);
int spawnve(int mode, const char *path, const char **argv,
const char **envp);
int spawnvp(int mode, const char *path, const char **argv);
int spawnvpe(int mode, const char *path, const char **argv,
const char **envp);
[cut function description]
Example
-------
char *environ[] = {
"PATH=c:\\dos;c:\\djgpp;c:\\usr\\local\\bin",
"DJGPP=c:/djgpp",
0
};
char *args[] = {
"gcc",
"-v",
"hello.c",
0
};
spawnvpe("gcc", args, environ);
[end quote]
^
^
^
where has the parameter 'int mode'
--
Gareth Owen <G DOT W DOT Owen AT keele DOT ac DOT uk>
Who writes this stuff?
- Raw text -