From ea859f50d9438bc61ae96721a4d255b49de78653 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:20 +0200 Subject: Imported Upstream version 0.6.2 --- ProcessList.h | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'ProcessList.h') diff --git a/ProcessList.h b/ProcessList.h index 530af6f..23d28f2 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -1,14 +1,19 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_ProcessList #define HEADER_ProcessList /* -htop - ProcessList.h +htop - ProcessList.c (C) 2004,2005 Hisham H. Muhammad Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ +#ifndef CONFIG_H +#define CONFIG_H +#include "config.h" +#endif + #include "Process.h" #include "TypedVector.h" #include "UsersTable.h" @@ -23,6 +28,7 @@ in the source distribution for its full text. #include #include #include +#include #include "debug.h" #include @@ -43,6 +49,12 @@ in the source distribution for its full text. #define MAX_NAME 128 #endif +#ifndef MAX_READ +#define MAX_READ 8192 +#endif + + + typedef struct ProcessList_ { TypedVector* processes; TypedVector* processes2; @@ -75,11 +87,6 @@ typedef struct ProcessList_ { long int usedSwap; long int freeSwap; - int kernelMajor; - int kernelMiddle; - int kernelMinor; - int kernelTiny; - ProcessField* fields; ProcessField sortKey; int direction; @@ -90,10 +97,30 @@ typedef struct ProcessList_ { bool treeView; bool highlightBaseName; bool highlightMegabytes; + #ifdef DEBUG + FILE* traceFile; + #endif } 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 +#define ProcessList_fopen(this, path, mode) fopen(path, mode) +#define ProcessList_read(this, buffer, format, ...) sscanf(buffer, format, ## __VA_ARGS__ ) +#define ProcessList_fread(this, file, format, ...) fscanf(file, format, ## __VA_ARGS__ ) +#endif + +#endif ProcessList* ProcessList_new(UsersTable* usersTable); @@ -103,6 +130,7 @@ void ProcessList_invertSortOrder(ProcessList* this); RichString ProcessList_printHeader(ProcessList* this); + void ProcessList_prune(ProcessList* this); void ProcessList_add(ProcessList* this, Process* p); @@ -117,6 +145,10 @@ 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); + void ProcessList_scan(ProcessList* this); void ProcessList_dontCrash(int signal); -- cgit v1.2.3