[gen] Re: ui-console...
amidog at amidog.com
Sun Sep 23 10:52:40 BST 2001
>> Any chance the command line parsing could be move to the platform
>> specific code? The reason is that the Amiga has a standard way of
>> handling this, when I basically give the OS a template of options and an
>> array which it'll fill with pointers to the results, like a value or
>> This would allow me to use the same options (with just few extras) in the
>> console as for the AmigaOS specific port. This would simplify a lot for
>> the users...
> Well, we could have an opts-xxx.c which has a opts_init(argc, argv),
> an opts_save() and an opts_get(char *), and I can then change all the
> xx_init functions in all the files to initialise themselves based on
> a call to opts_get()? The opts-xxx.c would then be written to store
> arbitrary strings.
> I'm thinking that my new X version that I'm writing could do with a
> unix .rc file for storing the configuration and in that situation I
> would only use argc/argv to point to a config file.
Well, I assume you want the setting of all ui_* variables to be done within
the ui-console.c file which is the real problem here.
Personally I'd like the while ((ch = getopt... loop to be replaced by
something like uip_parse_cli(argc, argv) or similar which would setup the
More information about the gen