# HG changeset patch # User Matti Hamalainen # Date 1338005223 -10800 # Node ID 607bd4491e793d886167e45b3cb189932906a112 # Parent 4b2f94b1a3c141bf98c5ef4491a68f8895ca361a Fix win32 build. diff -r 4b2f94b1a3c1 -r 607bd4491e79 main.c --- 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 #include -#include #ifdef __WIN32 -// Undefine because both windows.h and curses.h #define it -#undef MOUSE_MOVED #include #else #include @@ -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 diff -r 4b2f94b1a3c1 -r 607bd4491e79 ui.h --- a/ui.h Sat May 26 06:58:49 2012 +0300 +++ b/ui.h Sat May 26 07:07:03 2012 +0300 @@ -6,14 +6,17 @@ #ifndef LIBNNUI_H #define LIBNNUI_H -#include "th_types.h" -#include "th_string.h" - +#ifdef __WIN32 +// Undefine because both windows.h and curses.h #define it +#undef MOUSE_MOVED +#endif #ifdef HAVE_NCURSES_H #include #else #include #endif +#include "th_types.h" +#include "th_string.h" #define SET_MAX_WINDOWS (32) diff -r 4b2f94b1a3c1 -r 607bd4491e79 util.c --- a/util.c Sat May 26 06:58:49 2012 +0300 +++ b/util.c Sat May 26 07:07:03 2012 +0300 @@ -4,6 +4,7 @@ * (C) Copyright 2008-2012 Tecnic Software productions (TNSP) */ #include "util.h" +#include BOOL str_get_timestamp(char *str, size_t len, const char *fmt)