Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
84281bdc
Commit
84281bdc
authored
Dec 26, 2011
by
Hisham Muhammad
Browse files
major header cleanup
parent
81e44312
Changes
80
Hide whitespace changes
Inline
Side-by-side
ColorsPanel.h
View file @
84281bdc
...
...
@@ -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
;
...
...
ColumnsPanel.c
View file @
84281bdc
/*
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;
...
...
ColumnsPanel.h
View file @
84281bdc
...
...
@@ -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
;
...
...
DebugMemory.c
View file @
84281bdc
/*
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>
...
...
DebugMemory.h
View file @
84281bdc
...
...
@@ -2,12 +2,12 @@
#ifndef HEADER_DebugMemory
#define HEADER_DebugMemory
#include <string
.h
>
#include <stdlib.h>
#include <stdio.h>
#
in
clude <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_
{
...
...
DisplayOptionsPanel.c
View file @
84281bdc
/*
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;
...
...
DisplayOptionsPanel.h
View file @
84281bdc
...
...
@@ -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
;
...
...
FunctionBar.c
View file @
84281bdc
...
...
@@ -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;
...
...
FunctionBar.h
View file @
84281bdc
...
...
@@ -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
;
...
...
Hashtable.c
View file @
84281bdc
/*
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*);
...
...
Hashtable.h
View file @
84281bdc
...
...
@@ -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
;
...
...
Header.c
View file @
84281bdc
...
...
@@ -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,
...
...
Header.h
View file @
84281bdc
...
...
@@ -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
...
...
HostnameMeter.c
View file @
84281bdc
/*
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
...
...
HostnameMeter.h
View file @
84281bdc
...
...
@@ -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
;
...
...
ListItem.c
View file @
84281bdc
...
...
@@ -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;
...
...
ListItem.h
View file @
84281bdc
...
...
@@ -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
;
...
...
LoadAverageMeter.c
View file @
84281bdc
/*
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
...
...
LoadAverageMeter.h
View file @
84281bdc
...
...
@@ -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
[];
...
...
MemoryMeter.c
View file @
84281bdc
/*
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
};
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment