[Asterisk-Dev] quick question about the new args parsing stuff...
Chris Wade
clwade at sparco.com
Wed Mar 30 13:11:09 MST 2005
[* ducks behind 'firewall' just in case *]
Just wondering, even though its probably already been discussed on the
dev conf call, but why is - as an example - app_skel implemented this way:
static int app_exec(struct ast_channel *chan, void *data)
<snip lots of code using some arg splitting/processing functions still
replicating functionality from one app_exec to another - code that
builds an int argc and char **argv>
would it not be better to do this:
static int app_exec(struct ast_channel *chan, int argc, char **argv)
<snip much less code that everyone knows how to write, ie. 'int main'>
I thought the point of the whole args parsing stuff was to have the API
handle the grunt work and leave the programmer to the new innovative
stuff. I could be wrong :^)
Now as for what I seem to remember being argued on the dev conf call
about this being such a 'fundamental' change that is not backwards
compatible, why not create a new app registry and begin letting us
newbie grunts start porting old apps to the new registry and style?
HINT-HINT: I'm volunteering my time for the porting of existing apps to
the new registry, but I cannot write the registry itself - not that good
at C and/or * internals.
-Chris
More information about the asterisk-dev
mailing list