diff options
-rw-r--r-- | Affinity.c | 8 | ||||
-rw-r--r-- | AffinityPanel.c | 19 | ||||
-rw-r--r-- | AffinityPanel.h | 14 | ||||
-rw-r--r-- | AvailableColumnsPanel.c | 18 | ||||
-rw-r--r-- | AvailableColumnsPanel.h | 15 | ||||
-rw-r--r-- | AvailableMetersPanel.c | 20 | ||||
-rw-r--r-- | AvailableMetersPanel.h | 15 | ||||
-rw-r--r-- | BatteryMeter.c | 18 | ||||
-rw-r--r-- | BatteryMeter.h | 15 | ||||
-rw-r--r-- | CPUMeter.c | 9 | ||||
-rw-r--r-- | CPUMeter.h | 10 | ||||
-rw-r--r-- | CRT.c | 15 | ||||
-rw-r--r-- | CRT.h | 14 | ||||
-rw-r--r-- | CategoriesPanel.c | 15 | ||||
-rw-r--r-- | CategoriesPanel.h | 19 | ||||
-rw-r--r-- | CheckItem.c | 9 | ||||
-rw-r--r-- | CheckItem.h | 6 | ||||
-rw-r--r-- | ClockMeter.c | 10 | ||||
-rw-r--r-- | ClockMeter.h | 6 | ||||
-rw-r--r-- | ColorsPanel.c | 19 | ||||
-rw-r--r-- | ColorsPanel.h | 20 | ||||
-rw-r--r-- | ColumnsPanel.c | 17 | ||||
-rw-r--r-- | ColumnsPanel.h | 11 | ||||
-rw-r--r-- | DebugMemory.c | 6 | ||||
-rw-r--r-- | DebugMemory.h | 13 | ||||
-rw-r--r-- | DisplayOptionsPanel.c | 16 | ||||
-rw-r--r-- | DisplayOptionsPanel.h | 12 | ||||
-rw-r--r-- | FunctionBar.c | 6 | ||||
-rw-r--r-- | FunctionBar.h | 10 | ||||
-rw-r--r-- | Hashtable.c | 9 | ||||
-rw-r--r-- | Hashtable.h | 7 | ||||
-rw-r--r-- | Header.c | 17 | ||||
-rw-r--r-- | Header.h | 6 | ||||
-rw-r--r-- | HostnameMeter.c | 10 | ||||
-rw-r--r-- | HostnameMeter.h | 6 | ||||
-rw-r--r-- | ListItem.c | 10 | ||||
-rw-r--r-- | ListItem.h | 6 | ||||
-rw-r--r-- | LoadAverageMeter.c | 11 | ||||
-rw-r--r-- | LoadAverageMeter.h | 6 | ||||
-rw-r--r-- | MemoryMeter.c | 11 | ||||
-rw-r--r-- | MemoryMeter.h | 13 | ||||
-rw-r--r-- | Meter.c | 33 | ||||
-rw-r--r-- | Meter.h | 29 | ||||
-rw-r--r-- | MetersPanel.c | 15 | ||||
-rw-r--r-- | MetersPanel.h | 11 | ||||
-rw-r--r-- | Object.c | 9 | ||||
-rw-r--r-- | Object.h | 9 | ||||
-rw-r--r-- | OpenFilesScreen.c | 14 | ||||
-rw-r--r-- | OpenFilesScreen.h | 12 | ||||
-rw-r--r-- | Panel.c | 14 | ||||
-rw-r--r-- | Panel.h | 16 | ||||
-rw-r--r-- | Process.c | 12 | ||||
-rw-r--r-- | Process.h | 27 | ||||
-rw-r--r-- | ProcessList.c | 27 | ||||
-rw-r--r-- | ProcessList.h | 25 | ||||
-rw-r--r-- | RichString.c | 20 | ||||
-rw-r--r-- | RichString.h | 16 | ||||
-rw-r--r-- | ScreenManager.c | 13 | ||||
-rw-r--r-- | ScreenManager.h | 13 | ||||
-rw-r--r-- | Settings.c | 14 | ||||
-rw-r--r-- | Settings.h | 10 | ||||
-rw-r--r-- | SignalsPanel.c | 12 | ||||
-rw-r--r-- | SignalsPanel.h | 14 | ||||
-rw-r--r-- | String.c | 9 | ||||
-rw-r--r-- | String.h | 10 | ||||
-rw-r--r-- | SwapMeter.c | 11 | ||||
-rw-r--r-- | SwapMeter.h | 13 | ||||
-rw-r--r-- | TasksMeter.c | 9 | ||||
-rw-r--r-- | TasksMeter.h | 8 | ||||
-rw-r--r-- | TraceScreen.c | 15 | ||||
-rw-r--r-- | TraceScreen.h | 12 | ||||
-rw-r--r-- | UptimeMeter.c | 11 | ||||
-rw-r--r-- | UptimeMeter.h | 8 | ||||
-rw-r--r-- | UsersTable.c | 9 | ||||
-rw-r--r-- | UsersTable.h | 10 | ||||
-rw-r--r-- | Vector.c | 11 | ||||
-rw-r--r-- | Vector.h | 9 | ||||
-rw-r--r-- | htop.c | 26 | ||||
-rw-r--r-- | htop.h | 27 | ||||
-rwxr-xr-x | scripts/MakeHeader.py | 12 |
80 files changed, 486 insertions, 586 deletions
@@ -1,6 +1,12 @@ +/* +htop - Affinity.c +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ -#include "config.h" #include "Affinity.h" + #include <stdlib.h> /*{ diff --git a/AffinityPanel.c b/AffinityPanel.c index 655af607..db1fd572 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -1,11 +1,24 @@ +/* +htop - AffinityPanel.c +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ -#include "ProcessList.h" #include "AffinityPanel.h" -#include "Panel.h" -#include "CheckItem.h" +#include "CheckItem.h" #include "debug.h" + #include <assert.h> +#include <string.h> + +/*{ +#include "Panel.h" +#include "Affinity.h" +#include "ProcessList.h" +#include "ListItem.h" +}*/ static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) { CheckItem* selected = (CheckItem*) Panel_getSelected(this); diff --git a/AffinityPanel.h b/AffinityPanel.h index 8ab39633..392a2597 100644 --- a/AffinityPanel.h +++ b/AffinityPanel.h @@ -2,13 +2,17 @@ #ifndef HEADER_AffinityPanel #define HEADER_AffinityPanel +/* +htop - AffinityPanel.h +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ -#include "ProcessList.h" #include "Panel.h" -#include "CheckItem.h" - -#include "debug.h" -#include <assert.h> +#include "Affinity.h" +#include "ProcessList.h" +#include "ListItem.h" Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity); diff --git a/AvailableColumnsPanel.c b/AvailableColumnsPanel.c index 5ed9ffcf..036503fd 100644 --- a/AvailableColumnsPanel.c +++ b/AvailableColumnsPanel.c @@ -1,16 +1,24 @@ +/* +htop - AvailableColumnsPanel.c +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ #include "AvailableColumnsPanel.h" -#include "Settings.h" + #include "Header.h" -#include "ScreenManager.h" #include "ColumnsPanel.h" - -#include "Panel.h" - #include "debug.h" + #include <assert.h> +#include <stdlib.h> +#include <ctype.h> /*{ +#include "Panel.h" +#include "Settings.h" +#include "ScreenManager.h" typedef struct AvailableColumnsPanel_ { Panel super; diff --git a/AvailableColumnsPanel.h b/AvailableColumnsPanel.h index d07acf80..6a32f9fb 100644 --- a/AvailableColumnsPanel.h +++ b/AvailableColumnsPanel.h @@ -2,17 +2,16 @@ #ifndef HEADER_AvailableColumnsPanel #define HEADER_AvailableColumnsPanel +/* +htop - AvailableColumnsPanel.h +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ +#include "Panel.h" #include "Settings.h" -#include "Header.h" #include "ScreenManager.h" -#include "ColumnsPanel.h" - -#include "Panel.h" - -#include "debug.h" -#include <assert.h> - typedef struct AvailableColumnsPanel_ { Panel super; diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c index cfed46e6..5eedf21f 100644 --- a/AvailableMetersPanel.c +++ b/AvailableMetersPanel.c @@ -1,16 +1,24 @@ +/* +htop - AvailableMetersPanel.c +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ #include "AvailableMetersPanel.h" -#include "Settings.h" -#include "Header.h" -#include "ScreenManager.h" -#include "CPUMeter.h" - -#include "Panel.h" +#include "CPUMeter.h" +#include "Header.h" +#include "ListItem.h" #include "debug.h" + #include <assert.h> +#include <stdlib.h> /*{ +#include "Settings.h" +#include "Panel.h" +#include "ScreenManager.h" typedef struct AvailableMetersPanel_ { Panel super; diff --git a/AvailableMetersPanel.h b/AvailableMetersPanel.h index 25d4c08b..c34f0b2c 100644 --- a/AvailableMetersPanel.h +++ b/AvailableMetersPanel.h @@ -2,17 +2,16 @@ #ifndef HEADER_AvailableMetersPanel #define HEADER_AvailableMetersPanel +/* +htop - AvailableMetersPanel.h +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ #include "Settings.h" -#include "Header.h" -#include "ScreenManager.h" -#include "CPUMeter.h" - #include "Panel.h" - -#include "debug.h" -#include <assert.h> - +#include "ScreenManager.h" typedef struct AvailableMetersPanel_ { Panel super; diff --git a/BatteryMeter.c b/BatteryMeter.c index f7323aa9..45c07b33 100644 --- a/BatteryMeter.c +++ b/BatteryMeter.c @@ -1,20 +1,26 @@ /* - htop - (C) 2004-2011 Hisham H. Muhammad - Released under the GNU GPL, see the COPYING file - in the source distribution for its full text. +htop - BatteryMeter.c +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. - This "Meter" written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com). +This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com). */ #include "BatteryMeter.h" -#include "Meter.h" + #include "ProcessList.h" #include "CRT.h" #include "String.h" #include "debug.h" +#include <string.h> +#include <stdlib.h> +#include <dirent.h> +#include <unistd.h> + /*{ +#include "Meter.h" typedef enum ACPresence_ { AC_ABSENT, diff --git a/BatteryMeter.h b/BatteryMeter.h index 9bef8df6..56ed951e 100644 --- a/BatteryMeter.h +++ b/BatteryMeter.h @@ -3,20 +3,15 @@ #ifndef HEADER_BatteryMeter #define HEADER_BatteryMeter /* - htop - (C) 2004-2011 Hisham H. Muhammad - Released under the GNU GPL, see the COPYING file - in the source distribution for its full text. +htop - BatteryMeter.h +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. - This "Meter" written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com). +This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com). */ #include "Meter.h" -#include "ProcessList.h" -#include "CRT.h" -#include "String.h" -#include "debug.h" - typedef enum ACPresence_ { AC_ABSENT, @@ -6,17 +6,20 @@ in the source distribution for its full text. */ #include "CPUMeter.h" -#include "Meter.h" +#include "CRT.h" #include "ProcessList.h" +#include "debug.h" +#include <assert.h> #include <stdlib.h> #include <curses.h> #include <string.h> #include <math.h> -#include "debug.h" -#include <assert.h> +/*{ +#include "Meter.h" +}*/ int CPUMeter_attributes[] = { CPU_NICE, CPU_NORMAL, CPU_KERNEL, CPU_IRQ, CPU_SOFTIRQ, CPU_IOWAIT, CPU_STEAL, CPU_GUEST @@ -11,16 +11,6 @@ in the source distribution for its full text. #include "Meter.h" -#include "ProcessList.h" - -#include <stdlib.h> -#include <curses.h> -#include <string.h> -#include <math.h> - -#include "debug.h" -#include <assert.h> - extern int CPUMeter_attributes[]; #ifndef MIN @@ -7,19 +7,17 @@ in the source distribution for its full text. #include "CRT.h" +#include "config.h" +#include "String.h" +#include "debug.h" + #include <curses.h> #include <signal.h> #include <stdlib.h> -#include <stdbool.h> #ifdef HAVE_EXECINFO_H #include <execinfo.h> #endif -#include "String.h" - -#include "config.h" -#include "debug.h" - #define ColorPair(i,j) COLOR_PAIR((7-i)*8+j) #define COLORSCHEME_DEFAULT 0 @@ -40,9 +38,8 @@ in the source distribution for its full text. //#link curses -bool CRT_hasColors; - /*{ +#include <stdbool.h> typedef enum ColorElements_ { RESET_COLOR, @@ -112,6 +109,8 @@ typedef enum ColorElements_ { // TODO: centralize these in Settings. +static bool CRT_hasColors; + int CRT_delay = 0; int CRT_colorScheme = 0; @@ -9,20 +9,9 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - -#include <curses.h> -#include <signal.h> -#include <stdlib.h> -#include <stdbool.h> #ifdef HAVE_EXECINFO_H -#include <execinfo.h> #endif -#include "String.h" - -#include "config.h" -#include "debug.h" - #define ColorPair(i,j) COLOR_PAIR((7-i)*8+j) #define COLORSCHEME_DEFAULT 0 @@ -43,8 +32,7 @@ in the source distribution for its full text. //#link curses -bool CRT_hasColors; - +#include <stdbool.h> typedef enum ColorElements_ { RESET_COLOR, diff --git a/CategoriesPanel.c b/CategoriesPanel.c index b3cb3aa9..ccdda9c4 100644 --- a/CategoriesPanel.c +++ b/CategoriesPanel.c @@ -1,18 +1,27 @@ +/* +htop - CategoriesPanel.c +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ #include "CategoriesPanel.h" + #include "AvailableMetersPanel.h" #include "MetersPanel.h" #include "DisplayOptionsPanel.h" #include "ColumnsPanel.h" #include "ColorsPanel.h" #include "AvailableColumnsPanel.h" - -#include "Panel.h" - #include "debug.h" + #include <assert.h> +#include <stdlib.h> /*{ +#include "Panel.h" +#include "Settings.h" +#include "ScreenManager.h" typedef struct CategoriesPanel_ { Panel super; diff --git a/CategoriesPanel.h b/CategoriesPanel.h index 7748fe1f..1311fe2e 100644 --- a/CategoriesPanel.h +++ b/CategoriesPanel.h @@ -2,19 +2,16 @@ #ifndef HEADER_CategoriesPanel #define HEADER_CategoriesPanel - -#include "AvailableMetersPanel.h" -#include "MetersPanel.h" -#include "DisplayOptionsPanel.h" -#include "ColumnsPanel.h" -#include "ColorsPanel.h" -#include "AvailableColumnsPanel.h" +/* +htop - CategoriesPanel.h +(C) 2004-2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ #include "Panel.h" - -#include "debug.h" -#include <assert.h> - +#include "Settings.h" +#include "ScreenManager.h" typedef struct CategoriesPanel_ { Panel super; diff --git a/CheckItem.c b/CheckItem.c index 2d87aded..0a171f7b 100644 --- a/CheckItem.c +++ b/CheckItem.c @@ -1,17 +1,20 @@ /* -htop +htop - CheckItem.c (C) 2004-2011 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ #include "CheckItem.h" -#include "Object.h" -#include "CRT.h" +#include "CRT.h" #include "debug.h" +#include <assert.h> +#include <stdlib.h> + /*{ +#include "Object.h" typedef struct CheckItem_ { Object super; diff --git a/CheckItem.h b/CheckItem.h index 32156238..6c70790e 100644 --- a/CheckItem.h +++ b/CheckItem.h @@ -3,17 +3,13 @@ #ifndef HEADER_CheckItem #define HEADER_CheckItem /* -htop +htop - CheckItem.h (C) 2004-2011 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ #include "Object.h" -#include "CRT.h" - -#include "debug.h" - typedef s |