void del_watcher_from_list(onlineTV_t tv, list_t list, int pos, int time) { void * watcher = list_get(list, pos); for (int i = 0; i < list_size(tv->watchers); i++) if (list_get(tv->watchers, i) == watcher) { history_t * hist = history_new((watcher_t *)watcher, time, 0); list_add(tv->history, hist, 0); list_del(tv->watchers, i); return; } }
void add_master_init (void) { master_history_addr = history_new ("Add Master Address"); master_history_name = history_new ("Add Master Name"); }
void add_watcher_from_list(onlineTV_t tv, list_t list, int pos, int time) { history_t * hist = history_new(list_get(list, pos), time, 1); list_add(tv->history, hist, 0); list_add(tv->watchers, list_get(list, pos), 0); }