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()); }
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); }
void close_tty(void) { close(tty_fd()); }