diff options
author | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:28 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:28 +0100 |
commit | 94123a215ba971baf4ad7e12cc479258ddb8600e (patch) | |
tree | 6f053d8e1ce754ab7104b7364be9754231ab84de /AffinityPanel.c | |
parent | 50cb99f0acecb15992f3d5610c02676a6c94f2a4 (diff) | |
parent | c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (diff) | |
download | debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.gz debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.bz2 debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.zip |
Update upstream source from tag 'upstream/3.0.5'
Update to upstream version '3.0.5'
with Debian dir 10922042e094a59dc72f9c39ddd4bfd59c7a302c
Diffstat (limited to 'AffinityPanel.c')
-rw-r--r-- | AffinityPanel.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/AffinityPanel.c b/AffinityPanel.c index e491b52..a4d6361 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -59,25 +59,25 @@ static void MaskItem_delete(Object* cast) { static void MaskItem_display(const Object* cast, RichString* out) { const MaskItem* this = (const MaskItem*)cast; assert (this != NULL); - RichString_append(out, CRT_colors[CHECK_BOX], "["); + RichString_appendAscii(out, CRT_colors[CHECK_BOX], "["); if (this->value == 2) { - RichString_append(out, CRT_colors[CHECK_MARK], "x"); + RichString_appendAscii(out, CRT_colors[CHECK_MARK], "x"); } else if (this->value == 1) { - RichString_append(out, CRT_colors[CHECK_MARK], "o"); + RichString_appendAscii(out, CRT_colors[CHECK_MARK], "o"); } else { - RichString_append(out, CRT_colors[CHECK_MARK], " "); + RichString_appendAscii(out, CRT_colors[CHECK_MARK], " "); } - RichString_append(out, CRT_colors[CHECK_BOX], "]"); - RichString_append(out, CRT_colors[CHECK_TEXT], " "); + RichString_appendAscii(out, CRT_colors[CHECK_BOX], "]"); + RichString_appendAscii(out, CRT_colors[CHECK_TEXT], " "); if (this->indent) { - RichString_append(out, CRT_colors[PROCESS_TREE], this->indent); - RichString_append(out, CRT_colors[PROCESS_TREE], - this->sub_tree == 2 - ? CRT_treeStr[TREE_STR_OPEN] - : CRT_treeStr[TREE_STR_SHUT]); - RichString_append(out, CRT_colors[CHECK_TEXT], " "); + RichString_appendWide(out, CRT_colors[PROCESS_TREE], this->indent); + RichString_appendWide(out, CRT_colors[PROCESS_TREE], + this->sub_tree == 2 + ? CRT_treeStr[TREE_STR_OPEN] + : CRT_treeStr[TREE_STR_SHUT]); + RichString_appendAscii(out, CRT_colors[CHECK_TEXT], " "); } - RichString_append(out, CRT_colors[CHECK_TEXT], this->text); + RichString_appendWide(out, CRT_colors[CHECK_TEXT], this->text); } static const ObjectClass MaskItem_class = { @@ -173,7 +173,6 @@ static void AffinityPanel_update(AffinityPanel* this, bool keepSelected) { Panel* super = (Panel*) this; FunctionBar_setLabel(super->currentBar, KEY_F(3), this->topoView ? "Collapse/Expand" : ""); - FunctionBar_draw(super->currentBar); int oldSelected = Panel_getSelectedIndex(super); Panel_prune(super); @@ -281,7 +280,7 @@ static MaskItem* AffinityPanel_addObject(AffinityPanel* this, hwloc_obj_t obj, u indent_buf[0] = '\0'; if (depth > 0) { for (unsigned i = 1; i < depth; i++) { - xSnprintf(&indent_buf[off], left, "%s ", (indent & (1u << i)) ? CRT_treeStr[TREE_STR_VERT] : " "); + xSnprintf(&indent_buf[off], left, "%s ", (indent & (1U << i)) ? CRT_treeStr[TREE_STR_VERT] : " "); size_t len = strlen(&indent_buf[off]); off += len; left -= len; @@ -323,9 +322,9 @@ static MaskItem* AffinityPanel_addObject(AffinityPanel* this, hwloc_obj_t obj, u static MaskItem* AffinityPanel_buildTopology(AffinityPanel* this, hwloc_obj_t obj, unsigned indent, MaskItem* parent) { MaskItem* item = AffinityPanel_addObject(this, obj, indent, parent); if (obj->next_sibling) { - indent |= (1u << obj->depth); + indent |= (1U << obj->depth); } else { - indent &= ~(1u << obj->depth); + indent &= ~(1U << obj->depth); } for (unsigned i = 0; i < obj->arity; i++) { |