Go to the source code of this file.
|
#define | NMEMB(x) (sizeof((x))/sizeof(typeof((x)[0]))) |
|
#define | MILLISEC(x) (((x).tv_sec*1000)+((x).tv_usec/1000)) |
|
#define | MILLISEC_TO_TV(x, t) |
|
#define | SET_BIT(a, i) ((a)[(i)/CHAR_BIT] |= 1<<((i)%CHAR_BIT)) |
|
#define | CLR_BIT(a, i) ((a)[(i)/CHAR_BIT] &= ~(1<<((i)%CHAR_BIT))) |
|
#define | TEST_BIT(a, i) (((a)[(i)/CHAR_BIT] & (1<<((i)%CHAR_BIT))) ? 1 : 0) |
|
#define | FIND_PTR(p, a, n) |
|
#define | _return(x) ({return (x); (x);}) |
|
|
char | xor_int (int i) |
|
void | swap_array (int nmemb, size_t nmemb_sz, void *src, void *dst) |
|
void | swap_ints (int nmemb, unsigned int *x, unsigned int *y) |
|
void | swap_shorts (int nmemb, unsigned short *x, unsigned short *y) |
|
int | rand_range (int _min, int _max) |
|
void | xsrand (void) |
|
char * | last_token (char *string, char tok) |
|
void | strip_char (char *string, char char_to_strip) |
|
char ** | split_string (char *str, const char *div_str, int *substrings, int max_substrings, int max_substring_sz) |
|
int | find_int (int x, int *ia, int nmemb) |
|
void | xtimer (u_int secs, u_int steps, int *counter) |
|
int | check_and_create_dir (char *dir) |
|
int | file_exist (char *filename) |
|
int | exec_root_script (char *script, char *argv) |
|
void | do_nothing (void) |
|
#define _return |
( |
|
x | ) |
({return (x); (x);}) |
#define CLR_BIT |
( |
|
a, |
|
|
|
i |
|
) |
| ((a)[(i)/CHAR_BIT] &= ~(1<<((i)%CHAR_BIT))) |
#define FIND_PTR |
( |
|
p, |
|
|
|
a, |
|
|
|
n |
|
) |
| |
Value:({ \
int _i, _ret; \
\
for(_i=0, _ret=-1; _i<(n); _i++) \
if((a)[_i] == (p)) { \
_ret=_i; \
break; \
} \
_ret; \
})
#define MILLISEC |
( |
|
x | ) |
(((x).tv_sec*1000)+((x).tv_usec/1000)) |
#define MILLISEC_TO_TV |
( |
|
x, |
|
|
|
t |
|
) |
| |
Value:do{ \
(t).tv_sec=(x)/1000; \
(t).tv_usec=((x) - ((x)/1000)*1000)*1000; \
}while(0)
#define NMEMB |
( |
|
x | ) |
(sizeof((x))/sizeof(typeof((x)[0]))) |
#define SET_BIT |
( |
|
a, |
|
|
|
i |
|
) |
| ((a)[(i)/CHAR_BIT] |= 1<<((i)%CHAR_BIT)) |
#define TEST_BIT |
( |
|
a, |
|
|
|
i |
|
) |
| (((a)[(i)/CHAR_BIT] & (1<<((i)%CHAR_BIT))) ? 1 : 0) |
int check_and_create_dir |
( |
char * |
dir | ) |
|
int exec_root_script |
( |
char * |
script, |
|
|
char * |
argv |
|
) |
| |
int file_exist |
( |
char * |
filename | ) |
|
int find_int |
( |
int |
x, |
|
|
int * |
ia, |
|
|
int |
nmemb |
|
) |
| |
char* last_token |
( |
char * |
string, |
|
|
char |
tok |
|
) |
| |
int rand_range |
( |
int |
_min, |
|
|
int |
_max |
|
) |
| |
|
inline |
char** split_string |
( |
char * |
str, |
|
|
const char * |
div_str, |
|
|
int * |
substrings, |
|
|
int |
max_substrings, |
|
|
int |
max_substring_sz |
|
) |
| |
void strip_char |
( |
char * |
string, |
|
|
char |
char_to_strip |
|
) |
| |
void swap_array |
( |
int |
nmemb, |
|
|
size_t |
nmemb_sz, |
|
|
void * |
src, |
|
|
void * |
dst |
|
) |
| |
void swap_ints |
( |
int |
nmemb, |
|
|
unsigned int * |
x, |
|
|
unsigned int * |
y |
|
) |
| |
void swap_shorts |
( |
int |
nmemb, |
|
|
unsigned short * |
x, |
|
|
unsigned short * |
y |
|
) |
| |
void xtimer |
( |
u_int |
secs, |
|
|
u_int |
steps, |
|
|
int * |
counter |
|
) |
| |