7 #include <sys/socket.h>
9 int check_mount(char *s);
10 void prepare_update(void);
11 void update_uptime(void);
12 void update_meminfo(void);
13 void update_net_stats(void);
14 void update_cpu_usage(void);
15 void update_total_processes(void);
16 void update_uname(void);
17 void update_running_processes(void);
18 void update_i8k(void);
19 void update_stuff(void);
20 char get_freq(char *, size_t, const char *, int, unsigned int);
21 void get_freq_dynamic(char *, size_t, const char *, int);
22 char get_voltage(char *, size_t, const char *, int, unsigned int); /* ptarjan */
23 void update_load_average(void);
24 void update_top(void);
25 void free_all_processes(void);
26 struct process *get_first_process(void);
27 void get_cpu_count(void);
28 double get_time(void);
30 FILE *open_file(const char *, int *);
31 void variable_substitute(const char *s, char *dest, unsigned int n);
33 void format_seconds(char *buf, unsigned int n, long t);
34 void format_seconds_short(char *buf, unsigned int n, long t);
37 void update_x11info(void);
40 int round_to_int(float);
42 extern unsigned long long need_mask;
43 extern int no_buffers;
49 void free_dns_data(void);
54 long long last_read_recv, last_read_trans;
55 long long recv, trans;
56 double recv_speed, trans_speed;
58 #if defined(__linux__)
60 #endif /* __linux__ */
61 double net_rec[15], net_trans[15];
62 // wireless extensions
70 void clear_net_stats(void);
71 struct net_stat *get_net_stat(const char *);
73 void get_adt746x_cpu(char *, size_t);
74 void get_adt746x_fan(char *, size_t);
76 int open_acpi_temperature(const char *name);
77 double get_acpi_temperature(int fd);
78 void get_acpi_ac_adapter(char *, size_t);
79 void get_acpi_fan(char *, size_t);
80 void get_battery_stuff(char *buf, unsigned int n, const char *bat, int item);
81 int get_battery_perct(const char *bat);
82 int get_battery_perct_bar(const char *bat);
83 void get_battery_short_status(char *buf, unsigned int n, const char *bat);
85 #endif /* _COMMON_H */