Moved struct process to top.h
authorKevin Lyles <iqgryn@users.sourceforge.net>
Sat, 14 Jun 2008 05:32:46 +0000 (05:32 +0000)
committerKevin Lyles <iqgryn@users.sourceforge.net>
Sat, 14 Jun 2008 05:32:46 +0000 (05:32 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1153 7f574dfc-610e-0410-a909-a81674777703

src/conky.h
src/top.h

index 970f0d1..a07400d 100644 (file)
@@ -35,6 +35,7 @@
 #endif /* HAS_MCHECK_H */
 
 #include "config.h"
+#include "top.h"
 #include <sys/utsname.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -644,27 +645,6 @@ struct obsd_sensors_struct obsd_sensors;
 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;
index cf0fccf..b176f34 100644 (file)
--- a/src/top.h
+++ b/src/top.h
@@ -26,6 +26,9 @@
  *
  * $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;
@@ -85,3 +110,5 @@ struct sorted_process {
 
 /* Pointer to head of process list */
 void process_find_top(struct process **, struct process **);
+
+#endif /* _top_h_ */