Ejemplo n.º 1
0
void draw_horizontal_line(int y, int startx, int endx) {
	int i;
	move_cursor(startx, y);
	reverse_video();
	for(i=startx; i <= endx; i++) {
		printf(" ");	/* No need to use printf_P - printing 
						 * a single character gets optimised
						 * to a putchar call 
						 */
	}
	normal_display_mode();
}
Ejemplo n.º 2
0
void draw_vertical_line(int x, int starty, int endy) {
	int i;
	move_cursor(x, starty);
	reverse_video();
	for(i=starty; i < endy; i++) {
		printf(" ");
		/* Move down one and back to the left one */
		printf_P(PSTR("\x1b[B\x1b[D"));
	}
	printf(" ");
	normal_display_mode();
}
Ejemplo n.º 3
0
void			display_args(t_select *select)
{
  int			x;
  int			y;
  t_args		*tmp;
  int			len;

  x = 0;
  y = 20;
  tmp = select->args;
  len = 0;
  display_menu();
  while (tmp)
    {
      if (len < my_strlen(tmp->arg))
	len = my_strlen(tmp->arg);
      if (bad_window_size(select, len, x))
	return ;
      xtputs(tgoto(select->termcap->cmstr, x, y), 1, my_outc);
      reverse_video(select, tmp);
      check_lign(select, &y, &x, &len);
      tmp = tmp->next;
    }
}