#include <u.h>
#include <libc.h>
char **environ;
extern int main(int, char**, ...);
void
_main(char *argv0, ...)
{
char **argv, **p, **envv;
int argc, envc;
argc = 0;
p = &argv0;
for(argv = p; *p; p++)
argc++;
envc = 0;
for(envv = p++; *p; p++)
envc++;
environ = envv;
main(argc, argv, envv);
_exits(0);
}
|