Submitted by <karl.yerkes@gmail.com>:
patch #6141: accept binary format immediate values Detect a 0b prefix, and call strtoul() differently in that case. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@754 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
d508683427
commit
b9691e51ba
|
@ -1,3 +1,10 @@
|
||||||
|
2007-10-29 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
Submitted by <karl.yerkes@gmail.com>:
|
||||||
|
patch #6141: accept binary format immediate values
|
||||||
|
* fileio.c: Detect a 0b prefix, and call strtoul() differently
|
||||||
|
in that case.
|
||||||
|
|
||||||
2007-10-29 Joerg Wunsch <j@uriah.heep.sax.de>
|
2007-10-29 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
bug #21076: -vvvv serial receive prints are empty in Win32 build
|
bug #21076: -vvvv serial receive prints are empty in Win32 build
|
||||||
|
|
4
fileio.c
4
fileio.c
|
@ -743,6 +743,10 @@ static int fileio_imm(struct fioparms * fio,
|
||||||
p = strtok(filename, " ,");
|
p = strtok(filename, " ,");
|
||||||
while (p != NULL && loc < size) {
|
while (p != NULL && loc < size) {
|
||||||
b = strtoul(p, &e, 0);
|
b = strtoul(p, &e, 0);
|
||||||
|
/* check for binary formated (0b10101001) strings */
|
||||||
|
b = (strncmp (p, "0b", 2))?
|
||||||
|
strtoul (p, &e, 0):
|
||||||
|
strtoul (p + 2, &e, 2);
|
||||||
if (*e != 0) {
|
if (*e != 0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: invalid byte value (%s) specified for immediate mode\n",
|
"%s: invalid byte value (%s) specified for immediate mode\n",
|
||||||
|
|
Loading…
Reference in New Issue