aboutsummaryrefslogtreecommitdiffstats
path: root/linux/SystemdMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-01-11 20:43:28 +0100
committerDaniel Lange <DLange@git.local>2021-01-11 20:43:28 +0100
commit94123a215ba971baf4ad7e12cc479258ddb8600e (patch)
tree6f053d8e1ce754ab7104b7364be9754231ab84de /linux/SystemdMeter.c
parent50cb99f0acecb15992f3d5610c02676a6c94f2a4 (diff)
parentc55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (diff)
downloaddebian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.gz
debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.bz2
debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.zip
Update upstream source from tag 'upstream/3.0.5'
Update to upstream version '3.0.5' with Debian dir 10922042e094a59dc72f9c39ddd4bfd59c7a302c
Diffstat (limited to 'linux/SystemdMeter.c')
-rw-r--r--linux/SystemdMeter.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/linux/SystemdMeter.c b/linux/SystemdMeter.c
index 4350d26..61bb59b 100644
--- a/linux/SystemdMeter.c
+++ b/linux/SystemdMeter.c
@@ -267,9 +267,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out
char buffer[16];
int color = (systemState && 0 == strcmp(systemState, "running")) ? METER_VALUE_OK : METER_VALUE_ERROR;
- RichString_write(out, CRT_colors[color], systemState ? systemState : "???");
+ RichString_writeAscii(out, CRT_colors[color], systemState ? systemState : "N/A");
- RichString_append(out, CRT_colors[METER_TEXT], " (");
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], " (");
if (nFailedUnits == INVALID_VALUE) {
buffer[0] = '?';
@@ -277,9 +277,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out
} else {
xSnprintf(buffer, sizeof(buffer), "%u", nFailedUnits);
}
- RichString_append(out, zeroDigitColor(nFailedUnits), buffer);
+ RichString_appendAscii(out, zeroDigitColor(nFailedUnits), buffer);
- RichString_append(out, CRT_colors[METER_TEXT], "/");
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], "/");
if (nNames == INVALID_VALUE) {
buffer[0] = '?';
@@ -287,9 +287,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out
} else {
xSnprintf(buffer, sizeof(buffer), "%u", nNames);
}
- RichString_append(out, valueDigitColor(nNames), buffer);
+ RichString_appendAscii(out, valueDigitColor(nNames), buffer);
- RichString_append(out, CRT_colors[METER_TEXT], " failed) (");
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], " failed) (");
if (nJobs == INVALID_VALUE) {
buffer[0] = '?';
@@ -297,9 +297,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out
} else {
xSnprintf(buffer, sizeof(buffer), "%u", nJobs);
}
- RichString_append(out, zeroDigitColor(nJobs), buffer);
+ RichString_appendAscii(out, zeroDigitColor(nJobs), buffer);
- RichString_append(out, CRT_colors[METER_TEXT], "/");
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], "/");
if (nInstalledJobs == INVALID_VALUE) {
buffer[0] = '?';
@@ -307,9 +307,9 @@ static void SystemdMeter_display(ATTR_UNUSED const Object* cast, RichString* out
} else {
xSnprintf(buffer, sizeof(buffer), "%u", nInstalledJobs);
}
- RichString_append(out, valueDigitColor(nInstalledJobs), buffer);
+ RichString_appendAscii(out, valueDigitColor(nInstalledJobs), buffer);
- RichString_append(out, CRT_colors[METER_TEXT], " jobs)");
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], " jobs)");
}
static const int SystemdMeter_attributes[] = {

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