#include #include #include "multiproto.h" struct { char *name; void (*fn)(int, char**); } mains[] = { #include "multi.h" }; void main(int argc, char **argv) { int i; char *cmd, *p; if(argc == 1){ fprint(2, "usage: multi cmd args...\n"); exits("usage"); } cmd = argv[1]; if(p = strrchr(cmd, '/')) cmd = p+1; argv++; argc--; for(i=0; i