From f6e0b7d0c07e4043a96b3ac976eaf082454f4501 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 6 Jun 2006 20:28:42 +0000 Subject: Regenerated all headers. --- AvailableColumnsPanel.h | 5 +++-- AvailableMetersPanel.h | 4 ++-- CPUMeter.h | 5 ++++- CRT.h | 32 ++++++++++++++++++++++++-------- CategoriesPanel.h | 7 ++++--- CheckItem.h | 4 ++-- ClockMeter.h | 3 +++ ColorsPanel.h | 9 ++++++++- ColumnsPanel.h | 3 +-- DebugMemory.h | 23 ++++++++++++++++------- DisplayOptionsPanel.h | 2 +- FunctionBar.h | 11 ++++++----- Hashtable.h | 2 +- Header.h | 2 +- ListItem.h | 13 ++++++++----- LoadAverageMeter.h | 5 ++++- MemoryMeter.h | 2 ++ Meter.h | 34 ++++++++++------------------------ MetersPanel.h | 2 +- Object.h | 3 +-- Panel.h | 19 ++++++++++++------- Process.h | 8 +++----- ProcessList.h | 8 +------- RichString.h | 6 ++++-- ScreenManager.h | 4 ++-- Settings.h | 4 +--- SignalItem.h | 10 +++++----- SignalsPanel.h | 2 +- String.h | 2 +- SwapMeter.h | 2 ++ TasksMeter.h | 2 ++ TraceScreen.h | 15 +++++++++++---- UptimeMeter.h | 4 +++- UsersTable.h | 10 +++------- Vector.h | 2 +- debug.h | 12 ++++++------ htop.h | 23 +++++++++++------------ 37 files changed, 171 insertions(+), 133 deletions(-) diff --git a/AvailableColumnsPanel.h b/AvailableColumnsPanel.h index 4c03fa1d..d7bed265 100644 --- a/AvailableColumnsPanel.h +++ b/AvailableColumnsPanel.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_AvailableColumnsPanel #define HEADER_AvailableColumnsPanel @@ -6,6 +6,7 @@ #include "Settings.h" #include "Header.h" #include "ScreenManager.h" +#include "ColumnsPanel.h" #include "Panel.h" @@ -15,10 +16,10 @@ typedef struct AvailableColumnsPanel_ { Panel super; + Panel* columns; Settings* settings; ScreenManager* scr; - Panel* columns; } AvailableColumnsPanel; diff --git a/AvailableMetersPanel.h b/AvailableMetersPanel.h index fa3e1793..89d95179 100644 --- a/AvailableMetersPanel.h +++ b/AvailableMetersPanel.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_AvailableMetersPanel #define HEADER_AvailableMetersPanel @@ -6,6 +6,7 @@ #include "Settings.h" #include "Header.h" #include "ScreenManager.h" +#include "CPUMeter.h" #include "Panel.h" @@ -27,7 +28,6 @@ AvailableMetersPanel* AvailableMetersPanel_new(Settings* settings, Panel* leftMe void AvailableMetersPanel_delete(Object* object); - HandlerResult AvailableMetersPanel_EventHandler(Panel* super, int ch); #endif diff --git a/CPUMeter.h b/CPUMeter.h index f9f389a3..bd46a394 100644 --- a/CPUMeter.h +++ b/CPUMeter.h @@ -3,7 +3,7 @@ #ifndef HEADER_CPUMeter #define HEADER_CPUMeter /* -htop - CPUMeter.c +htop - CPUMeter.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -21,8 +21,11 @@ in the source distribution for its full text. #include "debug.h" #include +extern int CPUMeter_attributes[]; +extern MeterType CPUMeter; +extern MeterType AllCPUsMeter; #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) diff --git a/CRT.h b/CRT.h index 32a94812..155dc2ee 100644 --- a/CRT.h +++ b/CRT.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_CRT #define HEADER_CRT @@ -19,6 +19,8 @@ in the source distribution for its full text. #include "debug.h" +#define ColorPair(i,j) COLOR_PAIR((7-i)*8+j) + #define COLORSCHEME_DEFAULT 0 #define COLORSCHEME_MONOCHROME 1 #define COLORSCHEME_BLACKONWHITE 2 @@ -26,6 +28,15 @@ in the source distribution for its full text. #define COLORSCHEME_MIDNIGHT 4 #define COLORSCHEME_BLACKNIGHT 5 +#define Black COLOR_BLACK +#define Red COLOR_RED +#define Green COLOR_GREEN +#define Yellow COLOR_YELLOW +#define Blue COLOR_BLUE +#define Magenta COLOR_MAGENTA +#define Cyan COLOR_CYAN +#define White COLOR_WHITE + //#link curses bool CRT_hasColors; @@ -87,26 +98,31 @@ typedef enum ColorElements_ { LAST_COLORELEMENT } ColorElements; -extern int CRT_colors[LAST_COLORELEMENT]; -extern int CRT_colorScheme; +// TODO: centralize these in Settings. extern int CRT_delay; -void CRT_init(); +extern int CRT_colorScheme; + +extern int CRT_colors[LAST_COLORELEMENT]; + +// TODO: pass an instance of Settings instead. + +void CRT_init(int delay, int colorScheme); void CRT_done(); int CRT_readKey(); +void CRT_disableDelay(); + +void CRT_enableDelay(); + void CRT_handleSIGSEGV(int signal); void CRT_handleSIGTERM(int signal); void CRT_setColors(int colorScheme); -void CRT_enableDelay(); - -void CRT_disableDelay(); - #endif diff --git a/CategoriesPanel.h b/CategoriesPanel.h index 5a4fbf18..e0162be9 100644 --- a/CategoriesPanel.h +++ b/CategoriesPanel.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_CategoriesPanel #define HEADER_CategoriesPanel @@ -6,6 +6,9 @@ #include "AvailableMetersPanel.h" #include "MetersPanel.h" #include "DisplayOptionsPanel.h" +#include "ColumnsPanel.h" +#include "ColorsPanel.h" +#include "AvailableColumnsPanel.h" #include "Panel.h" @@ -21,8 +24,6 @@ typedef struct CategoriesPanel_ { } CategoriesPanel; - - CategoriesPanel* CategoriesPanel_new(Settings* settings, ScreenManager* scr); void CategoriesPanel_delete(Object* object); diff --git a/CheckItem.h b/CheckItem.h index 6cba3e22..eaf43ba6 100644 --- a/CheckItem.h +++ b/CheckItem.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_CheckItem #define HEADER_CheckItem @@ -21,8 +21,8 @@ typedef struct CheckItem_ { bool* value; } CheckItem; -extern char* CHECKITEM_CLASS; +extern char* CHECKITEM_CLASS; CheckItem* CheckItem_new(char* text, bool* value); diff --git a/ClockMeter.h b/ClockMeter.h index 7ca276eb..7744e238 100644 --- a/ClockMeter.h +++ b/ClockMeter.h @@ -15,6 +15,9 @@ in the source distribution for its full text. #include "debug.h" +extern int ClockMeter_attributes[]; + +extern MeterType ClockMeter; void ClockMeter_setValues(Meter* this, char* buffer, int size); diff --git a/ColorsPanel.h b/ColorsPanel.h index e8adcb5b..2cf29477 100644 --- a/ColorsPanel.h +++ b/ColorsPanel.h @@ -1,8 +1,9 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_ColorsPanel #define HEADER_ColorsPanel +#include "CRT.h" #include "Panel.h" #include "CheckItem.h" @@ -12,6 +13,12 @@ #include "debug.h" #include +// TO ADD A NEW SCHEME: +// * Increment the size of bool check in ColorsPanel.h +// * Add the entry in the ColorSchemes array below in the file +// * Add a define in CRT.h that matches the order of the array +// * Add the colors in CRT_setColors + typedef struct ColorsPanel_ { Panel super; diff --git a/ColumnsPanel.h b/ColumnsPanel.h index 92d448d4..8eb8cd6a 100644 --- a/ColumnsPanel.h +++ b/ColumnsPanel.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_ColumnsPanel #define HEADER_ColumnsPanel @@ -16,7 +16,6 @@ typedef struct ColumnsPanel_ { Panel super; Settings* settings; - Vector* columns; ScreenManager* scr; } ColumnsPanel; diff --git a/DebugMemory.h b/DebugMemory.h index 8261fee7..16f4248c 100644 --- a/DebugMemory.h +++ b/DebugMemory.h @@ -1,27 +1,27 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_DebugMemory #define HEADER_DebugMemory #define _GNU_SOURCE - +#include #include #include -#include #include - #include - #undef strdup #undef malloc #undef realloc #undef calloc #undef free + + typedef struct DebugMemoryItem_ DebugMemoryItem; struct DebugMemoryItem_ { + int magic; void* data; char* file; int line; @@ -33,17 +33,20 @@ typedef struct DebugMemory_ { int allocations; int deallocations; int size; + bool totals; FILE* file; } DebugMemory; +#if defined(DEBUG) + void DebugMemory_new(); -void* DebugMemory_malloc(int size, char* file, int line); +void* DebugMemory_malloc(int size, char* file, int line, char* str); void* DebugMemory_calloc(int a, int b, char* file, int line); -void* DebugMemory_realloc(void* ptr, int size, char* file, int line); +void* DebugMemory_realloc(void* ptr, int size, char* file, int line, char* str); void* DebugMemory_strdup(char* str, char* file, int line); @@ -59,4 +62,10 @@ void DebugMemory_registerDeallocation(void* data, char* file, int line); void DebugMemory_report(); +#elif defined(DEBUGLITE) + +//#include "efence.h" + +#endif + #endif diff --git a/DisplayOptionsPanel.h b/DisplayOptionsPanel.h index 0888f049..87faaad8 100644 --- a/DisplayOptionsPanel.h +++ b/DisplayOptionsPanel.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_DisplayOptionsPanel #define HEADER_DisplayOptionsPanel diff --git a/FunctionBar.h b/FunctionBar.h index 05c8260d..2998cf7a 100644 --- a/FunctionBar.h +++ b/FunctionBar.h @@ -1,9 +1,9 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_FunctionBar #define HEADER_FunctionBar /* -htop +htop - FunctionBar.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -30,16 +30,17 @@ typedef struct FunctionBar_ { bool staticData; } FunctionBar; + extern char* FUNCTIONBAR_CLASS; FunctionBar* FunctionBar_new(int size, char** functions, char** keys, int* events); -void FunctionBar_delete(Object* this); - -void FunctionBar_draw(FunctionBar* this, char* buffer); +void FunctionBar_delete(Object* cast); void FunctionBar_setLabel(FunctionBar* this, int event, char* text); +void FunctionBar_draw(FunctionBar* this, char* buffer); + void FunctionBar_drawAttr(FunctionBar* this, char* buffer, int attr); int FunctionBar_synthesizeEvent(FunctionBar* this, int pos); diff --git a/Hashtable.h b/Hashtable.h index 51d8704e..99e06d1b 100644 --- a/Hashtable.h +++ b/Hashtable.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_Hashtable #define HEADER_Hashtable diff --git a/Header.h b/Header.h index 46a60750..c87d4d0a 100644 --- a/Header.h +++ b/Header.h @@ -3,7 +3,7 @@ #ifndef HEADER_Header #define HEADER_Header /* -htop - Header.c +htop - Header.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. diff --git a/ListItem.h b/ListItem.h index 17b2fcfd..84d01027 100644 --- a/ListItem.h +++ b/ListItem.h @@ -1,9 +1,9 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_ListItem #define HEADER_ListItem /* -htop +htop - ListItem.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -16,24 +16,27 @@ in the source distribution for its full text. #include "debug.h" + typedef struct ListItem_ { Object super; char* value; int key; } ListItem; + extern char* LISTITEM_CLASS; ListItem* ListItem_new(char* value, int key); +void ListItem_append(ListItem* this, char* text); + void ListItem_delete(Object* cast); void ListItem_display(Object* cast, RichString* out); -void ListItem_append(ListItem* this, char* text); - const char* ListItem_getRef(ListItem* this); -int ListItem_compare(const Object*, const Object*); +int ListItem_compare(const Object* cast1, const Object* cast2); + #endif diff --git a/LoadAverageMeter.h b/LoadAverageMeter.h index 27e33a1a..31b0d59e 100644 --- a/LoadAverageMeter.h +++ b/LoadAverageMeter.h @@ -15,10 +15,13 @@ in the source distribution for its full text. #include "debug.h" +extern int LoadAverageMeter_attributes[]; +extern MeterType LoadAverageMeter; +extern int LoadMeter_attributes[]; - +extern MeterType LoadMeter; void LoadAverageMeter_setValues(Meter* this, char* buffer, int size); diff --git a/MemoryMeter.h b/MemoryMeter.h index e2f42e0d..4a48526d 100644 --- a/MemoryMeter.h +++ b/MemoryMeter.h @@ -22,7 +22,9 @@ in the source distribution for its full text. #include "debug.h" #include +extern int MemoryMeter_attributes[]; +extern MeterType MemoryMeter; void MemoryMeter_setValues(Meter* this, char* buffer, int size); diff --git a/Meter.h b/Meter.h index 73fa6578..c8cb703d 100644 --- a/Meter.h +++ b/Meter.h @@ -3,7 +3,7 @@ #ifndef HEADER_Meter #define HEADER_Meter /* -htop - Meter.c +htop - Meter.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -78,18 +78,6 @@ struct Meter_ { double total; }; -extern char* METER_CLASS; - -extern MeterType CPUMeter; -extern MeterType ClockMeter; -extern MeterType LoadAverageMeter; -extern MeterType LoadMeter; -extern MeterType MemoryMeter; -extern MeterType SwapMeter; -extern MeterType TasksMeter; -extern MeterType UptimeMeter; -extern MeterType AllCPUsMeter; - typedef enum { CUSTOM_METERMODE = 0, BAR_METERMODE, @@ -101,9 +89,13 @@ typedef enum { LAST_METERMODE } MeterModeId; -extern MeterType* Meter_types[]; -extern MeterMode* Meter_modes[]; +#include "CPUMeter.h" +#include "MemoryMeter.h" +#include "SwapMeter.h" +#include "TasksMeter.h" +#include "LoadAverageMeter.h" +#include "UptimeMeter.h" #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) @@ -112,15 +104,15 @@ extern MeterMode* Meter_modes[]; #define MAX(a,b) ((a)>(b)?(a):(b)) #endif +extern char* METER_CLASS; - - +extern MeterType* Meter_types[]; #ifdef USE_FUNKY_MODES #endif - +extern MeterMode* Meter_modes[]; Meter* Meter_new(ProcessList* pl, int param, MeterType* type); @@ -128,7 +120,6 @@ void Meter_delete(Object* cast); void Meter_setCaption(Meter* this, char* caption); - void Meter_setMode(Meter* this, int modeIndex); ListItem* Meter_toListItem(Meter* this); @@ -139,7 +130,6 @@ void TextMeterMode_draw(Meter* this, int x, int y, int w); /* ---------- BarMeterMode ---------- */ - void BarMeterMode_draw(Meter* this, int x, int y, int w); #ifdef USE_FUNKY_MODES @@ -148,14 +138,10 @@ void BarMeterMode_draw(Meter* this, int x, int y, int w); #define DrawDot(a,y,c) do { attrset(a); mvaddch(y, x+k, c); } while(0) - - void GraphMeterMode_draw(Meter* this, int x, int y, int w); /* ---------- LEDMeterMode ---------- */ - - void LEDMeterMode_draw(Meter* this, int x, int y, int w); #endif diff --git a/MetersPanel.h b/MetersPanel.h index cac94104..8f14e259 100644 --- a/MetersPanel.h +++ b/MetersPanel.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_MetersPanel #define HEADER_MetersPanel diff --git a/Object.h b/Object.h index 78886c29..b4c3dffb 100644 --- a/Object.h +++ b/Object.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_Object #define HEADER_Object @@ -30,7 +30,6 @@ struct Object_ { Object_Delete delete; }; - void Object_new(); bool Object_instanceOf(Object* this, char* class); diff --git a/Panel.h b/Panel.h index 2999dc33..4b96fe48 100644 --- a/Panel.h +++ b/Panel.h @@ -1,9 +1,9 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_Panel #define HEADER_Panel /* -htop +htop - Panel.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -15,7 +15,6 @@ in the source distribution for its full text. #include "RichString.h" #include -#include #include #include "debug.h" @@ -48,9 +47,15 @@ struct Panel_ { Panel_EventHandler eventHandler; }; -extern char* PANEL_CLASS; +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif +extern char* PANEL_CLASS; Panel* Panel_new(int x, int y, int w, int h, char* type, bool owner); @@ -60,11 +65,11 @@ void Panel_init(Panel* this, int x, int y, int w, int h, char* type, bool owner) void Panel_done(Panel* this); -void Panel_setEventHandler(Panel* this, Panel_EventHandler eh); +inline void Panel_setRichHeader(Panel* this, RichString header); -void Panel_setRichHeader(Panel* this, RichString header); +inline void Panel_setHeader(Panel* this, char* header); -void Panel_setHeader(Panel* this, char* header); +void Panel_setEventHandler(Panel* this, Panel_EventHandler eh); void Panel_move(Panel* this, int x, int y); diff --git a/Process.h b/Process.h index f4f1b205..51b11d9a 100644 --- a/Process.h +++ b/Process.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_Process #define HEADER_Process @@ -106,12 +106,10 @@ typedef struct Process_ { char user[PROCESS_USER_LEN + 1]; } Process; -extern char* PROCESS_CLASS; - -extern char* Process_fieldNames[]; - +extern char* PROCESS_CLASS; +extern char *Process_fieldNames[]; Process* Process_new(struct ProcessList_ *pl); diff --git a/ProcessList.h b/ProcessList.h index aa2a7698..15fc2824 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -3,7 +3,7 @@ #ifndef HEADER_ProcessList #define HEADER_ProcessList /* -htop - ProcessList.c +htop - ProcessList.h (C) 2004,2005 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -103,15 +103,11 @@ typedef struct ProcessList_ { } ProcessList; - #ifdef DEBUG - #define ProcessList_read(this, buffer, format, ...) ProcessList_xread(this, (vxscanf) vsscanf, buffer, format, ## __VA_ARGS__ ) #define ProcessList_fread(this, file, format, ...) ProcessList_xread(this, (vxscanf) vfscanf, file, format, ## __VA_ARGS__ ) - - #else #ifndef ProcessList_read @@ -141,10 +137,8 @@ Process* ProcessList_get(ProcessList* this, int index); int ProcessList_size(ProcessList* this); - void ProcessList_sort(ProcessList* this); - bool ProcessList_readStatusFile(ProcessList* this, Process* proc, char* dirname, char* name); void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, float period); diff --git a/RichString.h b/RichString.h index f59c5765..64ad7aff 100644 --- a/RichString.h +++ b/RichString.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_RichString #define HEADER_RichString @@ -7,7 +7,6 @@ #include #include #include -#include #include "debug.h" #include @@ -21,6 +20,9 @@ typedef struct RichString_ { } RichString; +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif RichString RichString_new(); diff --git a/ScreenManager.h b/ScreenManager.h index 2efe8c4e..416164c4 100644 --- a/ScreenManager.h +++ b/ScreenManager.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_ScreenManager #define HEADER_ScreenManager @@ -32,9 +32,9 @@ typedef struct ScreenManager_ { int y2; Orientation orientation; Vector* items; + Vector* fuBars; int itemCount; FunctionBar* fuBar; - Vector* fuBars; bool owner; } ScreenManager; diff --git a/Settings.h b/Settings.h index 66795e94..8c67d295 100644 --- a/Settings.h +++ b/Settings.h @@ -3,7 +3,7 @@ #ifndef HEADER_Settings #define HEADER_Settings /* -htop - Settings.c +htop - Settings.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -32,8 +32,6 @@ Settings* Settings_new(ProcessList* pl, Header* header); void Settings_delete(Settings* this); - - bool Settings_read(Settings* this, char* fileName); bool Settings_write(Settings* this); diff --git a/SignalItem.h b/SignalItem.h index 071d8d89..04828c0a 100644 --- a/SignalItem.h +++ b/SignalItem.h @@ -1,9 +1,9 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ -#ifndef HEADER_Signal -#define HEADER_Signal +#ifndef HEADER_SignalItem +#define HEADER_SignalItem /* -htop +htop - SignalItem.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -25,8 +25,8 @@ typedef struct Signal_ { int number; } Signal; -extern char* SIGNAL_CLASS; +extern char* SIGNAL_CLASS; Signal* Signal_new(char* name, int number); diff --git a/SignalsPanel.h b/SignalsPanel.h index fec2bdca..d34a9941 100644 --- a/SignalsPanel.h +++ b/SignalsPanel.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_SignalsPanel #define HEADER_SignalsPanel diff --git a/String.h b/String.h index f096db12..8539f613 100644 --- a/String.h +++ b/String.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_String #define HEADER_String diff --git a/SwapMeter.h b/SwapMeter.h index f9be990c..f2b8fb11 100644 --- a/SwapMeter.h +++ b/SwapMeter.h @@ -22,7 +22,9 @@ in the source distribution for its full text. #include "debug.h" #include +extern int SwapMeter_attributes[]; +extern MeterType SwapMeter; void SwapMeter_setValues(Meter* this, char* buffer, int len); diff --git a/TasksMeter.h b/TasksMeter.h index 837730fb..e5b6c47a 100644 --- a/TasksMeter.h +++ b/TasksMeter.h @@ -17,7 +17,9 @@ in the source distribution for its full text. #include "debug.h" +extern int TasksMeter_attributes[]; +extern MeterType TasksMeter; void TasksMeter_setValues(Meter* this, char* buffer, int len); diff --git a/TraceScreen.h b/TraceScreen.h index 0fe9bff0..34ee5cb9 100644 --- a/TraceScreen.h +++ b/TraceScreen.h @@ -1,11 +1,13 @@ +/* Do not edit this file. It was automatically generated. */ + +#ifndef HEADER_TraceScreen +#define HEADER_TraceScreen /* htop - TraceScreen.h -(C) 2005 Hisham H. Muhammad +(C) 2005-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#ifndef HEADER_TraceScreen -#define HEADER_TraceScreen #define _GNU_SOURCE #include @@ -13,11 +15,16 @@ in the source distribution for its full text. #include #include #include +#include +#include #include "ProcessList.h" +#include "Process.h" +#include "ListItem.h" #include "Panel.h" #include "FunctionBar.h" + typedef struct TraceScreen_ { Process* process; Panel* display; @@ -25,6 +32,7 @@ typedef struct TraceScreen_ { bool tracing; } TraceScreen; + TraceScreen* TraceScreen_new(Process* process); void TraceScreen_delete(TraceScreen* this); @@ -34,4 +42,3 @@ void TraceScreen_draw(TraceScreen* this); void TraceScreen_run(TraceScreen* this); #endif - diff --git a/UptimeMeter.h b/UptimeMeter.h index 4fe279f7..7f68d3c7 100644 --- a/UptimeMeter.h +++ b/UptimeMeter.h @@ -17,8 +17,10 @@ in the source distribution for its full text. #include "debug.h" +extern int UptimeMeter_attributes[]; +extern MeterType UptimeMeter; -void UptimeMeter_setValues(Meter* cast, char* buffer, int len); +void UptimeMeter_setValues(Meter* this, char* buffer, int len); #endif diff --git a/UsersTable.h b/UsersTable.h index fd717c2e..54b997dc 100644 --- a/UsersTable.h +++ b/UsersTable.h @@ -1,9 +1,9 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_UsersTable #define HEADER_UsersTable /* -htop +htop - UsersTable.h (C) 2004-2006 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. @@ -20,10 +20,6 @@ in the source distribution for its full text. #include "debug.h" #include -#ifndef SYSCONFDIR -#define SYSCONFDIR "/etc" -#endif - typedef struct UsersTable_ { Hashtable* users; } UsersTable; @@ -36,6 +32,6 @@ char* UsersTable_getRef(UsersTable* this, int uid); inline int UsersTable_size(UsersTable* this); -void UsersTable_foreach(UsersTable*, Hashtable_PairFunction, void*); +inline void UsersTable_foreach(UsersTable* this, Hashtable_PairFunction f, void* userData); #endif diff --git a/Vector.h b/Vector.h index bba38f18..a01c8fa7 100644 --- a/Vector.h +++ b/Vector.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_Vector #define HEADER_Vector diff --git a/debug.h b/debug.h index 59fe517a..1b89f66c 100644 --- a/debug.h +++ b/debug.h @@ -3,12 +3,12 @@ /* Full debug */ #include "DebugMemory.h" - #define calloc(a, b) DebugMemory_calloc(a, b, __FILE__, __LINE__); - #define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__, #x); - #define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__, #x); - #define strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__); - #define free(x) DebugMemory_free(x, __FILE__, __LINE__); - #define debug_done() DebugMemory_report(); + #define calloc(a, b) DebugMemory_calloc(a, b, __FILE__, __LINE__) + #define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__, #x) + #define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__, #x) + #define strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__) + #define free(x) DebugMemory_free(x, __FILE__, __LINE__) + #define debug_done() DebugMemory_report() #elif defined(DEBUGLITE) diff --git a/htop.h b/htop.h index af2b46bc..5042f94e 100644 --- a/htop.h +++ b/htop.h @@ -1,4 +1,4 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_htop #define HEADER_htop @@ -9,6 +9,13 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ +#define _GNU_SOURCE +#include +#include +#include +#include +#include + #include "ProcessList.h" #include "CRT.h" #include "Panel.h" @@ -21,32 +28,24 @@ in the source distribution for its full text. #include "ListItem.h" #include "CategoriesPanel.h" #include "SignalsPanel.h" +#include "TraceScreen.h" #include "config.h" #include "debug.h" -#include -#include -#include -#include -#include - -int usleep(int usec); - //#link m #define INCSEARCH_MAX 40 - void printVersionFlag(); void printHelpFlag(); void showHelp(); -void showColumnConfig(ProcessList* pl); +void addUserToList(int key, void* userCast, void* panelCast); -void Setup_run(Settings* settings, int headerHeight); +void setUserOnly(const char* userName, bool* userOnly, uid_t* userId); int main(int argc, char** argv); -- cgit v1.2.3