Mercurial > pidgin
comparison src/conversation.c @ 13106:a0a4b44239e8
[gaim-migrate @ 15468]
I was reading the gettext man page and it pointed out that it should be typed as const char *, but it's char * to avoid warnings in code predating ANSI C. So, for the heck of it, I changed added a cast in internal.h. As it turns out, there was a lot of code that relied on this. In the interest of type safety, I've fixed all the warnings. I feel this improved a number of function signatures (in terms of typing clarity). Flame me if you object.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 02 Feb 2006 21:34:43 +0000 |
parents | 3bf3f489b64b |
children | fcde3faa1f57 |
comparison
equal
deleted
inserted
replaced
13105:e347b2217b1b | 13106:a0a4b44239e8 |
---|---|
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 if (err < 0) { | 175 if (err < 0) { |
176 const char *who; | 176 const char *who; |
177 char *msg; | 177 const char *msg; |
178 | 178 |
179 who = gaim_conversation_get_name(conv); | 179 who = gaim_conversation_get_name(conv); |
180 | 180 |
181 if (err == -E2BIG) { | 181 if (err == -E2BIG) { |
182 msg = _("Unable to send message: The message is too large."); | 182 msg = _("Unable to send message: The message is too large."); |
183 | 183 |
184 if (!gaim_conv_present_error(who, account, msg)) { | 184 if (!gaim_conv_present_error(who, account, msg)) { |
185 msg = g_strdup_printf(_("Unable to send message to %s."), who); | 185 char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who); |
186 gaim_notify_error(gc, NULL, msg, _("The message is too large.")); | 186 gaim_notify_error(gc, NULL, msg2, _("The message is too large.")); |
187 g_free(msg); | 187 g_free(msg2); |
188 } | 188 } |
189 } | 189 } |
190 else if (err == -ENOTCONN) { | 190 else if (err == -ENOTCONN) { |
191 gaim_debug(GAIM_DEBUG_ERROR, "conversation", | 191 gaim_debug(GAIM_DEBUG_ERROR, "conversation", |
192 "Not yet connected.\n"); | 192 "Not yet connected.\n"); |
193 } | 193 } |
194 else { | 194 else { |
195 msg = _("Unable to send message."); | 195 msg = _("Unable to send message."); |
196 | 196 |
197 if (!gaim_conv_present_error(who, account, msg)) { | 197 if (!gaim_conv_present_error(who, account, msg)) { |
198 msg = g_strdup_printf(_("Unable to send message to %s."), who); | 198 char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who); |
199 gaim_notify_error(gc, NULL, msg, NULL); | 199 gaim_notify_error(gc, NULL, msg2, NULL); |
200 g_free(msg); | 200 g_free(msg2); |
201 } | 201 } |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 g_free(displayed); | 205 g_free(displayed); |