Minishell
|
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
#include "../include/run_command.h"
#include "../include/mini_printf.h"
Functions | |
void | add_char (int *index, char *command, char c) |
void | enable_raw_mode (void) |
void | disable_raw_mode (void) |
void | handle_signals (int) |
void | while_ask_command (int *index) |
void add_char | ( | int * | index, |
char * | command, | ||
char | c ) |
This function add a char in the place of the cursor and moves
index | is the current cursor position |
command | this is the command string that is typed |
c | this is the current wrintten char |
void disable_raw_mode | ( | void | ) |
Enable printing things to the terminal when writing and also enable canonical mode which enables to read input when a line delimiter is found
void enable_raw_mode | ( | void | ) |
Disables printing things to the terminal when writing and also enables non-canonical mode which enables you to read input immediately is types
void handle_signals | ( | int | ) |
void while_ask_command | ( | int * | index | ) |
This function loops until the user stop writing or there is a new line and process the input
index | current position of the cursor |