Mercurial > hg > nnchat
diff main.c @ 468:607bd4491e79
Fix win32 build.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 26 May 2012 07:07:03 +0300 |
parents | 796508f828f6 |
children | 53179f875131 |
line wrap: on
line diff
--- a/main.c Sat May 26 06:58:49 2012 +0300 +++ b/main.c Sat May 26 07:07:03 2012 +0300 @@ -8,11 +8,9 @@ #include "ui.h" #include "th_args.h" #include "th_config.h" +#include <time.h> #include <errno.h> -#include <time.h> #ifdef __WIN32 -// Undefine because both windows.h and curses.h #define it -#undef MOUSE_MOVED #include <shlwapi.h> #else #include <sys/wait.h> @@ -1684,10 +1682,10 @@ else if (c >= 0x198 && c <= 0x1a0) { // Chat window switching via Meta/Esc-[1..9] - int win = c - 0x198; - if (win < SET_MAX_WINDOWS && chatWindows[win] != NULL) + nn_window_t *win = nnwin_get(c - 0x198); + if (win != NULL) { - currWin = chatWindows[win]; + currWin = win; update = updateMain = TRUE; } c = ERR; @@ -1964,7 +1962,7 @@ { char *tmp; wclear(editWin); - tmp = promptRequester(editWin, "Press enter to quit.\n", FALSE); + tmp = nnwin_prompt_requester(editWin, "Press enter to quit.\n", FALSE); th_free(tmp); } #endif