Review and overhaul AVRDUDE's messaging system (#1126)

* Change avrdude_message(MSG_XYZ, ...) to msg_xyz(...)
* Define and use pmsg_xyz(...) instead of msg_xyz("%s: ...", progname, ...)
* Review and change avrdude_message() levels
   - Introduce new levels warning, error and ext_error
   - Distribute info level to info, warning, error, ext_error
   - Assign levels (more) consistently
   - Unify grammar, punctuation and style of messages
* Use imsg_xyz() to print indented messages
* Show function name in errors and warnings on -v
* Reduce effective verbosity level by number of -q above one
This commit is contained in:
Stefan Rueger
2022-10-17 15:44:55 +01:00
committed by GitHub
parent 2503ae03ce
commit e172877724
54 changed files with 3024 additions and 4206 deletions

View File

@@ -538,7 +538,7 @@ void avr_mem_display(const char *prefix, FILE *f, const AVRMEM *m,
m->readback[1]);
}
if (verbose > 4) {
avrdude_message(MSG_TRACE2, "%s Memory Ops:\n"
msg_trace2("%s Memory Ops:\n"
"%s Oeration Inst Bit Bit Type Bitno Value\n"
"%s ----------- -------- -------- ----- -----\n",
prefix, prefix, prefix);
@@ -774,7 +774,7 @@ void avr_display(FILE *f, const AVRPART *p, const char *prefix, int verbose) {
fprintf( f, "%sMemory Detail :\n\n", prefix);
px = prefix;
buf = (char *)cfg_malloc("avr_display()", strlen(prefix) + 5);
buf = (char *) cfg_malloc("avr_display()", strlen(prefix) + 5);
strcpy(buf, prefix);
strcat(buf, " ");
px = buf;