From: Jordi Mallach Date: Wed, 29 Jan 2003 16:46:53 +0000 (+0000) Subject: Replace GDK-deprecated g_string_sprintf and g_string_sprintfa with g_string_printf... X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=350a33b706086dc1c48c67e12b081ba2b67c6a8f;p=gtetrinet Replace GDK-deprecated g_string_sprintf and g_string_sprintfa with g_string_printf and g_string_append_printf. Add missing include to gtetrinet.c. --- diff --git a/ChangeLog b/ChangeLog index 12f80a8..d144609 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-01-29 Jordi Mallach + + * 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 . + 2003-01-28 James Antill * src/gtetrinet.c (gtetrinet_poll_func): Added fast poll() function. diff --git a/src/client.c b/src/client.c index 3b59876..78ea86b 100644 --- a/src/client.c +++ b/src/client.c @@ -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); diff --git a/src/gtetrinet.c b/src/gtetrinet.c index 8c9f99c..47ec6e1 100644 --- a/src/gtetrinet.c +++ b/src/gtetrinet.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include