Mercurial > pidgin.yaz
comparison src/browser.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 | b402a23f35df |
comparison
equal
deleted
inserted
replaced
78:66c5a24b62ec | 79:bfdc427b936d |
---|---|
74 static Window root = (Window)0; | 74 static Window root = (Window)0; |
75 | 75 |
76 if (screen != save_screen) { | 76 if (screen != save_screen) { |
77 Display *dpy = DisplayOfScreen(screen); | 77 Display *dpy = DisplayOfScreen(screen); |
78 Atom __SWM_VROOT = None; | 78 Atom __SWM_VROOT = None; |
79 int i; | 79 unsigned int i; |
80 Window rootReturn, parentReturn, *children; | 80 Window rootReturn, parentReturn, *children; |
81 unsigned int numChildren; | 81 unsigned int numChildren; |
82 | 82 |
83 root = RootWindowOfScreen(screen); | 83 root = RootWindowOfScreen(screen); |
84 | 84 |
407 to each command to which it should apply. | 407 to each command to which it should apply. |
408 */ | 408 */ |
409 if (!raise_p) | 409 if (!raise_p) |
410 { | 410 { |
411 char *close; | 411 char *close; |
412 new_command = (char *) malloc (strlen (command) + 20); | 412 new_command = g_malloc (strlen (command) + 20); |
413 strcpy (new_command, command); | 413 strcpy (new_command, command); |
414 close = strrchr (new_command, ')'); | 414 close = strrchr (new_command, ')'); |
415 if (close) | 415 if (close) |
416 strcpy (close, ", noraise)"); | 416 strcpy (close, ", noraise)"); |
417 else | 417 else |
615 int e; | 615 int e; |
616 | 616 |
617 args[0] = g_strdup("netscape"); | 617 args[0] = g_strdup("netscape"); |
618 args[1] = NULL; | 618 args[1] = NULL; |
619 e = execvp(args[0], args); | 619 e = execvp(args[0], args); |
620 printf("Hello%d\n"); | 620 printf("Hello%d\n", getppid()); |
621 | 621 |
622 _exit(0); | 622 _exit(0); |
623 } else { | 623 } else { |
624 char *tmp = g_strdup(command); | 624 char *tmp = g_strdup(command); |
625 gtk_timeout_add(200, (GtkFunction)check_netscape, tmp); | 625 gtk_timeout_add(200, (GtkFunction)check_netscape, tmp); |