Hi Jeff! You're late to the party. Sumanth has agreed to re-design this new utility function. Read the rest of the thread :)
On Fri, Oct 31, 2008 at 05:29:22PM -0400, Jeffrey Hutzelman wrote: > >> So this is likely a terrible choice of quote character. Perhaps the > >> only safe quote character would be NUL, and then you'd need to use NUL > >> NUL as the terminator (or something). > > That would preclude using the empty string as an argument. char foo[2]; foo[0] = '\0'; foo[1] = '\0'; would work. BUT... ...I wasn't being terribly serious about that. I was basically telling Sumanth that the only remotely-safe byte value that they could use as a separator was NUL. As I explained a bit further on, it's be far, far easier to just use varargs, and *that* I was quite serious about. > I'd also consider whether you want an interface like that of execve(), > which takes a char ** rather than a variable number of char * arguments, > and/or a variant that accepts a single va_list instead of a variable number > of arguments, to make it easier to write wrappers. A number of us (myself included) said as much. Nico --