#endif /* HAS_MCHECK_H */
#include "config.h"
+#include "top.h"
#include <sys/utsname.h>
#include <stdio.h>
#include <stdlib.h>
enum { PB_BATT_STATUS, PB_BATT_PERCENT, PB_BATT_TIME };
void get_powerbook_batt_info(char *, size_t, int);
-struct process {
- struct process *next;
- struct process *previous;
-
- pid_t pid;
- char *name;
- float amount;
- unsigned long user_time;
- unsigned long total;
- unsigned long kernel_time;
- unsigned long previous_user_time;
- unsigned long previous_kernel_time;
- unsigned long total_cpu_time;
- unsigned int vsize;
- unsigned int rss;
- unsigned int time_stamp;
- unsigned int counted;
- unsigned int changed;
- float totalmem;
-};
-
struct local_mail_s {
char *box;
int mail_count;
*
* $Id$ */
+#ifndef _top_h_
+#define _top_h_
+
/* Ensure there's an operating system defined.
* compile with gcc -DOS ...
* There is *no* default because every OS has it's own way of revealing
* Process class *
******************************************/
+struct process {
+ struct process *next;
+ struct process *previous;
+
+ pid_t pid;
+ char *name;
+ float amount;
+ // User and kernel times are in hundredths of seconds
+ unsigned long user_time;
+ unsigned long total;
+ unsigned long kernel_time;
+ unsigned long previous_user_time;
+ unsigned long previous_kernel_time;
+ unsigned long total_cpu_time;
+ unsigned int vsize;
+ unsigned int rss;
+ unsigned int time_stamp;
+ unsigned int counted;
+ unsigned int changed;
+ float totalmem;
+};
+
struct sorted_process {
struct sorted_process *greater;
struct sorted_process *less;
/* Pointer to head of process list */
void process_find_top(struct process **, struct process **);
+
+#endif /* _top_h_ */