From 43a72316157e98ad48dd6fd96f1a5d8d4de2f1a6 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 26 Feb 2013 16:50:21 +0000 Subject: [PATCH] Remove explicit calls to curses.h in other files --- CPUMeter.c | 1 - CRT.c | 3 ++- FunctionBar.c | 1 - LoadAverageMeter.c | 1 - MemoryMeter.c | 1 - Panel.c | 3 ++- SwapMeter.c | 1 - 7 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CPUMeter.c b/CPUMeter.c index b9d888ce..4ce47849 100644 --- a/CPUMeter.c +++ b/CPUMeter.c @@ -12,7 +12,6 @@ in the source distribution for its full text. #include #include -#include #include #include diff --git a/CRT.c b/CRT.c index 3a1eb913..64a38120 100644 --- a/CRT.c +++ b/CRT.c @@ -9,8 +9,9 @@ in the source distribution for its full text. #include "config.h" #include "String.h" +#include "RichString.h" -#include +#include #include #include #include diff --git a/FunctionBar.c b/FunctionBar.c index fb62823b..66b9843f 100644 --- a/FunctionBar.c +++ b/FunctionBar.c @@ -13,7 +13,6 @@ in the source distribution for its full text. #include #include #include -#include /*{ #include "Object.h" diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c index f4f37c7e..b8fbfa64 100644 --- a/LoadAverageMeter.c +++ b/LoadAverageMeter.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "CRT.h" -#include #include /*{ diff --git a/MemoryMeter.c b/MemoryMeter.c index eca0442e..47f28af4 100644 --- a/MemoryMeter.c +++ b/MemoryMeter.c @@ -11,7 +11,6 @@ in the source distribution for its full text. #include "ProcessList.h" #include -#include #include #include #include diff --git a/Panel.c b/Panel.c index 8a40ab61..70e84e20 100644 --- a/Panel.c +++ b/Panel.c @@ -18,7 +18,6 @@ in the source distribution for its full text. #include #include #include -#include //#link curses @@ -295,6 +294,7 @@ void Panel_draw(Panel* this, bool focus) { for(int i = first, j = 0; j < this->h && i < last; i++, j++) { Object* itemObj = Vector_get(this->items, i); + assert(itemObj); if(!itemObj) continue; RichString_begin(item); Object_display(itemObj, &item); int itemLen = RichString_sizeVal(item); @@ -319,6 +319,7 @@ void Panel_draw(Panel* this, bool focus) { } else { Object* oldObj = Vector_get(this->items, this->oldSelected); + assert(oldObj); RichString_begin(old); Object_display(oldObj, &old); int oldLen = RichString_sizeVal(old); diff --git a/SwapMeter.c b/SwapMeter.c index df6dd666..ff229d3e 100644 --- a/SwapMeter.c +++ b/SwapMeter.c @@ -11,7 +11,6 @@ in the source distribution for its full text. #include "ProcessList.h" #include -#include #include #include #include