aboutsummaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:26 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:26 +0200
commitbea9b4798717b6f4e31085506dfc179eeb8dc17c (patch)
treee6b16257d9e7f8fb87b05dcdb8a0ba8bb3419eb7 /RichString.c
parent1767b21eb219fb9ac332aca9f7c3abecd97b6b39 (diff)
downloaddebian_htop-bea9b4798717b6f4e31085506dfc179eeb8dc17c.tar.gz
debian_htop-bea9b4798717b6f4e31085506dfc179eeb8dc17c.tar.bz2
debian_htop-bea9b4798717b6f4e31085506dfc179eeb8dc17c.zip
Imported Upstream version 0.8.3upstream/0.8.3
Diffstat (limited to 'RichString.c')
-rw-r--r--RichString.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/RichString.c b/RichString.c
index fbcb17f..753c8cf 100644
--- a/RichString.c
+++ b/RichString.c
@@ -8,13 +8,14 @@
#include <stdlib.h>
#include <string.h>
-#include <curses.h>
#include <ctype.h>
#include "debug.h"
#include <assert.h>
#ifdef HAVE_LIBNCURSESW
-#include <wchar.h>
+#include <ncursesw/curses.h>
+#else
+#include <curses.h>
#endif
#define RICHSTRING_MAXLEN 300
@@ -116,6 +117,10 @@ int RichString_findChar(RichString *this, char c, int start) {
#endif
+void RichString_prune(RichString* this) {
+ this->len = 0;
+}
+
void RichString_setAttr(RichString *this, int attrs) {
RichString_setAttrn(this, attrs, 0, this->len - 1);
}

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