mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-28 16:45:46 +00:00
e8970b6f32
* size_t nmemb (number of elements) first, then size_t size * do not assume char is size 1 but use sizeof() * allocate for char, not pointer to char (found by Michael McConville, fixes #261)
34 lines
726 B
C
34 lines
726 B
C
/*
|
|
htop - UnsupportedProcess.c
|
|
(C) 2015 Hisham H. Muhammad
|
|
Released under the GNU GPL, see the COPYING file
|
|
in the source distribution for its full text.
|
|
*/
|
|
|
|
#include "Process.h"
|
|
#include "UnsupportedProcess.h"
|
|
#include <stdlib.h>
|
|
|
|
/*{
|
|
#include "Settings.h"
|
|
|
|
#define Process_delete UnsupportedProcess_delete
|
|
|
|
}*/
|
|
|
|
Process* UnsupportedProcess_new(Settings* settings) {
|
|
Process* this = calloc(1, sizeof(Process));
|
|
Object_setClass(this, Class(Process));
|
|
Process_init(this, settings);
|
|
return this;
|
|
}
|
|
|
|
void UnsupportedProcess_delete(Object* cast) {
|
|
Process* this = (Process*) cast;
|
|
Object_setClass(this, Class(Process));
|
|
Process_done((Process*)cast);
|
|
// free platform-specific fields here
|
|
free(this);
|
|
}
|
|
|