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
Affinity.c
View file @
84281bdc
/*
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>
/*{
...
...
AffinityPanel.c
View file @
84281bdc
/*
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
);
...
...
AffinityPanel.h
View file @
84281bdc
...
...
@@ -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
);
...
...
AvailableColumnsPanel.c
View file @
84281bdc
/*
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;
...
...
AvailableColumnsPanel.h
View file @
84281bdc
...
...
@@ -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
;
...
...
AvailableMetersPanel.c
View file @
84281bdc
/*
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;
...
...
AvailableMetersPanel.h
View file @
84281bdc
...
...
@@ -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
;
...
...
BatteryMeter.c
View file @
84281bdc
/*
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
"M
eter
"
written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
This
m
eter 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,
...
...
BatteryMeter.h
View file @
84281bdc
...
...
@@ -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
"M
eter
"
written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
This
m
eter 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
,
...
...
CPUMeter.c
View file @
84281bdc
...
...
@@ -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
...
...
CPUMeter.h
View file @
84281bdc
...
...
@@ -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
...
...
CRT.c
View file @
84281bdc
...
...
@@ -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
;
...
...
CRT.h
View file @
84281bdc
...
...
@@ -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
,
...
...
CategoriesPanel.c
View file @
84281bdc
/*
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;
...
...
CategoriesPanel.h
View file @
84281bdc
...
...
@@ -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
;
...
...
CheckItem.c
View file @
84281bdc
/*
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;
...
...
CheckItem.h
View file @
84281bdc
...
...
@@ -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
;
...
...
ClockMeter.c
View file @
84281bdc
/*
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
...
...
ClockMeter.h
View file @
84281bdc
...
...
@@ -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
;
...
...
ColorsPanel.c
View file @
84281bdc
/*
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;
...
...
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