diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:22 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:22 +0200 |
commit | c74c38760df69bb87e93dff18cf91464e5d02f37 (patch) | |
tree | ee2a19a0ef3a808bdfc8c1e6a00e96d79966dcb0 /SignalItem.c | |
parent | 9379132a8234eeedf62d37ef57713e52c12db6ab (diff) | |
download | debian_htop-c74c38760df69bb87e93dff18cf91464e5d02f37.tar.gz debian_htop-c74c38760df69bb87e93dff18cf91464e5d02f37.tar.bz2 debian_htop-c74c38760df69bb87e93dff18cf91464e5d02f37.zip |
Imported Upstream version 0.8.1upstream/0.8.1
Diffstat (limited to 'SignalItem.c')
-rw-r--r-- | SignalItem.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/SignalItem.c b/SignalItem.c index 81f564d..4d6df58 100644 --- a/SignalItem.c +++ b/SignalItem.c @@ -31,24 +31,14 @@ char* SIGNAL_CLASS = "Signal"; #define SIGNAL_CLASS NULL #endif -Signal* Signal_new(char* name, int number) { - Signal* this = malloc(sizeof(Signal)); - Object_setClass(this, SIGNAL_CLASS); - ((Object*)this)->display = Signal_display; - ((Object*)this)->delete = Signal_delete; - this->name = name; - this->number = number; - return this; -} - -void Signal_delete(Object* cast) { +static void Signal_delete(Object* cast) { Signal* this = (Signal*)cast; assert (this != NULL); // names are string constants, so we're not deleting them. free(this); } -void Signal_display(Object* cast, RichString* out) { +static void Signal_display(Object* cast, RichString* out) { Signal* this = (Signal*)cast; assert (this != NULL); @@ -57,6 +47,16 @@ void Signal_display(Object* cast, RichString* out) { RichString_write(out, CRT_colors[DEFAULT_COLOR], buffer); } +static Signal* Signal_new(char* name, int number) { + Signal* this = malloc(sizeof(Signal)); + Object_setClass(this, SIGNAL_CLASS); + ((Object*)this)->display = Signal_display; + ((Object*)this)->delete = Signal_delete; + this->name = name; + this->number = number; + return this; +} + int Signal_getSignalCount() { return SIGNAL_COUNT; } |