diff options
author | Nathan Scott <nathans@redhat.com> | 2023-08-31 11:56:43 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-08-31 14:13:16 +1000 |
commit | b74673fe37fd379fc350789e696470556776d815 (patch) | |
tree | cbe4f036962c439f9c07a9c96302f5908f6410b0 /unsupported | |
parent | 214166a049c2a6ac454dbb37b85b04c039a6a17a (diff) |
Rename ProcessList to ProcessTable throughout
Following up with some discusson from a few months back,
where it was proposed that ProcessTable is a better name.
This data structure is definitely not a list ... if it
was one-dimensional it'd be a set, but in practice it has
much more in common with a two-dimensional table.
The Process table is a familiar operating system concept
for many people too so it resonates a little in that way
as well.
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/UnsupportedProcessList.h | 17 | ||||
-rw-r--r-- | unsupported/UnsupportedProcessTable.c (renamed from unsupported/UnsupportedProcessList.c) | 28 | ||||
-rw-r--r-- | unsupported/UnsupportedProcessTable.h | 17 |
3 files changed, 31 insertions, 31 deletions
diff --git a/unsupported/UnsupportedProcessList.h b/unsupported/UnsupportedProcessList.h deleted file mode 100644 index 96efdcd2..00000000 --- a/unsupported/UnsupportedProcessList.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef HEADER_UnsupportedProcessList -#define HEADER_UnsupportedProcessList -/* -htop - UnsupportedProcessList.h -(C) 2014 Hisham H. Muhammad -Released under the GNU GPLv2+, see the COPYING file -in the source distribution for its full text. -*/ - -#include "ProcessList.h" - - -typedef struct UnsupportedProcessList_ { - ProcessList super; -} UnsupportedProcessList; - -#endif diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessTable.c index 1e29c17a..e0325e4d 100644 --- a/unsupported/UnsupportedProcessList.c +++ b/unsupported/UnsupportedProcessTable.c @@ -1,40 +1,40 @@ /* -htop - UnsupportedProcessList.c +htop - UnsupportedProcessTable.c (C) 2014 Hisham H. Muhammad Released under the GNU GPLv2+, see the COPYING file in the source distribution for its full text. */ -#include "UnsupportedProcessList.h" +#include "UnsupportedProcessTable.h" #include <stdlib.h> #include <string.h> -#include "ProcessList.h" +#include "ProcessTable.h" #include "UnsupportedProcess.h" -ProcessList* ProcessList_new(Machine* host, Hashtable* pidMatchList) { - UnsupportedProcessList* this = xCalloc(1, sizeof(UnsupportedProcessList)); - Object_setClass(this, Class(ProcessList)); +ProcessTable* ProcessTable_new(Machine* host, Hashtable* pidMatchList) { + UnsupportedProcessTable* this = xCalloc(1, sizeof(UnsupportedProcessTable)); + Object_setClass(this, Class(ProcessTable)); - ProcessList* super = &this->super; - ProcessList_init(super, Class(Process), host, pidMatchList); + ProcessTable* super = &this->super; + ProcessTable_init(super, Class(Process), host, pidMatchList); return this; } -void ProcessList_delete(Object* cast) { - UnsupportedProcessList* this = (UnsupportedProcessList*) cast; - ProcessList_done(&this->super); +void ProcessTable_delete(Object* cast) { + UnsupportedProcessTable* this = (UnsupportedProcessTable*) cast; + ProcessTable_done(&this->super); free(this); } -void ProcessList_goThroughEntries(ProcessList* super) { +void ProcessTable_goThroughEntries(ProcessTable* super) { bool preExisting = true; Process* proc; - proc = ProcessList_getProcess(super, 1, &preExisting, UnsupportedProcess_new); + proc = ProcessTable_getProcess(super, 1, &preExisting, UnsupportedProcess_new); /* Empty values */ proc->time = proc->time + 10; @@ -84,5 +84,5 @@ void ProcessList_goThroughEntries(ProcessList* super) { proc->majflt = 20; if (!preExisting) - ProcessList_add(super, proc); + ProcessTable_add(super, proc); } diff --git a/unsupported/UnsupportedProcessTable.h b/unsupported/UnsupportedProcessTable.h new file mode 100644 index 00000000..1de8087d --- /dev/null +++ b/unsupported/UnsupportedProcessTable.h @@ -0,0 +1,17 @@ +#ifndef HEADER_UnsupportedProcessTable +#define HEADER_UnsupportedProcessTable +/* +htop - UnsupportedProcessTable.h +(C) 2014 Hisham H. Muhammad +Released under the GNU GPLv2+, see the COPYING file +in the source distribution for its full text. +*/ + +#include "ProcessTable.h" + + +typedef struct UnsupportedProcessTable_ { + ProcessTable super; +} UnsupportedProcessTable; + +#endif |