int builtin_unsetenv(t_list *list, char **cmd) { int i; t_node *tmp; i = 0; if (unsetenv_checking(list, cmd) == FAILURE) return (FAILURE); if (!(strcmp("?", cmd[1]))) return (SUCCESS); while (cmd[++i]) { tmp = list->myEnv->head; if (tmp == list->myEnv->tail && tmp == list->myEnv->tail) { if ((strcmp(tmp->name, cmd[1])) == 0) return (is_last_node(tmp, list)); } while (tmp != NULL) { if ((strcmp(cmd[i], tmp->name)) == 0) list = del_link(list, tmp->name); tmp = tmp->next; } } return (SUCCESS); }
static int group_update(void *m, void *data) { Group *group = (Group *)m; FrameInfo *frame = (FrameInfo *)data; group->OnGroupDataUpdate(group, frame); if (is_last_node(group)) VBMReleaseFrame(frame); return 0; }