diff options
63 files changed, 6 insertions, 246 deletions
@@ -7,7 +7,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - #include "IncSet.h" #include "Settings.h" #include "Header.h" @@ -36,7 +35,6 @@ typedef struct State_ { Header* header; } State; - Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess); // ---------------------------------------- @@ -49,7 +47,6 @@ Htop_Reaction Action_setSortKey(Settings* settings, ProcessField sortKey); Htop_Reaction Action_follow(State* st); - void Action_setBindings(Htop_Action* keys); #endif @@ -14,7 +14,6 @@ in the source distribution for its full text. #else #define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS #endif -#elif HAVE_LINUX_AFFINITY #endif #include "Process.h" @@ -27,7 +26,6 @@ typedef struct Affinity_ { int* cpus; } Affinity; - Affinity* Affinity_new(ProcessList* pl); void Affinity_delete(Affinity* this); diff --git a/AffinityPanel.h b/AffinityPanel.h index f6ed350d..61e4287a 100644 --- a/AffinityPanel.h +++ b/AffinityPanel.h @@ -7,28 +7,10 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#ifdef HAVE_LIBHWLOC -#endif - #include "Panel.h" #include "Affinity.h" #include "ProcessList.h" - - -#ifdef HAVE_LIBHWLOC - -#endif - - -#ifdef HAVE_LIBHWLOC - -#endif - -#ifdef HAVE_LIBHWLOC - -#endif - extern PanelClass AffinityPanel_class; Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width); diff --git a/AvailableColumnsPanel.h b/AvailableColumnsPanel.h index ad70fbbb..62928058 100644 --- a/AvailableColumnsPanel.h +++ b/AvailableColumnsPanel.h @@ -14,7 +14,6 @@ typedef struct AvailableColumnsPanel_ { Panel* columns; } AvailableColumnsPanel; - extern PanelClass AvailableColumnsPanel_class; AvailableColumnsPanel* AvailableColumnsPanel_new(Panel* columns); diff --git a/AvailableMetersPanel.h b/AvailableMetersPanel.h index 93db0dac..ecebb28d 100644 --- a/AvailableMetersPanel.h +++ b/AvailableMetersPanel.h @@ -22,7 +22,6 @@ typedef struct AvailableMetersPanel_ { Panel* rightPanel; } AvailableMetersPanel; - extern PanelClass AvailableMetersPanel_class; AvailableMetersPanel* AvailableMetersPanel_new(Settings* settings, Header* header, Panel* leftMeters, Panel* rightMeters, ScreenManager* scr, ProcessList* pl); @@ -22,7 +22,6 @@ typedef enum { CPU_METER_ITEMCOUNT = 9, // number of entries in this enum } CPUMeterValues; - extern int CPUMeter_attributes[]; #ifndef MIN @@ -43,8 +43,6 @@ in the source distribution for its full text. #define KEY_WHEELDOWN KEY_F(21) #define KEY_RECLICK KEY_F(22) -//#link curses - const char *CRT_treeStrAscii[TREE_STR_COUNT] = { "-", // TREE_STR_HORZ "|", // TREE_STR_VERT @@ -30,8 +30,6 @@ in the source distribution for its full text. #define KEY_WHEELDOWN KEY_F(21) #define KEY_RECLICK KEY_F(22) -//#link curses - #include <stdbool.h> typedef enum TreeStr_ { diff --git a/CategoriesPanel.h b/CategoriesPanel.h index e6c7026d..fefc3e93 100644 --- a/CategoriesPanel.h +++ b/CategoriesPanel.h @@ -21,7 +21,6 @@ typedef struct CategoriesPanel_ { ProcessList* pl; } CategoriesPanel; - void CategoriesPanel_makeMetersPage(CategoriesPanel* this); extern PanelClass CategoriesPanel_class; diff --git a/CheckItem.h b/CheckItem.h index 654c21f4..11ac35f5 100644 --- a/CheckItem.h +++ b/CheckItem.h @@ -16,7 +16,6 @@ typedef struct CheckItem_ { bool value; } CheckItem; - extern ObjectClass CheckItem_class; CheckItem* CheckItem_newByRef(char* text, bool* ref); diff --git a/ColorsPanel.h b/ColorsPanel.h index 96a82a42..9977dc0b 100644 --- a/ColorsPanel.h +++ b/ColorsPanel.h @@ -24,7 +24,6 @@ typedef struct ColorsPanel_ { ScreenManager* scr; } ColorsPanel; - extern PanelClass ColorsPanel_class; ColorsPanel* ColorsPanel_new(Settings* settings, ScreenManager* scr); diff --git a/ColumnsPanel.h b/ColumnsPanel.h index 89f500ab..be139a6e 100644 --- a/ColumnsPanel.h +++ b/ColumnsPanel.h @@ -17,7 +17,6 @@ typedef struct ColumnsPanel_ { bool moving; } ColumnsPanel; - extern PanelClass ColumnsPanel_class; ColumnsPanel* ColumnsPanel_new(Settings* settings); diff --git a/DisplayOptionsPanel.h b/DisplayOptionsPanel.h index 69b8a3d5..499b2fc1 100644 --- a/DisplayOptionsPanel.h +++ b/DisplayOptionsPanel.h @@ -18,7 +18,6 @@ typedef struct DisplayOptionsPanel_ { ScreenManager* scr; } DisplayOptionsPanel; - extern PanelClass DisplayOptionsPanel_class; DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager* scr); diff --git a/FunctionBar.h b/FunctionBar.h index 8971d1a5..486990fc 100644 --- a/FunctionBar.h +++ b/FunctionBar.h @@ -7,7 +7,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - #include <stdbool.h> typedef struct FunctionBar_ { @@ -18,8 +17,6 @@ typedef struct FunctionBar_ { bool staticData; } FunctionBar; - - FunctionBar* FunctionBar_newEnterEsc(const char* enter, const char* esc); FunctionBar* FunctionBar_new(const char* const* functions, const char* const* keys, const int* events); @@ -20,14 +20,11 @@ typedef struct Header_ { int height; } Header; - #ifndef MAX #define MAX(a,b) ((a)>(b)?(a):(b)) #endif -#ifndef Header_forEachColumn #define Header_forEachColumn(this_, i_) for (int (i_)=0; (i_) < (this_)->nrColumns; ++(i_)) -#endif Header* Header_new(struct ProcessList_* pl, Settings* settings, int nrColumns); @@ -7,7 +7,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - #include "FunctionBar.h" #include "Panel.h" #include <stdbool.h> @@ -38,7 +37,6 @@ typedef struct IncSet_ { typedef const char* (*IncMode_GetPanelValue)(Panel*, int); - void IncSet_reset(IncSet* this, IncType type); IncSet* IncSet_new(FunctionBar* bar); @@ -16,7 +16,6 @@ typedef struct ListItem_ { bool moving; } ListItem; - extern ObjectClass ListItem_class; ListItem* ListItem_new(const char* value, int key); diff --git a/MainPanel.h b/MainPanel.h index 321f130c..582dd2ec 100644 --- a/MainPanel.h +++ b/MainPanel.h @@ -24,7 +24,6 @@ typedef bool(*MainPanel_ForeachProcessFn)(Process*, Arg); #define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar) - void MainPanel_updateTreeFunctions(MainPanel* this, bool mode); void MainPanel_pidSearch(MainPanel* this, int ch); diff --git a/Makefile.am b/Makefile.am index 5bf172b0..fbbf7bef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,7 +29,7 @@ InfoScreen.c XAlloc.c myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \ CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \ CPUMeter.h CRT.h MainPanel.h DisplayOptionsPanel.h FunctionBar.h \ -Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \ +Hashtable.h Header.h ListItem.h LoadAverageMeter.h MemoryMeter.h \ BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \ ScreenManager.h Settings.h SignalsPanel.h StringUtils.h SwapMeter.h \ TasksMeter.h UptimeMeter.h TraceScreen.h UsersTable.h Vector.h Process.h \ @@ -94,7 +94,6 @@ typedef struct GraphData_ { double values[METER_BUFFER_LEN]; } GraphData; - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif @@ -126,7 +125,6 @@ ListItem* Meter_toListItem(Meter* this, bool moving); /* ---------- GraphMeterMode ---------- */ #ifdef HAVE_LIBNCURSESW - #define PIXPERROW_UTF8 4 #endif @@ -134,10 +132,6 @@ ListItem* Meter_toListItem(Meter* this, bool moving); /* ---------- LEDMeterMode ---------- */ -#ifdef HAVE_LIBNCURSESW - -#endif - extern MeterMode* Meter_modes[]; /* Blank meter */ @@ -45,7 +45,6 @@ typedef union { void* v; } Arg; - extern ObjectClass Object_class; #ifdef DEBUG diff --git a/OpenFilesScreen.h b/OpenFilesScreen.h index 9fc1216b..2c83cf1d 100644 --- a/OpenFilesScreen.h +++ b/OpenFilesScreen.h @@ -29,7 +29,6 @@ typedef struct OpenFilesScreen_ { pid_t pid; } OpenFilesScreen; - extern InfoScreenClass OpenFilesScreen_class; OpenFilesScreen* OpenFilesScreen_new(Process* process); @@ -19,9 +19,6 @@ in the source distribution for its full text. #include <string.h> #include <assert.h> -//#link curses - - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif @@ -7,8 +7,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -//#link curses - #include "Object.h" #include "Vector.h" #include "FunctionBar.h" @@ -61,7 +59,6 @@ struct Panel_ { #define Panel_setDefaultBar(this_) do{ (this_)->currentBar = (this_)->defaultBar; }while(0) - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif diff --git a/ScreenManager.h b/ScreenManager.h index 5907ce55..69d983a0 100644 --- a/ScreenManager.h +++ b/ScreenManager.h @@ -32,7 +32,6 @@ typedef struct ScreenManager_ { bool allowFocusChange; } ScreenManager; - ScreenManager* ScreenManager_new(int x1, int y1, int x2, int y2, Orientation orientation, const Header* header, const Settings* settings, bool owner); void ScreenManager_delete(ScreenManager* this); @@ -58,10 +58,7 @@ typedef struct Settings_ { bool changed; } Settings; -#ifndef Settings_cpuId #define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1) -#endif - void Settings_delete(Settings* this); diff --git a/SignalsPanel.h b/SignalsPanel.h index 94077ed0..3d910cee 100644 --- a/SignalsPanel.h +++ b/SignalsPanel.h @@ -7,13 +7,11 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - typedef struct SignalItem_ { const char* name; int number; } SignalItem; - Panel* SignalsPanel_new(); #endif @@ -24,7 +24,6 @@ typedef struct Vector_ { bool owner; } Vector; - Vector* Vector_new(ObjectClass* type, bool owner, int size); void Vector_delete(Vector* this); @@ -37,11 +36,6 @@ int Vector_count(Vector* this); void Vector_prune(Vector* this); -// If I were to use only one sorting algorithm for both cases, it would probably be this one: -/* - -*/ - void Vector_quickSort(Vector* this); void Vector_insertionSort(Vector* this); diff --git a/darwin/Battery.h b/darwin/Battery.h index 24d8f5c2..21a1579a 100644 --- a/darwin/Battery.h +++ b/darwin/Battery.h @@ -3,5 +3,4 @@ void Battery_getData(double* level, ACPresence* isOnAC); - #endif diff --git a/darwin/DarwinCRT.h b/darwin/DarwinCRT.h index d79e34c8..5e08422b 100644 --- a/darwin/DarwinCRT.h +++ b/darwin/DarwinCRT.h @@ -9,5 +9,4 @@ in the source distribution for its full text. void CRT_handleSIGSEGV(int sgn); - #endif diff --git a/darwin/DarwinProcess.h b/darwin/DarwinProcess.h index f885ccc5..cf76fa8d 100644 --- a/darwin/DarwinProcess.h +++ b/darwin/DarwinProcess.h @@ -20,7 +20,6 @@ typedef struct DarwinProcess_ { bool taskAccess; } DarwinProcess; - extern ProcessClass DarwinProcess_class; DarwinProcess* DarwinProcess_new(Settings* settings); diff --git a/darwin/DarwinProcessList.h b/darwin/DarwinProcessList.h index d6c33276..7d6f5343 100644 --- a/darwin/DarwinProcessList.h +++ b/darwin/DarwinProcessList.h @@ -37,7 +37,6 @@ typedef struct DarwinProcessList_ { ZfsArcStats zfs; } DarwinProcessList; - void ProcessList_getHostInfo(host_basic_info_data_t *p); void ProcessList_freeCPULoadInfo(processor_cpu_load_info_t *p); diff --git a/dragonflybsd/DragonFlyBSDCRT.h b/dragonflybsd/DragonFlyBSDCRT.h index 2b98effb..2bf85f71 100644 --- a/dragonflybsd/DragonFlyBSDCRT.h +++ b/dragonflybsd/DragonFlyBSDCRT.h @@ -8,10 +8,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#ifdef HAVE_EXECINFO_H -#endif - void CRT_handleSIGSEGV(int sgn); - #endif diff --git a/dragonflybsd/DragonFlyBSDProcess.h b/dragonflybsd/DragonFlyBSDProcess.h index a0381c67..d5e5a6ee 100644 --- a/dragonflybsd/DragonFlyBSDProcess.h +++ b/dragonflybsd/DragonFlyBSDProcess.h @@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - typedef enum DragonFlyBSDProcessFields { // Add platform-specific fields here, with ids >= 100 JID = 100, @@ -16,7 +15,6 @@ typedef enum DragonFlyBSDProcessFields { LAST_PROCESSFIELD = 102, } DragonFlyBSDProcessField; - typedef struct DragonFlyBSDProcess_ { Process super; int kernel; @@ -24,16 +22,10 @@ typedef struct DragonFlyBSDProcess_ { char* jname; } DragonFlyBSDProcess; - -#ifndef Process_isKernelThread #define Process_isKernelThread(_process) (_process->kernel == 1) -#endif -#ifndef Process_isUserlandThread //#define Process_isUserlandThread(_process) (_process->pid != _process->tgid) #define Process_isUserlandThread(_process) (_process->nlwp > 1) -#endif - extern ProcessClass DragonFlyBSDProcess_class; diff --git a/dragonflybsd/DragonFlyBSDProcessList.h b/dragonflybsd/DragonFlyBSDProcessList.h index f677c3e4..403aa096 100644 --- a/dragonflybsd/DragonFlyBSDProcessList.h +++ b/dragonflybsd/DragonFlyBSDProcessList.h @@ -8,7 +8,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - #include <kvm.h> #include <sys/param.h> #include <osreldate.h> @@ -21,17 +20,15 @@ in the source distribution for its full text. #include "DragonFlyBSDProcess.h" #define JAIL_ERRMSGLEN 1024 -char jail_errmsg[JAIL_ERRMSGLEN]; +extern char jail_errmsg[JAIL_ERRMSGLEN]; typedef struct CPUData_ { - double userPercent; double nicePercent; double systemPercent; double irqPercent; double idlePercent; double systemAllPercent; - } CPUData; typedef struct DragonFlyBSDProcessList_ { @@ -54,10 +51,8 @@ typedef struct DragonFlyBSDProcessList_ { Hashtable *jails; } DragonFlyBSDProcessList; - #define _UNUSED_ __attribute__((unused)) - ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId); void ProcessList_delete(ProcessList* this); diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h index aa00d656..c6792a28 100644 --- a/dragonflybsd/Platform.h +++ b/dragonflybsd/Platform.h @@ -14,7 +14,6 @@ in the source distribution for its full text. extern ProcessFieldData Process_fields[]; - #ifndef CLAMP #define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x))) #endif diff --git a/freebsd/FreeBSDCRT.h b/freebsd/FreeBSDCRT.h index d0c21659..eb88fcc1 100644 --- a/freebsd/FreeBSDCRT.h +++ b/freebsd/FreeBSDCRT.h @@ -9,5 +9,4 @@ in the source distribution for its full text. void CRT_handleSIGSEGV(int sgn); - #endif diff --git a/freebsd/FreeBSDProcess.h b/freebsd/FreeBSDProcess.h index b269b779..897c5329 100644 --- a/freebsd/FreeBSDProcess.h +++ b/freebsd/FreeBSDProcess.h @@ -7,15 +7,13 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ - -typedef enum FreeBSDProcessFields { +typedef enum FreeBSDProcessFields_ { // Add platform-specific fields here, with ids >= 100 JID = 100, JAIL = 101, |