/* See LICENSE file for copyright and license details. */ #include "libcontacts.h" #include #include #include #include #include #include #include #include #include #include #include #define TIME_MAX ((time_t)((1ULL << (8 * sizeof(time_t) - 1)) - 1ULL)) #define DESTROY_ALL_OBJECTS(LIST, FUNC)\ do {\ void *destroy_all_temp__ = (LIST);\ if (destroy_all_temp__) {\ for (; *(LIST); (LIST)++) {\ FUNC(*(LIST));\ free(*(LIST));\ }\ free(destroy_all_temp__);\ }\ } while (0) #define DESTROY_ALL_STRINGS(LIST)\ do {\ void *destroy_all_temp__ = (LIST);\ if (destroy_all_temp__) {\ for (; *(LIST); (LIST)++)\ free(*(LIST));\ free(destroy_all_temp__);\ }\ } while (0)