- added patch to Improving progress/error output for telnet & GDB monitor

(thanks to Øyvind for the patch)

git-svn-id: svn://svn.berlios.de/openocd/trunk@293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
mifi
2008-02-13 19:02:17 +00:00
parent edc0db163a
commit 2a0317e6f4
5 changed files with 158 additions and 41 deletions

View File

@@ -44,6 +44,12 @@ extern void log_printf(enum log_levels level, const char *file, int line,
__attribute__ ((format (printf, 5, 6)));
extern int log_register_commands(struct command_context_s *cmd_ctx);
extern int log_init(struct command_context_s *cmd_ctx);
extern int set_log_output(struct command_context_s *cmd_ctx, FILE *output);
typedef void (*logCallback)(void *privData, const char *file, int line,
const char *function, const char *format, va_list args);
void log_setCallback(logCallback callback, void *privData);
extern int debug_level;
@@ -67,25 +73,6 @@ extern int debug_level;
log_printf (LOG_ERROR, __FILE__, __LINE__, __FUNCTION__, expr); \
} while(0)
#define SDEBUG(expr ...) \
do { \
short_log_printf (LOG_DEBUG, expr); \
} while(0)
#define SINFO(expr ...) \
do { \
short_log_printf (LOG_INFO, expr); \
} while(0)
#define SWARNING(expr ...) \
do { \
short_log_printf (LOG_WARNING, expr); \
} while(0)
#define SERROR(expr ...) \
do { \
short_log_printf (LOG_ERROR, expr); \
} while(0)
/* general failures
* error codes < 100
@@ -95,4 +82,7 @@ extern int debug_level;
#define ERROR_NO_CONFIG_FILE (-2)
#define ERROR_BUF_TOO_SMALL (-3)
#endif /* ERROR_H */
char *allocPrintf(const char *fmt, va_list ap);
#endif /* LOG_H */