Minishell
Loading...
Searching...
No Matches
input_processing.c File Reference
#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"
Include dependency graph for input_processing.c:

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)
 

Function Documentation

◆ add_char()

void add_char ( int * index,
char * command,
char c )

This function add a char in the place of the cursor and moves

Parameters
indexis the current cursor position
commandthis is the command string that is typed
cthis is the current wrintten char
Here is the call graph for this function:

◆ disable_raw_mode()

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

◆ enable_raw_mode()

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

◆ handle_signals()

void handle_signals ( int )
Here is the call graph for this function:

◆ while_ask_command()

void while_ask_command ( int * index)

This function loops until the user stop writing or there is a new line and process the input

Parameters
indexcurrent position of the cursor
Here is the call graph for this function: