示例#1
0
文件: sastantua.c 项目: tirrorex/C
void	sastantua(int size)
{
	int block;
	int floor;

	block = 0;
	floor = 3;
	if	(size == 1)
		ft_print_line(floor);
	else
		while (block < size)
		{
			ft_print_line(block + floor, block, size);
			block++;			
		}
}
示例#2
0
文件: colle-00.c 项目: chinspp/42
void	colle(int x, int y)
{
	if (x > 0 && y > 0)
	{
		ft_print_line(x, 'o', '-', 'o');
		y--;
		while (y > 1)
		{
			ft_print_line(x, '|', ' ', '|');
			y--;
		}
		if (y > 0)
		{
			ft_print_line(x, 'o', '-', 'o');
		}
	}
}
示例#3
0
文件: colle-01.c 项目: chinspp/42
void	colle(int x, int y)
{
	if (x > 0 && y > 0)
	{
		ft_print_line(x, '/', '*', '\\');
		y--;
		while (y > 1)
		{
			ft_print_line(x, '*', ' ', '*');
			y--;
		}
		if (y > 0)
		{
			ft_print_line(x, '\\', '*', '/');
		}
	}
}
示例#4
0
文件: colle02.c 项目: hqro/piscine42
void	colle(int x, int y)
{
	int	j;

	j = 0;
	if (x > 0 && y > 0)
	{
		if (y < 2)
		{
			ft_print_line('A', 'B', x);
		}
		else
		{
			ft_print_line('A', 'B', x);
			while (j < y - 2)
			{
				ft_print_line('B', ' ', x);
				j++;
			}
			ft_print_line('C', 'B', x);
		}
	}
}
示例#5
0
static void		backspace_middle(char **line, t_cursor *cursor)
{
	char			*tmp;
	char			*tmp2;
	char			*tmp3;

	tmp = ft_strsub(*line, 0, cursor->string - 1);
	tmp2 = ft_strsub(*line, (cursor->string), cursor->strlen);
	tmp3 = ft_strjoin(tmp, tmp2);
	ft_strcpy(*line, tmp3);
	key_is_left(line, cursor);
	tputs(tgetstr("cd", NULL), 1, tputs_putchar);
	ft_print_line(line, cursor);
	free(tmp);
	free(tmp2);
	free(tmp3);
}