lf em 4x05 view is a new command to view dump files. lf em 4x05 view got detailed breakdown of config word bits. protection bits are guarded by verbose flag and identifcation got better generic instead of an wrongly absolut match

This commit is contained in:
iceman1001 committed 2024-01-18 16:11:21 +01:00
1 parent 55702e6e86
commit 98e44176a9
3 files changed
+721 -356

No files matched your search

+6 -6
View File
@@ -565,18 +565,18 @@ char *sprint_breakdown_bin(color_t color, const char* bs, int width, int padn, i
}
const char *prepad = " ";
const char *postmarker = "................................";
const char *postmarker = " ................................";
static char buf[32 + 120] = {0};
memset(buf, 0, sizeof(buf));
int8_t end = (width - padn - 1 - bits);
int8_t end = (width - padn - bits);
if (end < 0) {
end = 0;
}
switch (color) {
case C_GREEN: {
snprintf(buf, sizeof(buf), "%.*s" _GREEN_("%.*s") " %.*s - " _GREEN_("%s")
snprintf(buf, sizeof(buf), "%.*s" _GREEN_("%.*s") "%.*s - " _GREEN_("%s")
, padn, prepad
, bits, bs + padn
, end, postmarker
@@ -585,7 +585,7 @@ char *sprint_breakdown_bin(color_t color, const char* bs, int width, int padn, i
break;
}
case C_RED: {
snprintf(buf, sizeof(buf), "%.*s" _RED_("%.*s") " %.*s - " _RED_("%s")
snprintf(buf, sizeof(buf), "%.*s" _RED_("%.*s") "%.*s - " _RED_("%s")
, padn, prepad
, bits, bs + padn
, end, postmarker
@@ -594,7 +594,7 @@ char *sprint_breakdown_bin(color_t color, const char* bs, int width, int padn, i
break;
}
case C_YELLOW: {
snprintf(buf, sizeof(buf), "%.*s" _YELLOW_("%.*s") " %.*s - " _YELLOW_("%s")
snprintf(buf, sizeof(buf), "%.*s" _YELLOW_("%.*s") "%.*s - " _YELLOW_("%s")
, padn, prepad
, bits, bs + padn
, end, postmarker
@@ -604,7 +604,7 @@ char *sprint_breakdown_bin(color_t color, const char* bs, int width, int padn, i
}
case C_NONE:
default: {
snprintf(buf, sizeof(buf), "%.*s%.*s %.*s - %s"
snprintf(buf, sizeof(buf), "%.*s%.*s%.*s - %s"
, padn, prepad
, bits, bs + padn
, end, postmarker