Beispiel #1
0
static void			display_one_entry(t_history *entry)
{
	WRITE(tty_fd(), "\t");
	ft_putnbr_fd(entry->entry_number, tty_fd());
	WRITE(tty_fd(), "\t");
	ft_putendl_fd(entry->entry, tty_fd());
}
Beispiel #2
0
void reset_main(void)
{
  int fd = tty_fd();

  // man 4 console_codes: reset terminal is ESC (no left bracket) c
  xwrite(fd<0 ? 1 : fd, "\033c", 2);
}
Beispiel #3
0
void			close_tty(void)
{
	close(tty_fd());
}