Mercurial > hg > nnchat
comparison 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 |
comparison
equal
deleted
inserted
replaced
467:4b2f94b1a3c1 | 468:607bd4491e79 |
---|---|
6 #include "util.h" | 6 #include "util.h" |
7 #include "network.h" | 7 #include "network.h" |
8 #include "ui.h" | 8 #include "ui.h" |
9 #include "th_args.h" | 9 #include "th_args.h" |
10 #include "th_config.h" | 10 #include "th_config.h" |
11 #include <time.h> | |
11 #include <errno.h> | 12 #include <errno.h> |
12 #include <time.h> | |
13 #ifdef __WIN32 | 13 #ifdef __WIN32 |
14 // Undefine because both windows.h and curses.h #define it | |
15 #undef MOUSE_MOVED | |
16 #include <shlwapi.h> | 14 #include <shlwapi.h> |
17 #else | 15 #else |
18 #include <sys/wait.h> | 16 #include <sys/wait.h> |
19 #endif | 17 #endif |
20 | 18 |
1682 } | 1680 } |
1683 #if defined(__WIN32) && defined(PDCURSES) | 1681 #if defined(__WIN32) && defined(PDCURSES) |
1684 else if (c >= 0x198 && c <= 0x1a0) | 1682 else if (c >= 0x198 && c <= 0x1a0) |
1685 { | 1683 { |
1686 // Chat window switching via Meta/Esc-[1..9] | 1684 // Chat window switching via Meta/Esc-[1..9] |
1687 int win = c - 0x198; | 1685 nn_window_t *win = nnwin_get(c - 0x198); |
1688 if (win < SET_MAX_WINDOWS && chatWindows[win] != NULL) | 1686 if (win != NULL) |
1689 { | 1687 { |
1690 currWin = chatWindows[win]; | 1688 currWin = win; |
1691 update = updateMain = TRUE; | 1689 update = updateMain = TRUE; |
1692 } | 1690 } |
1693 c = ERR; | 1691 c = ERR; |
1694 } | 1692 } |
1695 #endif | 1693 #endif |
1962 #ifdef __WIN32 | 1960 #ifdef __WIN32 |
1963 if (errorMessages) | 1961 if (errorMessages) |
1964 { | 1962 { |
1965 char *tmp; | 1963 char *tmp; |
1966 wclear(editWin); | 1964 wclear(editWin); |
1967 tmp = promptRequester(editWin, "Press enter to quit.\n", FALSE); | 1965 tmp = nnwin_prompt_requester(editWin, "Press enter to quit.\n", FALSE); |
1968 th_free(tmp); | 1966 th_free(tmp); |
1969 } | 1967 } |
1970 #endif | 1968 #endif |
1971 | 1969 |
1972 | 1970 |