37 #include "tags.h" |
37 #include "tags.h" |
38 |
38 |
39 #ifdef __APPLE__ |
39 #ifdef __APPLE__ |
40 #include <CoreFoundation/CoreFoundation.h> |
40 #include <CoreFoundation/CoreFoundation.h> |
41 #endif |
41 #endif |
|
42 |
|
43 void free_dav_tag(DavTag* tag) { |
|
44 free(tag->name); |
|
45 free(tag->color); |
|
46 free(tag); |
|
47 } |
|
48 |
|
49 int compare_tagname(DavTag* left, DavTag* right, void* ignorecase) { |
|
50 sstr_t leftname = sstr(left->name); |
|
51 sstr_t rightname = sstr(right->name); |
|
52 if (ignorecase && *((int*) ignorecase)) { |
|
53 return sstrcasecmp(leftname, rightname); |
|
54 } else { |
|
55 return sstrcmp(leftname, rightname); |
|
56 } |
|
57 } |
42 |
58 |
43 UcxList* parse_text_taglist(const char *buf, size_t length) { |
59 UcxList* parse_text_taglist(const char *buf, size_t length) { |
44 UcxList *tags = NULL; |
60 UcxList *tags = NULL; |
45 |
61 |
46 int line_start = 0; |
62 int line_start = 0; |