blob: aa99e32d7c19db53b4305f7d2062c9d898487f0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <stdarg.h>
int get_int_value_from_filef(const char* format, ...);
int vget_int_value_from_filef(const char* format, va_list args);
int get_int_value_from_file(const char* filename);
void chomp(char *string);
int get_int(const char* string);
/* <ew> Stringification of line number */
#define STRING2(x) #x
#define STRING(x) STRING2(x)
#define STR_LINE STRING(__LINE__)
/* </ew> */
#define info(format, ...) printf("INFO : "__FILE__"@%s:"STR_LINE": "format, __func__, ##__VA_ARGS__)
#ifdef DEBUG
#define debug(format, ...) fprintf(stderr, "DEBUG: "__FILE__"@%s:"STR_LINE": "format, __func__, ##__VA_ARGS__)
#else
#define debug(...)
#endif
#define debug_entry() debug("entry\n")
#define debug_exit() debug("exit\n")
#define FILE_PATH_SIZE 2048
#define CPU_TRAY_UPDATE_INTERVAL 2000
#define BAT_TRAY_UPDATE_INTERVAL 10000
|