TWatch *AddWatch(int conditionCount, int actionCount) { TWatch *t; CCALLOC(t, sizeof(TWatch)); t->index = watchIndex++; t->next = inactiveWatches; inactiveWatches = t; t->actions = AddActions(actionCount); t->conditions = AddConditions(conditionCount); return t; }
TWatch *AddWatch(int conditionCount, int actionCount) { TWatch *t = sys_mem_alloc(sizeof(TWatch)); memset(t, 0, sizeof(TWatch)); t->index = watchIndex++; t->next = inactiveWatches; inactiveWatches = t; t->actions = AddActions(actionCount); t->conditions = AddConditions(conditionCount); return t; }