From: Michael H. <mic...@ju...> - 2001-06-17 17:10:16
|
On Sun, 17 Jun 2001, Bernhard Held wrote: > Hallo Michael, > > SDCCmain.c looks much better now. And the help text is much better too. > Maybe we should wrap it for 80 coloms. Hm. I'd rather let the terminal take care of this so people with wider screens can see more. Perhaps making it look good by putting all the help in one column would be worthwhile though. > > 1. For the "char cdbfnbuf[50]" problem I propose FILENAME_MAX, which is > defined in stdio.h (even in BCC). > > 2. Another problem survived: SDCC crashes with a single option like > "sdcc --xram-loc". > > getStringArg() advances the argc counter > return argv[++(*pi)]; > without checking, if there is actually another argument. Yeah. I knew about this but thought I should check in everything to see what breaks first :) The old options parsing had the same bug, but now things are unified it should be easier to catch missing args. > Bernhard > > -----Urspr=FCngliche Nachricht----- > Von: Michael Hope <mic...@ju...> > An: sdc...@li... <sdc...@li...> > Datum: Sonntag, 17. Juni 2001 01:00 > Betreff: [sdcc-devel] Commit: changes to option parsing > > > >Afternoon all. > > > >I've commited the changes I made to option parsing. See SDCCmain.c, > >especially optionsTable, getIntArg, and getStringArg. The basic idea is > >that the options table lists all options in short and long form, an > >optional flag pointer, and some help text. The two functions unify > >fetching arguments to commands. If the flag pointer is non null, then t= he > >flag will be set if the option is found. The side effect there was that= I > >had to change the affected flags to ints from bits. > > > >The main advantages of the changes are that options are defined in one > >place, flag options need no extra supporting code, and there is one poin= t > >where arguments are parsed. > > > >-- Michael > > > > > > > > > >_______________________________________________ > >sdcc-devel mailing list > >sdc...@li... > >http://lists.sourceforge.net/lists/listinfo/sdcc-devel > > > > |
From: Johan K. <joh...@id...> - 2001-06-17 19:43:56
|
> Hm. I'd rather let the terminal take care of this so people with wider > screens can see more. It seems that there are still people with "dos consoles" which we call "dump terminals" :) |