summaryrefslogtreecommitdiffstats
path: root/TasksMeter.c
diff options
context:
space:
mode:
Diffstat (limited to 'TasksMeter.c')
-rw-r--r--TasksMeter.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/TasksMeter.c b/TasksMeter.c
index 5b99432f..f21ec82c 100644
--- a/TasksMeter.c
+++ b/TasksMeter.c
@@ -18,25 +18,13 @@ int TasksMeter_attributes[] = {
TASKS_RUNNING
};
-MeterType TasksMeter = {
- .setValues = TasksMeter_setValues,
- .display = TasksMeter_display,
- .mode = TEXT_METERMODE,
- .items = 1,
- .total = 100.0,
- .attributes = TasksMeter_attributes,
- .name = "Tasks",
- .uiName = "Task counter",
- .caption = "Tasks: "
-};
-
-void TasksMeter_setValues(Meter* this, char* buffer, int len) {
+static void TasksMeter_setValues(Meter* this, char* buffer, int len) {
this->total = this->pl->totalTasks;
this->values[0] = this->pl->runningTasks;
snprintf(buffer, len, "%d/%d", (int) this->values[0], (int) this->total);
}
-void TasksMeter_display(Object* cast, RichString* out) {
+static void TasksMeter_display(Object* cast, RichString* out) {
Meter* this = (Meter*)cast;
RichString_init(out);
char buffer[20];
@@ -47,3 +35,15 @@ void TasksMeter_display(Object* cast, RichString* out) {
RichString_append(out, CRT_colors[TASKS_RUNNING], buffer);
RichString_append(out, CRT_colors[METER_TEXT], " running");
}
+
+MeterType TasksMeter = {
+ .setValues = TasksMeter_setValues,
+ .display = TasksMeter_display,
+ .mode = TEXT_METERMODE,
+ .items = 1,
+ .total = 100.0,
+ .attributes = TasksMeter_attributes,
+ .name = "Tasks",
+ .uiName = "Task counter",
+ .caption = "Tasks: "
+};