spopen question
Dave Viner
dviner at yahoo-inc.com
Thu Dec 19 03:19:11 CET 2002
Hi,
I'm writing a little plugin that uses the spopen function provided in the
plugins/utils.c. But I noticed that the spopen function won't execve the
command passed in if it contains " ' " or "''" or any ". I actually need to
pass an empty string for one of my functions. So, I'm thinking that maybe
we could add another spopen function like spopen_raw(const char *cmdstring,
int strip_quotes) and if strip_quotes is 0, then don't strip out the quotes
(that is, assume the caller knows what (s)he is doing). And then spopen
could simply call spopen_raw(cmdstring, 1). Is there any objection to
refactoring the code in this way? Basically it means that everything
continues to work as is, but more flexibility is introduced.
thanks
dave
-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
More information about the Users
mailing list