#include #include #include "func.h" char *defaultOptions[]={"help","add","run","del","rm"}; void addCmd(char ** str); void delCmd(char ** str); void runCmd(char ** str); int main(int argc, char *argv[]) { //printf("%d \n", argc); if (argc<2) { printHelp(); return 0; } int choice = whichOption(defaultOptions,argv[1]); printf(argv[1]); printf("choice is %d \n",choice); switch (choice) { case 1: // add addCmd(&argv[2]); case 2: // run runCmd(&argv[2]); case 3: case 4: delCmd(argv[2]); default: printf("not yet implemented\\invalid"); return 0; } return 0; } void addCmd(char ** str) { //TODO: implement printf("adding %s \n", *str); } void delCmd(char ** str) { //TODO: implement printf("removed %s \n", *str); } void runCmd(char ** str) { //TODO: implement printf("running %s \n", *str); }