aboutsummaryrefslogtreecommitdiffstats
path: root/DynamicColumn.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2024-01-10 11:17:08 +0100
committerDaniel Lange <DLange@git.local>2024-01-10 11:17:08 +0100
commite7372d18a1a661d8c3dba9f51e1f17b5f94171a7 (patch)
treee8270dd60ec096bee8157dbadf029e15ed584592 /DynamicColumn.c
parent937052b231259a47d881d539ad5748245ef55b99 (diff)
downloaddebian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.gz
debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.bz2
debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.zip
New upstream version 3.3.0
Diffstat (limited to 'DynamicColumn.c')
-rw-r--r--DynamicColumn.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/DynamicColumn.c b/DynamicColumn.c
index bd038df..5f02174 100644
--- a/DynamicColumn.c
+++ b/DynamicColumn.c
@@ -12,6 +12,7 @@ in the source distribution for its full text.
#include "DynamicColumn.h"
#include <stddef.h>
+#include <stdlib.h>
#include "Platform.h"
#include "RichString.h"
@@ -19,7 +20,10 @@ in the source distribution for its full text.
Hashtable* DynamicColumns_new(void) {
- return Platform_dynamicColumns();
+ Hashtable* dynamics = Platform_dynamicColumns();
+ if (!dynamics)
+ dynamics = Hashtable_new(0, true);
+ return dynamics;
}
void DynamicColumns_delete(Hashtable* dynamics) {
@@ -29,8 +33,14 @@ void DynamicColumns_delete(Hashtable* dynamics) {
}
}
-const char* DynamicColumn_init(unsigned int key) {
- return Platform_dynamicColumnInit(key);
+const char* DynamicColumn_name(unsigned int key) {
+ return Platform_dynamicColumnName(key);
+}
+
+void DynamicColumn_done(DynamicColumn* this) {
+ free(this->heading);
+ free(this->caption);
+ free(this->description);
}
typedef struct {

© 2014-2024 Faster IT GmbH | imprint | privacy policy