diff --git a/dragonflybsd/DragonFlyBSDProcess.c b/dragonflybsd/DragonFlyBSDProcess.c index 4c231093..517fc2a1 100644 --- a/dragonflybsd/DragonFlyBSDProcess.c +++ b/dragonflybsd/DragonFlyBSDProcess.c @@ -25,7 +25,7 @@ const ProcessClass DragonFlyBSDProcess_class = { .delete = Process_delete, .compare = DragonFlyBSDProcess_compare }, - .writeField = (Process_WriteField) DragonFlyBSDProcess_writeField, + .writeField = DragonFlyBSDProcess_writeField, }; ProcessFieldData Process_fields[] = { @@ -83,8 +83,8 @@ void Process_delete(Object* cast) { free(this); } -void DragonFlyBSDProcess_writeField(Process* this, RichString* str, ProcessField field) { - DragonFlyBSDProcess* fp = (DragonFlyBSDProcess*) this; +void DragonFlyBSDProcess_writeField(const Process* this, RichString* str, ProcessField field) { + const DragonFlyBSDProcess* fp = (const DragonFlyBSDProcess*) this; char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; int n = sizeof(buffer) - 1; diff --git a/dragonflybsd/DragonFlyBSDProcess.h b/dragonflybsd/DragonFlyBSDProcess.h index 1c048143..92e1dde2 100644 --- a/dragonflybsd/DragonFlyBSDProcess.h +++ b/dragonflybsd/DragonFlyBSDProcess.h @@ -37,7 +37,7 @@ DragonFlyBSDProcess* DragonFlyBSDProcess_new(Settings* settings); void Process_delete(Object* cast); -void DragonFlyBSDProcess_writeField(Process* this, RichString* str, ProcessField field); +void DragonFlyBSDProcess_writeField(const Process* this, RichString* str, ProcessField field); long DragonFlyBSDProcess_compare(const void* v1, const void* v2); diff --git a/freebsd/FreeBSDProcess.c b/freebsd/FreeBSDProcess.c index 71019494..684f4dfe 100644 --- a/freebsd/FreeBSDProcess.c +++ b/freebsd/FreeBSDProcess.c @@ -24,7 +24,7 @@ const ProcessClass FreeBSDProcess_class = { .delete = Process_delete, .compare = FreeBSDProcess_compare }, - .writeField = (Process_WriteField) FreeBSDProcess_writeField, + .writeField = FreeBSDProcess_writeField, }; ProcessFieldData Process_fields[] = { @@ -83,8 +83,8 @@ void Process_delete(Object* cast) { free(this); } -void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField field) { - FreeBSDProcess* fp = (FreeBSDProcess*) this; +void FreeBSDProcess_writeField(const Process* this, RichString* str, ProcessField field) { + const FreeBSDProcess* fp = (const FreeBSDProcess*) this; char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; int n = sizeof(buffer) - 1; diff --git a/freebsd/FreeBSDProcess.h b/freebsd/FreeBSDProcess.h index 36657060..d7b40101 100644 --- a/freebsd/FreeBSDProcess.h +++ b/freebsd/FreeBSDProcess.h @@ -43,7 +43,7 @@ FreeBSDProcess* FreeBSDProcess_new(Settings* settings); void Process_delete(Object* cast); -void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField field); +void FreeBSDProcess_writeField(const Process* this, RichString* str, ProcessField field); long FreeBSDProcess_compare(const void* v1, const void* v2); diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index 8003157c..b53692d8 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -135,7 +135,7 @@ const ProcessClass LinuxProcess_class = { .delete = Process_delete, .compare = LinuxProcess_compare }, - .writeField = (Process_WriteField) LinuxProcess_writeField, + .writeField = LinuxProcess_writeField, }; LinuxProcess* LinuxProcess_new(Settings* settings) { @@ -197,8 +197,8 @@ void LinuxProcess_printDelay(float delay_percent, char* buffer, int n) { } #endif -void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field) { - LinuxProcess* lp = (LinuxProcess*) this; +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'; int attr = CRT_colors[DEFAULT_COLOR]; diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h index 8e7c36dc..bb0c5ebb 100644 --- a/linux/LinuxProcess.h +++ b/linux/LinuxProcess.h @@ -189,7 +189,7 @@ bool LinuxProcess_setIOPriority(LinuxProcess* this, Arg ioprio); void LinuxProcess_printDelay(float delay_percent, char* buffer, int n); #endif -void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field); +void LinuxProcess_writeField(const Process* this, RichString* str, ProcessField field); long LinuxProcess_compare(const void* v1, const void* v2); diff --git a/openbsd/OpenBSDProcess.c b/openbsd/OpenBSDProcess.c index 56bc0771..bc6ef4a8 100644 --- a/openbsd/OpenBSDProcess.c +++ b/openbsd/OpenBSDProcess.c @@ -24,7 +24,7 @@ const ProcessClass OpenBSDProcess_class = { .delete = Process_delete, .compare = OpenBSDProcess_compare }, - .writeField = (Process_WriteField) OpenBSDProcess_writeField, + .writeField = OpenBSDProcess_writeField, }; ProcessFieldData Process_fields[] = { @@ -178,7 +178,7 @@ void Process_delete(Object* cast) { free(this); } -void OpenBSDProcess_writeField(Process* this, RichString* str, ProcessField field) { +void OpenBSDProcess_writeField(const Process* this, RichString* str, ProcessField field) { //OpenBSDProcess* fp = (OpenBSDProcess*) this; char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; diff --git a/openbsd/OpenBSDProcess.h b/openbsd/OpenBSDProcess.h index 5694a524..c9d4e381 100644 --- a/openbsd/OpenBSDProcess.h +++ b/openbsd/OpenBSDProcess.h @@ -31,7 +31,7 @@ OpenBSDProcess* OpenBSDProcess_new(Settings* settings); void Process_delete(Object* cast); -void OpenBSDProcess_writeField(Process* this, RichString* str, ProcessField field); +void OpenBSDProcess_writeField(const Process* this, RichString* str, ProcessField field); long OpenBSDProcess_compare(const void* v1, const void* v2); diff --git a/solaris/SolarisProcess.c b/solaris/SolarisProcess.c index 0d994669..13652bd3 100644 --- a/solaris/SolarisProcess.c +++ b/solaris/SolarisProcess.c @@ -25,7 +25,7 @@ const ProcessClass SolarisProcess_class = { .delete = Process_delete, .compare = SolarisProcess_compare }, - .writeField = (Process_WriteField) SolarisProcess_writeField, + .writeField = SolarisProcess_writeField, }; ProcessFieldData Process_fields[] = { @@ -93,8 +93,8 @@ void Process_delete(Object* cast) { free(sp); } -void SolarisProcess_writeField(Process* this, RichString* str, ProcessField field) { - SolarisProcess* sp = (SolarisProcess*) this; +void SolarisProcess_writeField(const Process* this, RichString* str, ProcessField field) { + const SolarisProcess* sp = (const SolarisProcess*) this; char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; int n = sizeof(buffer) - 1; diff --git a/solaris/SolarisProcess.h b/solaris/SolarisProcess.h index a1b3b14d..23012a2f 100644 --- a/solaris/SolarisProcess.h +++ b/solaris/SolarisProcess.h @@ -54,7 +54,7 @@ SolarisProcess* SolarisProcess_new(Settings* settings); void Process_delete(Object* cast); -void SolarisProcess_writeField(Process* this, RichString* str, ProcessField field); +void SolarisProcess_writeField(const Process* this, RichString* str, ProcessField field); long SolarisProcess_compare(const void* v1, const void* v2);