From: mad14 AT cc DOT keele DOT ac DOT uk (G.W. Owen) Newsgroups: comp.os.msdos.djgpp Subject: Re: libc info Date: 28 Jan 1997 10:49:53 GMT Lines: 73 Distribution: world Message-ID: <5cklkh$5qd@gerry.cc.keele.ac.uk> References: NNTP-Posting-Host: potter.cc.keele.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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 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 Who writes this stuff?