From 85bb4ad9cb820ac3b8e935a930084a06cbfd2847 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.3 --- Process.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'Process.h') diff --git a/Process.h b/Process.h index f4f1b20..5c4c716 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 @@ -34,7 +34,6 @@ in the source distribution for its full text. #define PAGE_SIZE ( sysconf(_SC_PAGESIZE) / 1024 ) #define PROCESS_COMM_LEN 300 -#define PROCESS_USER_LEN 10 typedef enum ProcessField_ { @@ -64,16 +63,19 @@ typedef struct Process_ { int tty_nr; int tpgid; unsigned long int flags; + #ifdef DEBUG unsigned long int minflt; unsigned long int cminflt; unsigned long int majflt; unsigned long int cmajflt; + #endif unsigned long int utime; unsigned long int stime; long int cutime; long int cstime; long int priority; long int nice; + #ifdef DEBUG long int itrealvalue; unsigned long int starttime; unsigned long int vsize; @@ -91,6 +93,7 @@ typedef struct Process_ { unsigned long int wchan; unsigned long int nswap; unsigned long int cnswap; + #endif int exit_signal; int processor; int m_size; @@ -103,15 +106,17 @@ typedef struct Process_ { uid_t st_uid; float percent_cpu; float percent_mem; - char user[PROCESS_USER_LEN + 1]; + char* user; } Process; -extern char* PROCESS_CLASS; - -extern char* Process_fieldNames[]; - +#ifdef DEBUG +extern char* PROCESS_CLASS; +#else +#define PROCESS_CLASS NULL +#endif +extern char *Process_fieldNames[]; Process* Process_new(struct ProcessList_ *pl); @@ -133,7 +138,9 @@ void Process_sendSignal(Process* this, int signal); void Process_writeField(Process* this, RichString* str, ProcessField field); -int Process_compare(const Object* v1, const Object* v2); +int Process_pidCompare(const void* v1, const void* v2); + +int Process_compare(const void* v1, const void* v2); char* Process_printField(ProcessField field); -- cgit v1.2.3