add missing stuff to term legend

This commit is contained in:
silverweed 2024-07-26 14:55:51 +02:00
parent 3d5fa87970
commit 7c8e1c155b

View file

@ -9,7 +9,7 @@ Term_Viewer make_term_viewer()
viewer.col_section[Sec_RNTuple_Anchor] = ACol_Bright_Yellow;
viewer.col_section[Sec_RNTuple_Header] = ACol_Cyan;
viewer.col_section[Sec_RNTuple_Footer] = ACol_Blue;
viewer.col_section[Sec_TFile_Header] = ACol_White;
viewer.col_section[Sec_TFile_Header] = ACol_Bright_White;
viewer.col_section[Sec_TFile_Object] = ACol_Grey;
viewer.col_section[Sec_TFile_Info] = ACol_Red;
viewer.col_section[Sec_TFile_FreeList] = ACol_Bright_Yellow;
@ -73,6 +73,28 @@ String8 render_legend_to_string(Arena *arena, const Term_Viewer &viewer, const A
tot_len += s.size;
}
{
String8_Node *node = arena_push<String8_Node>(scratch.arena);
node->str = push_str8f(scratch.arena, "%s%20s %s\n", ansi_color_table[viewer.col_checksum].c(), "Checksum", color_none);
tail->next = node;
tail = node;
tot_len += node->str.size;
}
{
String8_Node *node = arena_push<String8_Node>(scratch.arena);
node->str = push_str8f(scratch.arena, "%s%20s %s\n", ansi_color_table[viewer.col_page_start].c(), "Page Start", color_none);
tail->next = node;
tail = node;
tot_len += node->str.size;
}
{
String8_Node *node = arena_push<String8_Node>(scratch.arena);
node->str = push_str8f(scratch.arena, "%s%20s %s\n", ansi_color_table[viewer.col_key].c(), "TKey Header", color_none);
tail->next = node;
tail = node;
tot_len += node->str.size;
}
String8 legend { arena_push_array_nozero<u8>(arena, tot_len + 1), tot_len + 1 };
legend.str[tot_len] = 0;
u64 cur_size = 0;