avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] Option parsing?


From: Jan-Hinnerk Reichert
Subject: [avrdude-dev] Option parsing?
Date: Mon, 3 May 2004 11:48:38 +0200
User-agent: KMail/1.5.4

Hi all,

does anyone remember that thread on programmer dependent options?

I have done some thinking and experimental coding on the 
option-parsing. So here are the "options" I came across.

1) minimal changes
- put parameter to "-E" in "exitspec_string" and pass it to the 
programmer after all options are parsed.
- the same for all other otions (like baudrate)

2) even more lists
- all options are first put into a *list* of options
- afterwards the options are taken out of the list
- remaining options are passed to the programmer one at a time

2a)
- optionlist is handled at one place in the code

2b)
- options are taken out of the list just as they are needed

-----------------------

I definitely don't like 1), but it is a safe patch and it is done 
quickly ;-(

Option 2) changes the behaviour of parsing a bit. It allows to parse 
options in another sequence then specified in the commandline. Hence, 
it is no problem to make options like "-V" position-independent; or 
to get the programmer name any options have to be passed to it.

The decision between 2a) and 2b) is more difficult. With 2b) some 
variables could be dropped. However, it's harder to spot where (if at 
all) a particular option is handled. So, there is a chance that code 
becomes harder to maintain.

Comments?

/Jan-Hinnerk






reply via email to

[Prev in Thread] Current Thread [Next in Thread]