mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 10:41:07 +00:00
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:
@@ -43,7 +43,7 @@ enum { ERR, WARN, INFO, DEBUG, TRACE };
|
||||
do { \
|
||||
if ((x)) \
|
||||
{ \
|
||||
fprintf(stderr, "%s:%d %s() %s: %s (%d)\n\t%s\n", \
|
||||
avrdude_message("%s:%d %s() %s: %s (%d)\n\t%s\n", \
|
||||
__FILE__, __LINE__, __FUNCTION__, \
|
||||
#x, strerror(errno), errno, ftdi_get_error_string(ftdi)); \
|
||||
return -1; \
|
||||
@@ -54,7 +54,7 @@ enum { ERR, WARN, INFO, DEBUG, TRACE };
|
||||
do { \
|
||||
if ((x)) \
|
||||
{ \
|
||||
fprintf(stderr, "%s:%d %s() %s: %s (%d)\n\t%s\n", \
|
||||
avrdude_message("%s:%d %s() %s: %s (%d)\n\t%s\n", \
|
||||
__FILE__, __LINE__, __FUNCTION__, \
|
||||
#x, strerror(errno), errno, ftdi_get_error_string(ftdi)); \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user