changeset 690:6fa9c36d0634

Adjust to match th-libs API changes.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 25 Dec 2019 11:05:31 +0200
parents 1b15cf9442ff
children b5d5d37bbc64
files main.c ui.c ui.h
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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;
--- 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);