]> hydra-www.ietfng.org Git - gtetrinet/commitdiff
Replace GDK-deprecated g_string_sprintf and g_string_sprintfa with g_string_printf...
authorJordi Mallach <jordim@src.gnome.org>
Wed, 29 Jan 2003 16:46:53 +0000 (16:46 +0000)
committerJordi Mallach <jordim@src.gnome.org>
Wed, 29 Jan 2003 16:46:53 +0000 (16:46 +0000)
Add missing include <sys/poll.h> to gtetrinet.c.

ChangeLog
src/client.c
src/gtetrinet.c

index 12f80a8c53b97acd391c5da0bcac0e38f7be4cdf..d14460981b3029e37f6035aa309a7584d9a5d5b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-01-29  Jordi Mallach  <jordi@sindominio.net>
+
+       * src/client.c (client_connect): change deprecated g_string_sprintf
+       and g_stringsprintfa to g_string_printf and g_string_append_printf.
+       * src/gtetrinet.c: include <sys/poll.h>.
+
 2003-01-28  James Antill  <james@and.org>
 
        * src/gtetrinet.c (gtetrinet_poll_func): Added fast poll() function.
index 3b598764a08973f1bbb266ca356562eca9ffd4a7..78ea86bc3fdd657f14fcc1892c15581bd936b982 100644 (file)
@@ -417,13 +417,13 @@ int client_connect (void)
         
         /* construct message */
         if (gamemode == TETRIFAST)
-          g_string_sprintf (s1, "tetrifaster %s 1.13", nick);
+          g_string_printf (s1, "tetrifaster %s 1.13", nick);
         else
-          g_string_sprintf (s1, "tetrisstart %s 1.13", nick);
+          g_string_printf (s1, "tetrisstart %s 1.13", nick);
 
         /* do that encoding thingy */
         server_ip (ip);
-        g_string_sprintf (iphashbuf, "%d",
+        g_string_printf (iphashbuf, "%d",
                           ip[0]*54 + ip[1]*41 + ip[2]*29 + ip[3]*17);
         l = iphashbuf->len;
 
@@ -438,7 +438,7 @@ int client_connect (void)
 
         g_string_truncate(s1, 0);
         for (i = 0; i < len; i ++)
-          g_string_sprintfa(s1, "%02X", s2->str[i] & 0xFF);
+          g_string_append_printf(s1, "%02X", s2->str[i] & 0xFF);
 
         /* now send to server */
         client_sendmsg (s1->str);
index 8c9f99c234155367949f2e409839491c2b6b1492..47ec6e128118983061e423c46ddfeab5b0e88229 100644 (file)
@@ -26,6 +26,7 @@
 #include <gnome.h>
 #include <stdlib.h>
 #include <time.h>
+#include <sys/poll.h>
 #include <sys/types.h>
 #include <signal.h>