changeset 657:8b8ef14d7177 dev-1_5_2

Update to match th-libs API changes.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 06 Feb 2015 23:04:24 +0200
parents 10c05931dfe5
children 04aabecd922a
files main.c
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Mon Feb 02 23:45:39 2015 +0200
+++ b/main.c	Fri Feb 06 23:04:24 2015 +0200
@@ -95,7 +95,7 @@
         optLogDaily = FALSE,
         optOnlyFriendPrv = FALSE;
 
-qlist_t *setIgnoreList = NULL,
+th_llist_t *setIgnoreList = NULL,
         *setFriendList = NULL,
         *setIdleMessages = NULL;
 nn_userhash_t *nnUsers = NULL;
@@ -626,9 +626,9 @@
 }
 
 
-BOOL nn_check_name_list(qlist_t *list, const char *name)
+BOOL nn_check_name_list(th_llist_t *list, const char *name)
 {
-    qlist_t *node;
+    th_llist_t *node;
     
     for (node = list; node != NULL; node = node->next)
     {
@@ -1017,14 +1017,14 @@
 }
 
 
-int nncmd_change_list(th_conn_t *conn, const char *listname, qlist_t **list, const char *name)
+int nncmd_change_list(th_conn_t *conn, const char *listname, th_llist_t **list, const char *name)
 {
     (void) conn;
 
     if (name[0])
     {
         // Add or remove someone to/from ignore
-        qlist_t *user = th_llist_find_func(*list, name, str_compare);
+        th_llist_t *user = th_llist_find_func(*list, name, str_compare);
         if (user != NULL)
         {
             printMsgQ(currWin, "Removed user '%s' from %s list.\n", name, listname);
@@ -1039,7 +1039,7 @@
     else
     {
         // Just list whomever is in ignore now
-        qlist_t *user = *list;
+        th_llist_t *user = *list;
         size_t nuser = th_llist_length(*list);
         char *result = th_strdup_printf("Users on %s list (%d): ", listname, nuser);
         while (user != NULL)
@@ -1356,7 +1356,7 @@
     { "/quit",     CMDARG_NONE,     0, nncmd_quit },
 };
 
-static qlist_t *userCmds = NULL;
+static th_llist_t *userCmds = NULL;
 
 
 void nn_usercmd_init()
@@ -1372,7 +1372,7 @@
 
 int nn_handle_command(th_conn_t *conn, char *buf)
 {
-    qlist_t *curr;
+    th_llist_t *curr;
 
     for (curr = userCmds; curr != NULL; curr = curr->next)
     {
@@ -1433,9 +1433,9 @@
 }
 
 
-static nn_usercmd_t *nn_usercmd_match_do(qlist_t *list, const char *pattern, size_t len)
+static nn_usercmd_t *nn_usercmd_match_do(th_llist_t *list, const char *pattern, size_t len)
 {
-    qlist_t *node;
+    th_llist_t *node;
     for (node = list; node != NULL; node = node->next)
     {
         nn_usercmd_t *cmd = node->data;
@@ -1446,7 +1446,7 @@
 }
 
 
-nn_usercmd_t *nn_usercmd_match(qlist_t *list, const char *pattern, const char *current, BOOL again)
+nn_usercmd_t *nn_usercmd_match(th_llist_t *list, const char *pattern, const char *current, BOOL again)
 {
     nn_usercmd_t *curr;
     size_t len;
@@ -1457,7 +1457,7 @@
     
     if (current != NULL)
     {
-        qlist_t *node;
+        th_llist_t *node;
         for (node = list; node != NULL; node = node->next)
         {
             curr = node->data;
@@ -2392,7 +2392,7 @@
             if (tmpTime - editState.prevKeepAlive > SET_KEEPALIVE)
             {
                 size_t n = ((size_t) rand()) % th_llist_length(setIdleMessages);
-                qlist_t *node = th_llist_get_nth(setIdleMessages, n);
+                th_llist_t *node = th_llist_get_nth(setIdleMessages, n);
                 nn_conn_send_msg(conn, optUserNameEnc, node->data);
                 editState.prevKeepAlive = tmpTime;
             }