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

major header cleanup

parent 81e44312
......@@ -2,17 +2,12 @@
#ifndef HEADER_ColorsPanel
#define HEADER_ColorsPanel
#include "config.h"
#include "CRT.h"
#include "Panel.h"
#include "CheckItem.h"
#include "Settings.h"
#include "ScreenManager.h"
#include "debug.h"
#include <assert.h>
/*
htop - ColorsPanel.h
(C) 2004-2011 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
// TO ADD A NEW SCHEME:
// * Increment the size of bool check in ColorsPanel.h
......@@ -20,6 +15,9 @@
// * Add a define in CRT.h that matches the order of the array
// * Add the colors in CRT_setColors
#include "Panel.h"
#include "Settings.h"
#include "ScreenManager.h"
typedef struct ColorsPanel_ {
Panel super;
......
/*
htop - ColumnsPanel.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 "ColumnsPanel.h"
#include "Panel.h"
#include "Settings.h"
#include "ScreenManager.h"
#include "String.h"
#include "debug.h"
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
/*{
#include "Panel.h"
#include "Settings.h"
#include "ScreenManager.h"
typedef struct ColumnsPanel_ {
Panel super;
......
......@@ -2,16 +2,17 @@
#ifndef HEADER_ColumnsPanel
#define HEADER_ColumnsPanel
/*
htop - ColumnsPanel.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 "ScreenManager.h"
#include "debug.h"
#include <assert.h>
typedef struct ColumnsPanel_ {
Panel super;
......
/*
htop - DebugMemory.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 <string.h>
#include <stdlib.h>
......
......@@ -2,12 +2,12 @@
#ifndef HEADER_DebugMemory
#define HEADER_DebugMemory
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
/*
htop - DebugMemory.h
(C) 2004-2011 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#undef strdup
#undef malloc
......@@ -16,7 +16,6 @@
#undef free
typedef struct DebugMemoryItem_ DebugMemoryItem;
struct DebugMemoryItem_ {
......
/*
htop - DisplayOptionsPanel.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 "DisplayOptionsPanel.h"
#include "Panel.h"
#include "CheckItem.h"
#include "Settings.h"
#include "ScreenManager.h"
#include "debug.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
/*{
#include "Panel.h"
#include "Settings.h"
#include "ScreenManager.h"
typedef struct DisplayOptionsPanel_ {
Panel super;
......
......@@ -2,17 +2,17 @@
#ifndef HEADER_DisplayOptionsPanel
#define HEADER_DisplayOptionsPanel
/*
htop - DisplayOptionsPanel.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 "CheckItem.h"
#include "Settings.h"
#include "ScreenManager.h"
#include "debug.h"
#include <assert.h>
typedef struct DisplayOptionsPanel_ {
Panel super;
......
......@@ -5,19 +5,19 @@ Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "Object.h"
#include "FunctionBar.h"
#include "CRT.h"
#include "CRT.h"
#include "debug.h"
#include <assert.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <curses.h>
/*{
#include "Object.h"
typedef struct FunctionBar_ {
Object super;
......
......@@ -10,16 +10,6 @@ in the source distribution for its full text.
*/
#include "Object.h"
#include "CRT.h"
#include "debug.h"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <curses.h>
typedef struct FunctionBar_ {
Object super;
......
/*
htop
htop - Hashtable.c
(C) 2004-2011 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
......@@ -7,13 +7,14 @@ in the source distribution for its full text.
#include "Hashtable.h"
#include "debug.h"
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include "debug.h"
/*{
#include <stdbool.h>
typedef struct Hashtable_ Hashtable;
typedef void(*Hashtable_PairFunction)(int, void*, void*);
......
......@@ -3,18 +3,13 @@
#ifndef HEADER_Hashtable
#define HEADER_Hashtable
/*
htop
htop - Hashtable.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 <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include "debug.h"
typedef struct Hashtable_ Hashtable;
......
......@@ -6,13 +6,28 @@ in the source distribution for its full text.
*/
#include "Header.h"
#include "Meter.h"
#include "CRT.h"
#include "CPUMeter.h"
#include "MemoryMeter.h"
#include "SwapMeter.h"
#include "TasksMeter.h"
#include "LoadAverageMeter.h"
#include "UptimeMeter.h"
#include "BatteryMeter.h"
#include "ClockMeter.h"
#include "HostnameMeter.h"
#include "String.h"
#include "debug.h"
#include <assert.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
/*{
#include "ProcessList.h"
#include "Meter.h"
typedef enum HeaderSide_ {
LEFT_HEADER,
......
......@@ -9,13 +9,9 @@ Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "ProcessList.h"
#include "Meter.h"
#include "debug.h"
#include <assert.h>
#include <time.h>
typedef enum HeaderSide_ {
LEFT_HEADER,
RIGHT_HEADER
......
/*
htop
htop - HostnameMeter.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 "HostnameMeter.h"
#include "Meter.h"
#include "CRT.h"
#include "debug.h"
#include <unistd.h>
#include "debug.h"
/*{
#include "Meter.h"
}*/
int HostnameMeter_attributes[] = {
HOSTNAME
......
......@@ -3,7 +3,7 @@
#ifndef HEADER_HostnameMeter
#define HEADER_HostnameMeter
/*
htop
htop - HostnameMeter.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 <unistd.h>
#include "debug.h"
extern int HostnameMeter_attributes[];
extern MeterType HostnameMeter;
......
......@@ -6,14 +6,18 @@ in the source distribution for its full text.
*/
#include "ListItem.h"
#include "CRT.h"
#include "String.h"
#include "Object.h"
#include "RichString.h"
#include <string.h>
#include "debug.h"
#include <string.h>
#include <assert.h>
#include <stdlib.h>
/*{
#include "Object.h"
typedef struct ListItem_ {
Object super;
......
......@@ -9,13 +9,7 @@ Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "String.h"
#include "Object.h"
#include "RichString.h"
#include <string.h>
#include "debug.h"
typedef struct ListItem_ {
Object super;
......
/*
htop
htop - LoadAverageMeter.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 "LoadAverageMeter.h"
#include "Meter.h"
#include "CRT.h"
#include "debug.h"
#include <curses.h>
#include <assert.h>
#include "debug.h"
/*{
#include "Meter.h"
}*/
int LoadAverageMeter_attributes[] = {
LOAD_AVERAGE_FIFTEEN, LOAD_AVERAGE_FIVE, LOAD_AVERAGE_ONE
......
......@@ -3,7 +3,7 @@
#ifndef HEADER_LoadAverageMeter
#define HEADER_LoadAverageMeter
/*
htop
htop - LoadAverageMeter.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 <curses.h>
#include "debug.h"
extern int LoadAverageMeter_attributes[];
extern int LoadMeter_attributes[];
......
/*
htop
htop - MemoryMeter.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 "MemoryMeter.h"
#include "Meter.h"
#include "CRT.h"
#include "ProcessList.h"
#include "debug.h"
#include <stdlib.h>
#include <curses.h>
#include <string.h>
#include <math.h>
#include <sys/param.h>
#include "debug.h"
#include <assert.h>
/*{
#include "Meter.h"
}*/
int MemoryMeter_attributes[] = {
MEMORY_USED, MEMORY_BUFFERS, MEMORY_CACHE
};
......
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