Exchange of fprintf(stderr, ...) with avrdude_message(...).

This change was made for the shared library, since library functions
should not write to std-streams directly. Instead avrdude_message()
has to be implemented by the library user. For the avrdude application
this function is implemented in main.c.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1305 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Axel Wachtler
2014-05-18 08:41:46 +00:00
parent 52dd5cc7ac
commit eb5fcb581f
45 changed files with 2380 additions and 2896 deletions

4
ppi.c
View File

@@ -69,7 +69,7 @@ static int ppi_shadow_access(union filedescriptor *fdp, int reg,
shadow_num = 2;
break;
default:
fprintf(stderr, "%s: avr_set(): invalid register=%d\n",
avrdude_message("%s: avr_set(): invalid register=%d\n",
progname, reg);
return -1;
break;
@@ -206,7 +206,7 @@ void ppi_open(char * port, union filedescriptor *fdp)
fd = open(port, O_RDWR);
if (fd < 0) {
fprintf(stderr, "%s: can't open device \"%s\": %s\n",
avrdude_message("%s: can't open device \"%s\": %s\n",
progname, port, strerror(errno));
fdp->ifd = -1;
return;