From 0a184b769f239700273b163deedb5bc5e5b777e9 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 23 Feb 2015 03:53:36 -0300 Subject: [PATCH] Merge fixes --- Process.c | 4 +--- Process.h | 4 +--- Settings.c | 4 ++-- Settings.h | 4 ++-- linux/LinuxProcess.c | 6 +++--- linux/LinuxProcess.h | 2 +- linux/LinuxProcessList.c | 2 +- 7 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Process.c b/Process.c index dbdb4810..16ac7001 100644 --- a/Process.c +++ b/Process.c @@ -45,8 +45,6 @@ in the source distribution for its full text. #include -typedef struct Settings_ Settings; - #define PROCESS_FLAG_IO 1 #define PROCESS_FLAG_IOPRIO 2 #define PROCESS_FLAG_OPENVZ 4 @@ -660,7 +658,7 @@ ObjectClass Process_class = { .compare = Process_compare }; -void Process_init(Process* this, struct Settings_* settings, struct ProcessList_* pl) { +void Process_init(Process* this, struct ProcessList_* pl) { this->pid = 0; this->pl = pl; this->tag = false; diff --git a/Process.h b/Process.h index f4d5a463..5affabee 100644 --- a/Process.h +++ b/Process.h @@ -24,8 +24,6 @@ in the source distribution for its full text. #include -typedef struct Settings_ Settings; - #define PROCESS_FLAG_IO 1 #define PROCESS_FLAG_IOPRIO 2 #define PROCESS_FLAG_OPENVZ 4 @@ -195,7 +193,7 @@ void Process_done(Process* this); extern ObjectClass Process_class; -void Process_init(Process* this, struct Settings_* settings, struct ProcessList_* pl); +void Process_init(Process* this, struct ProcessList_* pl); void Process_toggleTag(Process* this); diff --git a/Settings.c b/Settings.c index 52ab39eb..1dc8b1b2 100644 --- a/Settings.c +++ b/Settings.c @@ -22,14 +22,14 @@ in the source distribution for its full text. #include "Header.h" #include -struct Settings_ { +typedef struct Settings_ { char* userSettings; ProcessList* pl; Header* header; int colorScheme; int delay; bool changed; -}; +} Settings; }*/ diff --git a/Settings.h b/Settings.h index 2fe27abe..28fe5520 100644 --- a/Settings.h +++ b/Settings.h @@ -15,14 +15,14 @@ in the source distribution for its full text. #include "Header.h" #include -struct Settings_ { +typedef struct Settings_ { char* userSettings; ProcessList* pl; Header* header; int colorScheme; int delay; bool changed; -}; +} Settings; void Settings_delete(Settings* this); diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index 9c26018d..efc9fc69 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -27,15 +27,15 @@ typedef struct LinuxProcess_ { }*/ -LinuxProcess* LinuxProcess_new(Settings* settings, ProcessList* pl) { +LinuxProcess* LinuxProcess_new(ProcessList* pl) { LinuxProcess* this = calloc(sizeof(LinuxProcess), 1); - Process_init(&this->super, settings, pl); + Object_setClass(this, Class(Process)); + Process_init(&this->super, pl); return this; } void LinuxProcess_delete(Object* cast) { LinuxProcess* this = (LinuxProcess*) this; - Object_setClass(this, Class(Process)); Process_done((Process*)cast); free(this); } diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h index ec2740e9..a162c5eb 100644 --- a/linux/LinuxProcess.h +++ b/linux/LinuxProcess.h @@ -20,7 +20,7 @@ typedef struct LinuxProcess_ { #define Process_delete LinuxProcess_delete -LinuxProcess* LinuxProcess_new(Settings* settings); +LinuxProcess* LinuxProcess_new(ProcessList* pl); void LinuxProcess_delete(Object* cast); diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 2bce78e5..54d20708 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -465,7 +465,7 @@ static bool LinuxProcessList_processEntries(ProcessList* this, const char* dirna process = existingProcess; assert(process->pid == pid); } else { - process = (Process*) LinuxProcess_new(settings, this); + process = (Process*) LinuxProcess_new(this); assert(process->comm == NULL); process->pid = pid; process->tgid = parent ? parent->pid : pid;