#include <u.h>
#include <libc.h>
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++;
print("%d args %d envs\n", argc, envc);
_exits(0);
}
|