Commit 84281bdc authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

major header cleanup

parent 81e44312
/*
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>
/*{
......
/*
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);
......
......@@ -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);
......
/*
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;
......
......@@ -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;
......
/*
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;
......
......@@ -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;
......
/*
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,
......
......@@ -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,
......
/*
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;
......
......@@ -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;
......
/*
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;
......
......@@ -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 struct CheckItem_ {
Object super;
......
/*
htop
htop - ClockMeter.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 "ClockMeter.h"
#include "Meter.h"
#include "CRT.h"
#include "debug.h"
#include <time.h>
#include "debug.h"
/*{
#include "Meter.h"
}*/
int ClockMeter_attributes[] = {
CLOCK
......
......@@ -3,7 +3,7 @@
#ifndef HEADER_ClockMeter
#define HEADER_ClockMeter
/*
htop
htop - ClockMeter.h
(C) 2004-2011 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
......@@ -11,10 +11,6 @@ in the source distribution for its full text.
#include "Meter.h"
#include <time.h>
#include "debug.h"
extern int ClockMeter_attributes[];
extern MeterType ClockMeter;
......
/*
htop - ColorsPanel.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 "CRT.h"
#include "ColorsPanel.h"
#include "Panel.h"
#include "CRT.h"
#include "CheckItem.h"
#include "Settings.h"
#include "ScreenManager.h"
#include "debug.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
// TO ADD A NEW SCHEME:
// * Increment the size of bool check in ColorsPanel.h
......@@ -18,6 +22,9 @@
// * Add the colors in CRT_setColors
/*{
#include "Panel.h"
#include "Settings.h"
#include "ScreenManager.h"
typedef struct ColorsPanel_ {
Panel super;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment