Mercurial > hg > nnchat
diff main.c @ 571:3ae357fd34bb
Rename quit-related internal variables.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 13 Dec 2012 15:49:43 +0200 |
parents | de1af9652fef |
children | 7f83b1578bda |
line wrap: on
line diff
--- a/main.c Tue Dec 11 13:50:19 2012 +0200 +++ b/main.c Thu Dec 13 15:49:43 2012 +0200 @@ -1515,7 +1515,7 @@ 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; + appQuitFlag = TRUE; break; case 0x09: // Tab = complete username or command @@ -1543,7 +1543,7 @@ 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; + appQuitFlag = TRUE; break; default: @@ -1962,7 +1962,7 @@ goto err_exit; - if (cursesInit) + if (appCursesInit) { printMsg(NULL, "%s v%s - %s\n", th_prog_name, th_prog_version, th_prog_desc); printMsg(NULL, "%s\n", th_prog_author); @@ -1978,14 +1978,14 @@ printMsg(NULL, "Enter your NN username ...\n"); optUserName = nnwin_prompt_requester(FALSE, &editState, processUserPrompt, updateUserPrompt); - if (editState.exitProg) + if (appQuitFlag) 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) + if (appQuitFlag) goto err_exit; } } @@ -2075,7 +2075,7 @@ // Enter mainloop nn_conn_reset(conn); - while (!editState.isError && !editState.exitProg) + while (!editState.isError && !appQuitFlag) { int retries = 3, cres; @@ -2113,7 +2113,7 @@ editState.isError = TRUE; // Handle user input - if (cursesInit) + if (appCursesInit) { nnwin_input_process(editBuf, &editState, processUserInput); nnwin_update(editState.update, editState.mask, editBuf, optUserName, optUserColor); @@ -2136,7 +2136,7 @@ nn_conn_send_msg_v(conn, optUserNameEnc, "%%2FSetFontColor%%20%%2Dcolor%%20%06X", optUserColor); } - if (cursesInit) + if (appCursesInit) { nnwin_update(FALSE, editState.mask, editBuf, optUserName, optUserColor); }