rem: status = AddGroupCmd(servPtr, interp, argc, argv);
add: status = AddGroupCmd(servPtr, interp, argc, (char**)argv);
context: static Tcl_CmdProc PermCmd;static int AddCmds(Tcl_Interp *interp, void *arg);static int AddUserCmd(Server *servPtr, Tcl_Interp *interp,    int argc, char **argv);static int AddGroupCmd(Server *servPtr, Tcl_Interp *interp,    int argc, char **argv);static int AllowDenyCmd(Server *servPtr, Tcl_Interp *interp,    int argc, char **argv, int allow, int user);static int ValidateUserAddr(User *userPtr, char *peer);static int AuthProc(char *server, char *method, char *url, char *user,		    char *pass, char *peer);/* * Static variables defined in this file. */static int             uskey = -1;static Tcl_HashTable   serversTable;/* *---------------------------------------------------------------------- * * Ns_ModuleInit -- * *	Initialize the perms module  * * Results: *	NS_OK/NS_ERROR  * * Side effects: *	Init hash table, add tcl commands.  * *---------------------------------------------------------------------- */intNs_ModuleInit(char *server, char *module){    Server *servPtr;    char *path;    Tcl_HashEntry *hPtr;    int new;    if (uskey < 0) {    	uskey = Ns_UrlSpecificAlloc();	Tcl_InitHashTable(&serversTable, TCL_STRING_KEYS);    }    servPtr = ns_malloc(sizeof(Server));    servPtr->server = server;    path = Ns_ConfigGetPath(server, module, NULL);    Tcl_InitHashTable(&servPtr->users, TCL_STRING_KEYS);    Tcl_InitHashTable(&servPtr->groups, TCL_STRING_KEYS);    Ns_RWLockInit(&servPtr->lock);    Ns_SetRequestAuthorizeProc(server, AuthProc);    Ns_TclInitInterps(server, AddCmds, servPtr);    hPtr = Tcl_CreateHashEntry(&serversTable, server, &new);    Tcl_SetHashValue(hPtr, servPtr);    return NS_OK;}/* *---------------------------------------------------------------------- * * AddCmds -- * *	Add tcl commands for perms  * * Results: *	NS_OK  * * Side effects: *	Adds tcl commands  * *---------------------------------------------------------------------- */static intAddCmds(Tcl_Interp *interpermPtr, void *arg){    Tcl_CreateCommand(interpermPtr, "ns_perm", PermCmd, arg, NULL);    return NS_OK;}/* *---------------------------------------------------------------------- * * PermCmd -- * *	The ns_perm tcl command  * * Results: *	Std tcl ret val  * * Side effects: *	Yes.  * *---------------------------------------------------------------------- */static intPermCmd(ClientData arg, Tcl_Interp *interp, int argc, char **argv){    Server *servPtr = arg;    int status;    if (argc < 2) {	Tcl_AppendResult(interp, "wrong # args: should be \"",			 argv[0], " command ?args ...?\"", NULL);	return TCL_ERROR;    }    Ns_RWLockWrLock(&servPtr->lock);    if (STREQ(argv[1], "adduser")) {	status = AddUserCmd(servPtr, interp, argc, argv);        } else if (STREQ(argv[1], "addgroup")) {	status = AddGroupCmd(servPtr, interp, argc, argv);    } else if (STREQ(argv[1], "allowuser")) {	status = AllowDenyCmd(servPtr, interp, argc, argv, 1, 1);    } else if (STREQ(argv[1], "denyuser")) {	status = AllowDenyCmd(servPtr, interp, argc, argv, 0, 1);    } else if (STREQ(argv[1], "allowgroup")) {	status = AllowDenyCmd(servPtr, interp, argc, argv, 1, 0);    } else if (STREQ(argv[1], "denygroup")) {	status = AllowDenyCmd(servPtr, interp, argc, argv, 0, 0);    } else {	Tcl_AppendResult(interp, "unknown command \"",			 argv[1],			 "\": should be adduser, addgroup, ",			 "allowuser, denyuser, "			 "allowgroup, or denygroup", NULL);	status = TCL_ERROR;    }    Ns_RWLockUnlock(&servPtr->lock);    return status;}