Exemple #1
0
static void		init_cmd(t_env *e)
{
	int		i;

	i = 0;
	while (i < e->maxfd)
	{
		if (e->fds[i].type == FD_CLIENT)
		{
			if (e->fds[i].player.time_life
				&& clock() >= e->fds[i].player.time_life)
			{
				if ((e->fds[i].player.food--) <= 0)
					is_die(e, i);
				e->fds[i].player.time_life = clock()
					+ (126 * CLOCKS_PER_SEC / e->data.d_time);
			}
			if (ft_strlen(e->fds[i].buf_mem) > 0)
			{
				if (clock() >= e->fds[i].player.time_block)
					e->fds[i].fct_cmd(e, i);
			}
		}
		i++;
	}
}
Exemple #2
0
bool binspector_parser_t::is_unnamed_statement()
{
    return is_notify() || is_summary() || is_die();
}