On Wed, 10 Nov 2004, Frank Barknecht wrote:
Ok, what I found out is, that, different as in earlier versions, Pd cannot handle more than one spaces between flags. pd -lib blabla -lib bloblo is ok, but pd -lib blabla -lib bloblo will not work.
I wonder: Couldn't Pd use some of the many standard option handling libraries like GNU getopt?
I haven't tried GNU getopt but I must say that I'd favour a more table-oriented system of options in general. For example, the pdrc editor of impd_0_37 uses a list-of-lists in Tcl in which each row is a (name,type,comment) triple. Even though that part of the code is essentially dead, the concept may be recycled to handle the commandline options. What is missing is a callback field so that each detected option can trigger a particular piece of code. This may be cumbersome to do in C, but if we use Pd messages instead of function-pointers, then we get the reward that all (or most) commandline options would be runtime-settable. Imagine this kind of global message:
[; pd path /home/dude/pd-patches (
But prolly (for a start) that many of those methods would only be guaranteed to work at load-time. "path" would be one of those available all of the time.
(I recall making that kind of suggestion in Graz, prolly during the impd talk)
_____________________________________________________________________ Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju