diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-28 15:42:50 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-28 15:42:50 +0900 |
| commit | ae78dbbff81196f1d7bc8fabf84d05e6b9f3ca03 (patch) | |
| tree | fdc69ee3e2772aa4db7e8efe4bd30d101c7f82ac /fedora/.local/bin/htop-vim/DynamicColumn.c | |
| parent | 06ad645351572c0e7188c52028998384d718df2e (diff) | |
Diffstat (limited to 'fedora/.local/bin/htop-vim/DynamicColumn.c')
| -rw-r--r-- | fedora/.local/bin/htop-vim/DynamicColumn.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/fedora/.local/bin/htop-vim/DynamicColumn.c b/fedora/.local/bin/htop-vim/DynamicColumn.c deleted file mode 100644 index bd038df..0000000 --- a/fedora/.local/bin/htop-vim/DynamicColumn.c +++ /dev/null @@ -1,66 +0,0 @@ -/* -htop - DynamicColumn.c -(C) 2021 Sohaib Mohammed -(C) 2021 htop dev team -(C) 2021 Red Hat, Inc. All Rights Reserved. -Released under the GNU GPLv2+, see the COPYING file -in the source distribution for its full text. -*/ - -#include "config.h" // IWYU pragma: keep - -#include "DynamicColumn.h" - -#include <stddef.h> - -#include "Platform.h" -#include "RichString.h" -#include "XUtils.h" - - -Hashtable* DynamicColumns_new(void) { - return Platform_dynamicColumns(); -} - -void DynamicColumns_delete(Hashtable* dynamics) { - if (dynamics) { - Platform_dynamicColumnsDone(dynamics); - Hashtable_delete(dynamics); - } -} - -const char* DynamicColumn_init(unsigned int key) { - return Platform_dynamicColumnInit(key); -} - -typedef struct { - const char* name; - const DynamicColumn* data; - unsigned int key; -} DynamicIterator; - -static void DynamicColumn_compare(ht_key_t key, void* value, void* data) { - const DynamicColumn* column = (const DynamicColumn*)value; - DynamicIterator* iter = (DynamicIterator*)data; - if (String_eq(iter->name, column->name)) { - iter->data = column; - iter->key = key; - } -} - -const DynamicColumn* DynamicColumn_search(Hashtable* dynamics, const char* name, unsigned int* key) { - DynamicIterator iter = { .key = 0, .data = NULL, .name = name }; - if (dynamics) - Hashtable_foreach(dynamics, DynamicColumn_compare, &iter); - if (key) - *key = iter.key; - return iter.data; -} - -const DynamicColumn* DynamicColumn_lookup(Hashtable* dynamics, unsigned int key) { - return (const DynamicColumn*) Hashtable_get(dynamics, key); -} - -bool DynamicColumn_writeField(const Process* proc, RichString* str, unsigned int key) { - return Platform_dynamicColumnWriteField(proc, str, key); -} |
