Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv29420
Modified Files:
browser.c sound.c
Log Message:
handle spaces better
Index: browser.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/browser.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- browser.c 2001/09/27 19:17:10 1.14
+++ browser.c 2001/10/10 20:42:19 1.15
@@ -611,7 +611,8 @@
*ms = 0;
g_snprintf(command, sizeof(command), "%s\"%s\"%s", web_command, url,
ms + 2);
- }
+ } else
+ g_snprintf(command, sizeof(command), web_command);
args[0] = "sh";
args[1] = "-c";
Index: sound.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/sound.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- sound.c 2001/10/09 23:15:33 1.39
+++ sound.c 2001/10/10 20:42:19 1.40
@@ -398,7 +398,15 @@
if (sound_cmd[0]) {
char *args[4];
char command[4096];
- g_snprintf(command, sizeof command, sound_cmd, filename);
+ char *ms;
+ if (strstr(sound_cmd, "\"%s\""))
+ g_snprintf(command, sizeof(command), sound_cmd, filename);
+ else if ((ms = strstr(sound_cmd, "%s")) != NULL) {
+ *ms = 0;
+ g_snprintf(command, sizeof(command), "%s\"%s\"%s", sound_cmd,
+ filename, ms + 2);
+ } else
+ g_snprintf(command, sizeof(command), sound_cmd);
args[0] = "sh";
args[1] = "-c";
args[2] = command;
|