aboutsummaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorBartosz Fenski <fenio@debian.org>2008-04-26 13:57:14 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:22 +0200
commit2eabf3432b05b93ce4de9af283ae549d0f7c18c8 (patch)
tree3b1df05a91986850ce74f9b549fcc966fea64ab7 /RichString.c
parent6e3bbb32d3cd1c09b0d1a79c433e0728a7ea44f4 (diff)
parent9379132a8234eeedf62d37ef57713e52c12db6ab (diff)
downloaddebian_htop-2eabf3432b05b93ce4de9af283ae549d0f7c18c8.tar.gz
debian_htop-2eabf3432b05b93ce4de9af283ae549d0f7c18c8.tar.bz2
debian_htop-2eabf3432b05b93ce4de9af283ae549d0f7c18c8.zip
Imported Debian patch 0.7-1debian/0.7-1
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