Merge fixes

This commit is contained in:
Hisham Muhammad 2015-02-23 03:53:36 -03:00
parent 8b5b73825e
commit 0a184b769f
7 changed files with 11 additions and 15 deletions

View File

@ -45,8 +45,6 @@ in the source distribution for its full text.
#include <sys/types.h>
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;

View File

@ -24,8 +24,6 @@ in the source distribution for its full text.
#include <sys/types.h>
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);

View File

@ -22,14 +22,14 @@ in the source distribution for its full text.
#include "Header.h"
#include <stdbool.h>
struct Settings_ {
typedef struct Settings_ {
char* userSettings;
ProcessList* pl;
Header* header;
int colorScheme;
int delay;
bool changed;
};
} Settings;
}*/

View File

@ -15,14 +15,14 @@ in the source distribution for its full text.
#include "Header.h"
#include <stdbool.h>
struct Settings_ {
typedef struct Settings_ {
char* userSettings;
ProcessList* pl;
Header* header;
int colorScheme;
int delay;
bool changed;
};
} Settings;
void Settings_delete(Settings* this);

View File

@ -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);
}

View File

@ -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);

View File

@ -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;