Hello Alvaro,
> I looked at 19.d and I think the design has gotten pretty convoluted. I
> think we could simplify with the following changes:
>
> struct script_t gets a new member, of type Command **, which is
> initially null.
>
> function process_builtin receives the complete script_t (not individual
> memebers of it) constructs the Command ** array and puts it in
> script_t's new member; return value is the same script_t struct it got
> (except it's now augmented with the Command **array).
>
> function process_file constructs a new script_t from the string list,
> creates its Command **array just like process_builtin and returns the
> constructed struct.
>
> function addScript receives script_t instead of individual members of
> it, and does the appropriate thing.
Why not. Here are two versions:
*-20.patch is the initial rebased version
*-21.patch does what you suggested above, some hidden awkwardness but much less that the previous one.
--
Fabien