int main() { register_procedure("addtwo", 2, add); register_procedure("minustwo", 2, subtract); launch_server(); /* should never get here, because launch_server(); runs forever. */ return 0; }
int main() { register_procedure("nothing", 0, nothing); register_procedure("addtwo", 2, add); register_procedure("pickFirst", 2, pickFirst); register_procedure("max_of_integer_array", 1, max); register_procedure("concatenate_five_strings", 5, concatStr); #ifdef _DEBUG_1_ printRegisteredProcedures(); #endif launch_server(); return 0; }
int main(int argc, char *argv[]) { register_procedure("sMount", 2, sMount); register_procedure("sUnmount", 2, sUnmount); register_procedure("sOpenDir", 3, sOpenDir); register_procedure("sCloseDir", 3, sCloseDir); register_procedure("sReadDir", 3, sReadDir); register_procedure("sOpen", 4, sOpen); register_procedure("sClose", 3, sClose); register_procedure("sRead", 4, sRead); register_procedure("sWrite", 5, sWrite); register_procedure("sRemove", 2, sRemove); strcpy(serverAlias, argv[1]); launch_server(); return 0; }
int main(int argc, char*argv[]) { if (argc == 2) { registerMountFolder(argv[1]); register_procedure("isAlive", 0, isAlive); register_procedure("fsOpen", 2, fsOpen); register_procedure("fsClose", 1, fsClose); register_procedure("fsRead", 2, fsRead); register_procedure("fsWrite", 3, fsWrite); register_procedure("fsRemove", 1, fsRemove); register_procedure("fsOpenDir", 1, fsOpenDir); register_procedure("fsReadDir", 1, fsReadDir); register_procedure("fsCloseDir", 1, fsCloseDir); #ifdef _DEBUG_1_ printRegisteredProcedures(); #endif launch_server(); } else { printf("Format: ./server <folder_path>\n"); } return 0; }