# HG changeset patch # User Matti Hamalainen # Date 1325111686 -7200 # Node ID bbd5edbf114314e5d2ca4840962969bb28475248 # Parent 40b95d677f682f0396142c8fc3783b25ec80bce6 Cosmetics. diff -r 40b95d677f68 -r bbd5edbf1143 nnchat.c --- a/nnchat.c Thu Oct 13 18:07:33 2011 +0300 +++ b/nnchat.c Thu Dec 29 00:34:46 2011 +0200 @@ -536,9 +536,7 @@ void errorMsgV(const char *fmt, va_list ap) { - char *tmp; - - tmp = th_strdup_vprintf(fmt, ap); + char *tmp = th_strdup_vprintf(fmt, ap); printMsg(NULL, "%s", tmp); @@ -1547,10 +1545,13 @@ size_t bufLen = strlen(ptr) + 1; int result = handleProtocol(conn, ptr, bufLen); - if (result > 0) { + if (result > 0) + { /* Couldn't handle the message for some reason */ printMsg(currWin, "Could not handle: %s\n", ptr); - } else if (result < 0) { + } + else if (result < 0) + { /* Fatal error, quit */ errorMsg("Fatal error with message: %s\n", ptr); isError = TRUE; @@ -1649,7 +1650,8 @@ erase(); timeout(SET_DELAY); - if (!initializeWindows()) { + if (!initializeWindows()) + { errorMsg("Error resizing curses chatWindows\n"); isError = TRUE; } @@ -1679,7 +1681,8 @@ nn_editbuf_clear(editBuf); - if (result < 0) { + if (result < 0) + { errorMsg("Fatal error handling user input: %s\n", editBuf->data); isError = TRUE; } else { @@ -1779,7 +1782,7 @@ case 0x03: /* ^C = quit */ case KEY_F(9): /* F9 = Quit */ - printMsg(currWin, "Quitting per user request.\n"); + printMsg(currWin, "Quitting per user request (%d/0x%x).\n", c, c); exitProg = TRUE; break;