# HG changeset patch # User Matti Hamalainen # Date 1338929974 -10800 # Node ID ba5807ebff8817d5b131f5e64a1706efd40885ad # Parent 6bba730507397734071accf8eae1e52449949fe3 Make it possible to quit when entering username/passwd. diff -r 6bba73050739 -r ba5807ebff88 main.c --- a/main.c Tue Jun 05 23:52:10 2012 +0300 +++ b/main.c Tue Jun 05 23:59:34 2012 +0300 @@ -1462,6 +1462,12 @@ case KEY_ENTER: editState->done = TRUE; break; + + case 0x03: // ^C = quit + case KEY_F(9): // F9 = Quit + printMsg(currWin, "Quitting per user request (%d/0x%x).\n", c, c); + editState->exitProg = TRUE; + break; default: return FALSE; @@ -1655,11 +1661,15 @@ printMsg(NULL, "Enter your NN username ...\n"); optUserName = nnwin_prompt_requester(FALSE, &editState, processUserPrompt, updateUserPrompt); + if (editState.exitProg) + goto err_exit; editState.mask = TRUE; printMsg(NULL, "Enter your NN password ...\n"); optPassword = nnwin_prompt_requester(TRUE, &editState, processUserPrompt, updateUserPrompt); editState.mask = FALSE; + if (editState.exitProg) + goto err_exit; } }