pinosaur
/
taskasaur.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
multiple menus
[taskasaur.git]
/
headers
/
utils.h
1
2
#ifndef __UTILS_H__
3
#define __UTILS_H__
4
5
#define \
6
array_length(type, array) \
7
({ \
8
type* m_arr; \
9
int m_len; \
10
\
11
m_arr = (type*)array; \
12
m_len = 0; \
13
\
14
while (m_arr[m_len] != 0) { \
15
m_len += 1; \
16
} \
17
\
18
m_len; \
19
})
20
21
extern int min(int a, int b);
22
23
extern char* wrap_text(char* str, int max_width, int* lines);
24
25
#endif