From 6440aa73d32080babd2e4ebd9f4a54b550d19dfb Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 14 Apr 2024 10:33:45 +0200 Subject: [PATCH] Review comments: stylistic changes in libavrdude.h Remove obsolete avrdude_message(). Place inline comments at position 32. --- src/libavrdude.h | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/libavrdude.h b/src/libavrdude.h index de85742f..f0ec95cc 100644 --- a/src/libavrdude.h +++ b/src/libavrdude.h @@ -61,32 +61,31 @@ typedef uint32_t pinmask_t; // might proceed with chip erase /* Message system */ -/* These 2 functions are supposed to be supplied by the application */ +/* This functions is supposed to be supplied by the application */ -int avrdude_message(int msglvl, const char *format, ...); int avrdude_message2(FILE *fp, int lno, const char *file, const char *func, int msgmode, int msglvl, const char *format, ...); enum msglvl { - MSG_EXT_ERROR = (-3), // OS-type error, no -v option, can be suppressed with -qqqqq - MSG_ERROR = (-2), // Avrdude error, no -v option, can be suppressed with -qqqq - MSG_WARNING = (-1), // Warning, no -v option, can be suppressed with -qqq - MSG_INFO = 0, // Commentary, no -v option, can be suppressed with -qq - MSG_NOTICE = 1, // Displayed with -v - MSG_NOTICE2 = 2, // Displayed with -vv - MSG_DEBUG = 3, // Displayed with -vvv - MSG_TRACE = 4, // Displayed with -vvvv, show trace communication - MSG_TRACE2 = 5, // Displayed with -vvvvv + MSG_EXT_ERROR = (-3), // OS-type error, no -v option, can be suppressed with -qqqqq + MSG_ERROR = (-2), // Avrdude error, no -v option, can be suppressed with -qqqq + MSG_WARNING = (-1), // Warning, no -v option, can be suppressed with -qqq + MSG_INFO = 0, // Commentary, no -v option, can be suppressed with -qq + MSG_NOTICE = 1, // Displayed with -v + MSG_NOTICE2 = 2, // Displayed with -vv + MSG_DEBUG = 3, // Displayed with -vvv + MSG_TRACE = 4, // Displayed with -vvvv, show trace communication + MSG_TRACE2 = 5, // Displayed with -vvvvv }; enum msgmode { - MSG2_PROGNAME = 1, // Start by printing progname - MSG2_FUNCTION = 2, // Print calling function (1st arg) after progname if >= notice - MSG2_FILELINE = 4, // Print source file and line number after function if >= debug - MSG2_TYPE = 8, // Print message type after function or progname - MSG2_INDENT1 = 16, // Start by printing indentation of progname+1 blanks - MSG2_INDENT2 = 32, // Start by printing indentation of progname+2 blanks - MSG2_FLUSH = 64, // Flush before and after printing - MSG2_LEFT_MARGIN = 128, // Print \n unless last character printed was \n + MSG2_PROGNAME = 1, // Start by printing progname + MSG2_FUNCTION = 2, // Print calling function (1st arg) after progname if >= notice + MSG2_FILELINE = 4, // Print source file and line number after function if >= debug + MSG2_TYPE = 8, // Print message type after function or progname + MSG2_INDENT1 = 16, // Start by printing indentation of progname+1 blanks + MSG2_INDENT2 = 32, // Start by printing indentation of progname+2 blanks + MSG2_FLUSH = 64, // Flush before and after printing + MSG2_LEFT_MARGIN = 128, // Print \n unless last character printed was \n }; /* formerly lists.h */