summaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2007-11-09 00:40:59 +0000
committerHisham Muhammad <hisham@gobolinux.org>2007-11-09 00:40:59 +0000
commit855d9eaf9abb82c4775c5be143e71c9de1cd22b3 (patch)
treee341c677065802ee5c8e7103259cb0b1eb2f5975 /RichString.c
parentb70b35ea659d9a859de3cb480580ceb98a6b63e0 (diff)
IO-wait time now counts as idle time, which is a more
accurate description. It is still available in split time, now called detailed CPU time. (thanks to Samuel Thibault for the report)
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 3bdc82b4..2cc7d172 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