Review comments: stylistic changes in libavrdude.h

Remove obsolete avrdude_message().
Place inline comments at position 32.
This commit is contained in:
Joerg Wunsch
2024-04-14 10:33:45 +02:00
parent 22e4b5b3ce
commit 6440aa73d3

View File

@@ -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 */