diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:26 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:26 +0200 |
commit | bea9b4798717b6f4e31085506dfc179eeb8dc17c (patch) | |
tree | e6b16257d9e7f8fb87b05dcdb8a0ba8bb3419eb7 /RichString.c | |
parent | 1767b21eb219fb9ac332aca9f7c3abecd97b6b39 (diff) | |
download | debian_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.c | 9 |
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); } |