42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
termios.c File Reference

The file containing the termios functions. More...

Functions

void save_termios (struct termios *saved_termios)
 Save terminal attributes.
 
void restore_termios (struct termios *saved_termios)
 Restore terminal attributes.
 
int disable_buffer (void)
 Disable the buffer.
 

Detailed Description

The file containing the termios functions.

Function Documentation

◆ disable_buffer()

int disable_buffer ( void )

Disable the buffer.

Note
We'll need to disable the buffer when we want to my_getline
Returns
int 0 if the buffer is disabled, -1 otherwise

◆ restore_termios()

void restore_termios ( struct termios * saved_termios)

Restore terminal attributes.

Parameters
saved_termiosThe termios structure to restore the terminal attributes
Returns
void

◆ save_termios()

void save_termios ( struct termios * saved_termios)

Save terminal attributes.

Parameters
saved_termiosThe termios structure to save the terminal attributes
Returns
void