# HG changeset patch # User Matti Hamalainen # Date 1577264731 -7200 # Node ID 6fa9c36d0634c71b581154ba450d1ea8550a775a # Parent 1b15cf9442ffc2f2abd737e6be434a4d42d10d70 Adjust to match th-libs API changes. diff -r 1b15cf9442ff -r 6fa9c36d0634 main.c --- a/main.c Wed Dec 25 08:35:22 2019 +0200 +++ b/main.c Wed Dec 25 11:05:31 2019 +0200 @@ -72,7 +72,7 @@ optProxyType = TH_PROXY_NONE, optProxyAuthType = TH_PROXY_AUTH_NONE, optProxyAddrType = TH_PROXY_ADDR_DOMAIN; -int optUserColor = 0x000000; +unsigned int optUserColor = 0x000000; int optBrowserRunMethod = BMT_NEW_FIREFOX; char *optServer = "chat.newbienudes.com", *optProxyServer = NULL, @@ -312,7 +312,7 @@ break; case 4: - if ((optUserColor = th_get_hex_triplet(optArg)) < 0) + if (!th_get_hex_triplet(optArg, &optUserColor)) { THERR("Invalid color argument '%s', should be a RGB hex triplet '000000'.\n", optArg); @@ -1077,10 +1077,10 @@ int nncmd_set_color(th_conn_t *conn, char *arg) { - int val; + unsigned int val; (void) conn; - if ((val = th_get_hex_triplet(arg)) < 0) + if (!th_get_hex_triplet(arg, &val)) { printMsgQ(currWin, "Invalid color value '%s'\n", arg); return 1; diff -r 1b15cf9442ff -r 6fa9c36d0634 ui.c --- a/ui.c Wed Dec 25 08:35:22 2019 +0200 +++ b/ui.c Wed Dec 25 11:05:31 2019 +0200 @@ -329,7 +329,7 @@ } -void nnwin_update(BOOL force, BOOL mask, nn_editbuf_t *ebuf, char *username, int usercolor) +void nnwin_update(BOOL force, BOOL mask, nn_editbuf_t *ebuf, const char *username, const unsigned int usercolor) { int sx, sy; BOOL changed = FALSE; diff -r 1b15cf9442ff -r 6fa9c36d0634 ui.h --- a/ui.h Wed Dec 25 08:35:22 2019 +0200 +++ b/ui.h Wed Dec 25 11:05:31 2019 +0200 @@ -71,7 +71,7 @@ void nnwin_shutdown(); void nnwin_reset(void); -void nnwin_update(BOOL force, BOOL mask, nn_editbuf_t *ebuf, char *optUserName, int optUserColor); +void nnwin_update(BOOL force, BOOL mask, nn_editbuf_t *ebuf, const char *username, const unsigned int usercolor); nn_window_t * nnwin_main_window(); nn_window_t * nnwin_get(const int index);