Implement numerical output formats for decimal, hexadecimal, octal,

and binary numbers.

Closes bug #16129: more output formats for fuse bits (avrdude
enhancement request)

* fileio.c: Implement fileio_num() and the itoa_simple() helper function.
* fileio.h: Add new file formats to FILEFMT.
* main.c: Parse the new file formats.
* avrdude.1: Document all this.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@654 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2006-09-08 21:28:24 +00:00
parent b118ea42ca
commit 876d75a1a8
6 changed files with 179 additions and 1 deletions

View File

@@ -749,6 +749,23 @@ treated as decimal.
auto detect; valid for input only, and only if the input is not provided
at stdin.
@itemx d
decimal; this and the following formats are only valid on output.
They generate one line of output for the respective memory section,
forming a comma-separated list of the values.
This can be particularly useful for subsequent processing, like for
fuse bit settings.
@itemx h
hexadecimal; each value will get the string @emph{0x} prepended.
@itemx o
octal; each value will get a @emph{0}
prepended unless it is less than 8 in which case it gets no prefix.
@itemx b
binary; each value will get the string @emph{0b} prepended.
@end table
The default is to use auto detection for input files, and raw binary