avrftdi.c: rename constant ERROR to ERR
ERROR is already defined as a preprocessor macro in wingdi.h. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1144 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
508438a8d4
commit
38c5f51a33
|
@ -48,7 +48,7 @@
|
||||||
#include <libftdi1/ftdi.h>
|
#include <libftdi1/ftdi.h>
|
||||||
|
|
||||||
enum { FTDI_SCK = 1, FTDI_MOSI, FTDI_MISO, FTDI_RESET };
|
enum { FTDI_SCK = 1, FTDI_MOSI, FTDI_MISO, FTDI_RESET };
|
||||||
enum { ERROR, WARN, INFO, DEBUG, TRACE };
|
enum { ERR, WARN, INFO, DEBUG, TRACE };
|
||||||
|
|
||||||
#define __log(lvl, fmt, ...) \
|
#define __log(lvl, fmt, ...) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -56,7 +56,7 @@ enum { ERROR, WARN, INFO, DEBUG, TRACE };
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
#define log_err(fmt, ...) __log(ERROR, fmt, ##__VA_ARGS__)
|
#define log_err(fmt, ...) __log(ERR, fmt, ##__VA_ARGS__)
|
||||||
#define log_warn(fmt, ...) __log(WARN, fmt, ##__VA_ARGS__)
|
#define log_warn(fmt, ...) __log(WARN, fmt, ##__VA_ARGS__)
|
||||||
#define log_info(fmt, ...) __log(INFO, fmt, ##__VA_ARGS__)
|
#define log_info(fmt, ...) __log(INFO, fmt, ##__VA_ARGS__)
|
||||||
#define log_debug(fmt, ...) __log(DEBUG, fmt, ##__VA_ARGS__)
|
#define log_debug(fmt, ...) __log(DEBUG, fmt, ##__VA_ARGS__)
|
||||||
|
@ -161,7 +161,7 @@ static void avrftdi_log(int level, const char * func, int line,
|
||||||
if(!skip_prefix)
|
if(!skip_prefix)
|
||||||
{
|
{
|
||||||
switch(level) {
|
switch(level) {
|
||||||
case ERROR: fprintf(stderr, "E "); break;
|
case ERR: fprintf(stderr, "E "); break;
|
||||||
case WARN: fprintf(stderr, "W "); break;
|
case WARN: fprintf(stderr, "W "); break;
|
||||||
case INFO: fprintf(stderr, "I "); break;
|
case INFO: fprintf(stderr, "I "); break;
|
||||||
case DEBUG: fprintf(stderr, "D "); break;
|
case DEBUG: fprintf(stderr, "D "); break;
|
||||||
|
|
Loading…
Reference in New Issue