aboutsummaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:22 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:22 +0200
commit9379132a8234eeedf62d37ef57713e52c12db6ab (patch)
tree3c1e0d924af0d44be9b14cab8ea1c05a946cdfe3 /RichString.c
parent9675cf654d86464344e56705db7a71ea17f76c6f (diff)
downloaddebian_htop-9379132a8234eeedf62d37ef57713e52c12db6ab.tar.gz
debian_htop-9379132a8234eeedf62d37ef57713e52c12db6ab.tar.bz2
debian_htop-9379132a8234eeedf62d37ef57713e52c12db6ab.zip
Imported Upstream version 0.7upstream/0.7
Diffstat (limited to 'RichString.c')
-rw-r--r--RichString.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/RichString.c b/RichString.c
index 3bdc82b..2cc7d17 100644
--- a/RichString.c
+++ b/RichString.c
@@ -26,15 +26,6 @@ typedef struct RichString_ {
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
-void RichString_write(RichString* this, int attrs, char* data) {
- RichString_init(this);
- RichString_append(this, attrs, data);
-}
-
-inline void RichString_append(RichString* this, int attrs, char* data) {
- RichString_appendn(this, attrs, data, strlen(data));
-}
-
inline void RichString_appendn(RichString* this, int attrs, char* data, int len) {
int last = MIN(RICHSTRING_MAXLEN - 1, len + this->len);
for (int i = this->len, j = 0; i < last; i++, j++)
@@ -43,6 +34,15 @@ inline void RichString_appendn(RichString* this, int attrs, char* data, int len)
this->len = last;
}
+inline void RichString_append(RichString* this, int attrs, char* data) {
+ RichString_appendn(this, attrs, data, strlen(data));
+}
+
+void RichString_write(RichString* this, int attrs, char* data) {
+ RichString_init(this);
+ RichString_append(this, attrs, data);
+}
+
void RichString_setAttr(RichString *this, int attrs) {
chtype* ch = this->chstr;
for (int i = 0; i < this->len; i++) {

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