aboutsummaryrefslogtreecommitdiffstats
path: root/ProcessList.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:20 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:20 +0200
commitea859f50d9438bc61ae96721a4d255b49de78653 (patch)
treebfb52a5f403ad1e86c562b2f4d608d1268fe8fcf /ProcessList.h
parent266ab52b3a741a58fb17c48b0f7939d7c5d266de (diff)
downloaddebian_htop-ea859f50d9438bc61ae96721a4d255b49de78653.tar.gz
debian_htop-ea859f50d9438bc61ae96721a4d255b49de78653.tar.bz2
debian_htop-ea859f50d9438bc61ae96721a4d255b49de78653.zip
Imported Upstream version 0.6.2upstream/0.6.2
Diffstat (limited to 'ProcessList.h')
-rw-r--r--ProcessList.h46
1 files changed, 39 insertions, 7 deletions
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 <signal.h>
#include <stdbool.h>
#include <sys/utsname.h>
+#include <stdarg.h>
#include "debug.h"
#include <assert.h>
@@ -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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy