Mercurial > pidgin.yaz
comparison src/buddy_chat.c @ 79:bfdc427b936d
[gaim-migrate @ 89]
I'll save time and just post the email :-)
Summary of changes:
* Misc malloc/free cleanups, use g_malloc more places and
other small stuff (e.g. lineardata not being freed in the
error case in sound.c)
* Misc signed/unsigned cleanups (use size_t more often)
* read() can return -1 at any point, check return values
more rigorously (read_rv variables used for this)
* In can_play_audio, stat requires a pointer to an
allocated stat_buf (the address of an automatic variable)
* escape_text needs a buffer at least 4 times the size of
the text being passed in (not 2 times); I can force core
dumps with lots of newlines otherwise
* There's a debug statement in netscape_command
(browser.c) that was printf("Hello%d\n"); with no int for
the %d; I threw in a getppid(), but the statement should
probably come out eventually.
Thanks, G Sumner Hayes!
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 05 Apr 2000 05:34:08 +0000 |
parents | b9e90a914e20 |
children | be5fbefdb195 |
comparison
equal
deleted
inserted
replaced
78:66c5a24b62ec | 79:bfdc427b936d |
---|---|
265 } | 265 } |
266 | 266 |
267 | 267 |
268 static void whisper_callback(GtkWidget *widget, struct buddy_chat *b) | 268 static void whisper_callback(GtkWidget *widget, struct buddy_chat *b) |
269 { | 269 { |
270 char buf[BUF_LONG]; | 270 char buf[BUF_LEN*4]; |
271 char buf2[BUF_LONG]; | 271 char buf2[BUF_LONG]; |
272 GList *selected; | 272 GList *selected; |
273 char *who; | 273 char *who; |
274 | 274 |
275 strncpy(buf, gtk_entry_get_text(GTK_ENTRY(b->entry)), sizeof(buf)/2); | 275 strncpy(buf, gtk_entry_get_text(GTK_ENTRY(b->entry)), sizeof(buf)/2); |
302 } | 302 } |
303 | 303 |
304 | 304 |
305 static void send_callback(GtkWidget *widget, struct buddy_chat *b) | 305 static void send_callback(GtkWidget *widget, struct buddy_chat *b) |
306 { | 306 { |
307 char buf[BUF_LONG]; | 307 char buf[BUF_LEN*4]; |
308 | 308 |
309 strncpy(buf, gtk_entry_get_text(GTK_ENTRY(b->entry)), sizeof(buf)/2); | 309 strncpy(buf, gtk_entry_get_text(GTK_ENTRY(b->entry)), sizeof(buf)/2); |
310 if (!strlen(buf)) | 310 if (!strlen(buf)) |
311 return; | 311 return; |
312 | 312 |