Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions Action.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@ in the source distribution for its full text.
#include "config.h"

#include "Action.h"

#include <pwd.h>
#include <stdbool.h>
#include <stdlib.h>

#include "Affinity.h"
#include "AffinityPanel.h"
#include "CategoriesPanel.h"
#include "CommandScreen.h"
#include "CRT.h"
#include "EnvScreen.h"
#include "CommandScreen.h"
#include "FunctionBar.h"
#include "IncSet.h"
#include "InfoScreen.h"
#include "ListItem.h"
#include "Macros.h"
#include "MainPanel.h"
#include "OpenFilesScreen.h"
#include "Process.h"
#include "ProvideCurses.h"
#include "ScreenManager.h"
#include "SignalsPanel.h"
#include "TraceScreen.h"
#include "Platform.h"
#include "Vector.h"
#include "XUtils.h"

#include <ctype.h>
#include <math.h>
#include <pwd.h>
#include <stdlib.h>
#include <stdbool.h>
#include <sys/param.h>
#include <sys/time.h>

Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess) {
Panel* panel = st->panel;
Expand Down
5 changes: 5 additions & 0 deletions Action.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include <stdbool.h>
#include <sys/types.h>

#include "Header.h"
#include "Object.h"
#include "Panel.h"
#include "Process.h"
#include "ProcessList.h"
#include "Settings.h"
#include "UsersTable.h"
Expand Down
3 changes: 3 additions & 0 deletions Affinity.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ in the source distribution for its full text.

#include <stdlib.h>

#include "XUtils.h"

#ifdef HAVE_LIBHWLOC
#include <hwloc.h>
#include <hwloc/bitmap.h>
#ifdef __linux__
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_THREAD
#else
Expand Down
5 changes: 5 additions & 0 deletions Affinity.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include "config.h"

#include <stdbool.h>

#include "Object.h"
#include "Process.h"
#include "ProcessList.h"

Expand Down
11 changes: 10 additions & 1 deletion AffinityPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,30 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include "config.h"
#include "config.h" // IWYU pragma: keep

#include "AffinityPanel.h"

#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

#include "CRT.h"
#include "FunctionBar.h"
#include "Object.h"
#include "ProvideCurses.h"
#include "RichString.h"
#include "Settings.h"
#include "Vector.h"
#include "XUtils.h"

#ifdef HAVE_LIBHWLOC
#include <hwloc.h>
#include <hwloc/bitmap.h>
#endif


typedef struct MaskItem_ {
Object super;
char* text;
Expand Down
9 changes: 6 additions & 3 deletions AvailableColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ in the source distribution for its full text.

#include "AvailableColumnsPanel.h"

#include <assert.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

#include "ColumnsPanel.h"
#include "Header.h"
#include "FunctionBar.h"
#include "ListItem.h"
#include "Object.h"
#include "Platform.h"
#include "Process.h"
#include "ProvideCurses.h"
#include "XUtils.h"


Expand Down
13 changes: 9 additions & 4 deletions AvailableMetersPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ in the source distribution for its full text.
*/

#include "AvailableMetersPanel.h"
#include "MetersPanel.h"

#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>

#include "CPUMeter.h"
#include "FunctionBar.h"
#include "Header.h"
#include "ListItem.h"
#include "Meter.h"
#include "MetersPanel.h"
#include "Object.h"
#include "Platform.h"
#include "ProvideCurses.h"
#include "XUtils.h"

#include <assert.h>
#include <stdlib.h>


static void AvailableMetersPanel_delete(Object* object) {
Panel* super = (Panel*) object;
Expand Down
1 change: 1 addition & 0 deletions AvailableMetersPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include "Header.h"
#include "Panel.h"
#include "ProcessList.h"
#include "ScreenManager.h"
Expand Down
9 changes: 3 additions & 6 deletions BatteryMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).

#include "BatteryMeter.h"

#include <math.h>

#include "Battery.h"
#include "ProcessList.h"
#include "CRT.h"
#include "Platform.h"
#include "Object.h"
#include "XUtils.h"

#include <math.h>
#include <string.h>
#include <stdlib.h>


static const int BatteryMeter_attributes[] = {
BATTERY
Expand Down
13 changes: 8 additions & 5 deletions CPUMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ in the source distribution for its full text.

#include "CPUMeter.h"

#include <math.h>
#include <stdlib.h>
#include <string.h>

#include "CRT.h"
#include "Settings.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessList.h"
#include "RichString.h"
#include "Settings.h"
#include "XUtils.h"

#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

static const int CPUMeter_attributes[] = {
CPU_NICE,
Expand Down
18 changes: 8 additions & 10 deletions CRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,26 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include "config.h"
#include "CRT.h"
#include "config.h" // IWYU pragma: keep

#include "RichString.h"
#include "XUtils.h"
#include "CRT.h"

#include <stdio.h>
#include <errno.h>
#include <langinfo.h>
#include <locale.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <langinfo.h>
#include <unistd.h>

#include "ProvideCurses.h"
#include "XUtils.h"

#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif

#ifdef HAVE_SETUID_ENABLED
#include <sys/types.h>
#endif

#define ColorIndex(i,j) ((7-(i))*8+(j))

Expand Down
6 changes: 5 additions & 1 deletion CRT.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include "Macros.h"
#include "config.h"

#include <stdbool.h>

#include "Macros.h"
#include "ProvideCurses.h"


typedef enum TreeStr_ {
TREE_STR_HORZ,
TREE_STR_VERT,
Expand Down
20 changes: 13 additions & 7 deletions CategoriesPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ in the source distribution for its full text.

#include "CategoriesPanel.h"

#include <ctype.h>
#include <stdbool.h>
#include <stdlib.h>

#include "AvailableColumnsPanel.h"
#include "AvailableMetersPanel.h"
#include "MetersPanel.h"
#include "DisplayOptionsPanel.h"
#include "ColumnsPanel.h"
#include "ColorsPanel.h"
#include "AvailableColumnsPanel.h"

#include <assert.h>
#include <stdlib.h>
#include "ColumnsPanel.h"
#include "DisplayOptionsPanel.h"
#include "FunctionBar.h"
#include "ListItem.h"
#include "MetersPanel.h"
#include "Object.h"
#include "ProvideCurses.h"
#include "Vector.h"


static const char* const CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
Expand Down
1 change: 1 addition & 0 deletions CategoriesPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include "Header.h"
#include "Panel.h"
#include "ProcessList.h"
#include "ScreenManager.h"
Expand Down
5 changes: 3 additions & 2 deletions CheckItem.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ in the source distribution for its full text.

#include "CheckItem.h"

#include "CRT.h"

#include <assert.h>
#include <stdlib.h>

#include "CRT.h"
#include "RichString.h"


static void CheckItem_delete(Object* cast) {
CheckItem* this = (CheckItem*)cast;
Expand Down
2 changes: 2 additions & 0 deletions CheckItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include <stdbool.h>

#include "Object.h"

typedef struct CheckItem_ {
Expand Down
7 changes: 5 additions & 2 deletions ClockMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/

#include "ClockMeter.h"
#include "config.h" // IWYU pragma: keep

#include "CRT.h"
#include "ClockMeter.h"

#include <time.h>

#include "CRT.h"
#include "Object.h"


static const int ClockMeter_attributes[] = {
CLOCK
Expand Down
14 changes: 10 additions & 4 deletions ColorsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ in the source distribution for its full text.

#include "ColorsPanel.h"

#include "CRT.h"
#include <stdbool.h>
#include <stdlib.h>

#include "CheckItem.h"
#include "CRT.h"
#include "FunctionBar.h"
#include "Header.h"
#include "Object.h"
#include "ProvideCurses.h"
#include "RichString.h"
#include "Vector.h"
#include "XUtils.h"

#include <assert.h>
#include <stdlib.h>
#include <string.h>

// TO ADD A NEW SCHEME:
// * Increment the size of bool check in ColorsPanel.h
Expand Down
17 changes: 10 additions & 7 deletions ColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ in the source distribution for its full text.
*/

#include "ColumnsPanel.h"
#include "Platform.h"

#include "XUtils.h"
#include "ListItem.h"
#include "CRT.h"

#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdlib.h>

#include "CRT.h"
#include "FunctionBar.h"
#include "ListItem.h"
#include "Object.h"
#include "Platform.h"
#include "Process.h"
#include "ProvideCurses.h"
#include "XUtils.h"


static const char* const ColumnsFunctions[] = {" ", " ", " ", " ", " ", " ", "MoveUp", "MoveDn", "Remove", "Done ", NULL};
Expand Down
Loading