From 32a8ebedc695dfae21497977bf2f77a3d5b50f91 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 1 Sep 2021 15:54:53 +0200 Subject: Remove common code in favor of new libimobiledevice-glue --- src/utils.h | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index b5cab3f..ce3b2e0 100644 --- a/src/utils.h +++ b/src/utils.h @@ -43,49 +43,6 @@ void fdlist_add(struct fdlist *list, enum fdowner owner, int fd, short events); void fdlist_free(struct fdlist *list); void fdlist_reset(struct fdlist *list); -struct collection { - void **list; - int capacity; -}; - -void collection_init(struct collection *col); -void collection_add(struct collection *col, void *element); -void collection_remove(struct collection *col, void *element); -int collection_count(struct collection *col); -void collection_free(struct collection *col); -void collection_copy(struct collection *dest, struct collection *src); - -#define MERGE_(a,b) a ## _ ## b -#define LABEL_(a,b) MERGE_(a, b) -#define UNIQUE_VAR(a) LABEL_(a, __LINE__) - -#define FOREACH(var, col) \ - do { \ - int UNIQUE_VAR(_iter); \ - for(UNIQUE_VAR(_iter)=0; UNIQUE_VAR(_iter)<(col)->capacity; UNIQUE_VAR(_iter)++) { \ - if(!(col)->list[UNIQUE_VAR(_iter)]) continue; \ - var = (col)->list[UNIQUE_VAR(_iter)]; - -#define ENDFOREACH \ - } \ - } while(0); - -#ifndef HAVE_STPCPY -char *stpcpy(char * s1, const char * s2); -#endif -char *string_concat(const char *str, ...); - -int buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length); -int buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length); - -enum plist_format_t { - PLIST_FORMAT_XML, - PLIST_FORMAT_BINARY -}; - -int plist_read_from_filename(plist_t *plist, const char *filename); -int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format); - uint64_t mstime64(void); void get_tick_count(struct timeval * tv); -- cgit v1.1-32-gdbae