summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcess.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-04 17:46:14 +0100
committerBenBE <BenBE@geshi.org>2020-11-15 18:35:30 +0100
commit9f67b95308d11ee922e92f0649c2796bac58c1c5 (patch)
tree58c1f4d5e937dd9f1a8cdef391baf3f83144de2e /linux/LinuxProcess.c
parent91317322fee239082f04f410a5f6506a61a7ac9c (diff)
Mark local functions static
Diffstat (limited to 'linux/LinuxProcess.c')
-rw-r--r--linux/LinuxProcess.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index cd8db3d0..2fec52f1 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -128,16 +128,6 @@ ProcessPidColumn Process_pidColumns[] = {
{ .id = 0, .label = NULL },
};
-const ProcessClass LinuxProcess_class = {
- .super = {
- .extends = Class(Process),
- .display = Process_display,
- .delete = Process_delete,
- .compare = LinuxProcess_compare
- },
- .writeField = LinuxProcess_writeField,
-};
-
Process* LinuxProcess_new(const Settings* settings) {
LinuxProcess* this = xCalloc(1, sizeof(LinuxProcess));
Object_setClass(this, Class(LinuxProcess));
@@ -203,7 +193,7 @@ void LinuxProcess_printDelay(float delay_percent, char* buffer, int n) {
}
#endif
-void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField field) {
+static void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField field) {
const LinuxProcess* lp = (const LinuxProcess*) this;
bool coloring = this->settings->highlightMegabytes;
char buffer[256]; buffer[255] = '\0';
@@ -304,7 +294,7 @@ void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField
RichString_append(str, attr, buffer);
}
-long LinuxProcess_compare(const void* v1, const void* v2) {
+static long LinuxProcess_compare(const void* v1, const void* v2) {
const LinuxProcess *p1, *p2;
const Settings *settings = ((const Process*)v1)->settings;
@@ -401,3 +391,13 @@ long LinuxProcess_compare(const void* v1, const void* v2) {
bool Process_isThread(const Process* this) {
return (Process_isUserlandThread(this) || Process_isKernelThread(this));
}
+
+const ProcessClass LinuxProcess_class = {
+ .super = {
+ .extends = Class(Process),
+ .display = Process_display,
+ .delete = Process_delete,
+ .compare = LinuxProcess_compare
+ },
+ .writeField = LinuxProcess_writeField
+};

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