--- libaitcli/src/aitcli.c 2010/06/04 11:32:47 1.2 +++ libaitcli/src/aitcli.c 2010/06/04 11:46:40 1.2.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitcli.c,v 1.2 2010/06/04 11:32:47 misho Exp $ +* $Id: aitcli.c,v 1.2.2.1 2010/06/04 11:46:40 misho Exp $ * *************************************************************************/ #include "global.h" @@ -273,7 +273,8 @@ void cliNetInit(const char *csProg, int pty, struct te * @win = window size of tty * return: -1 error, 0 = exit w/^+D, 1 done. */ -int cliNetExec(cliCommands_t *cmdList, const char *csPrompt, int sock, struct termios *term, struct winsize *win) +int +cliNetExec(cliCommands_t *cmdList, const char *csPrompt, int sock, struct termios *term, struct winsize *win) { int pty, ret = 0, r, s, alen, attrlen, flg; fd_set fds; @@ -288,10 +289,6 @@ int cliNetExec(cliCommands_t *cmdList, const char *csP case 0: close(sock); -// rl_prep_term_function = cli_Null_Prep_Term; - rl_getc_function = cli_Net_rl_GetCh; - - cliNetInit(getprogname(), STDIN_FILENO, term); ret = cliExec(cmdList, csPrompt) < 0 ? 1 : 0; /* spawn Shell mode */ /* @@ -299,18 +296,7 @@ int cliNetExec(cliCommands_t *cmdList, const char *csP */ _exit(ret); default: - rl_prep_term_function = cli_Null_Prep_Term; - - cliNetInit(getprogname(), pty, term); - /* spawn Shell mode */ - /* - telnet_SetCmd(Attr + 0, DO, TELOPT_TTYPE); - telnet_SetCmd(Attr + 1, WILL, TELOPT_ECHO); - telnet_Set_SubOpt(Attr + 2, TELOPT_LFLOW, LFLOW_OFF, NULL, 0); - telnet_Set_SubOpt(Attr + 3, TELOPT_LFLOW, LFLOW_RESTART_XON, NULL, 0); - telnet_SetCmd(Attr + 4, DO, TELOPT_LINEMODE); - */ telnet_SetCmd(Attr + 0, DO, TELOPT_TTYPE); telnet_SetCmd(Attr + 1, WILL, TELOPT_ECHO); telnet_Set_SubOpt(Attr + 2, TELOPT_LFLOW, LFLOW_OFF, NULL, 0);