minishell
Minishell Project for École 42
All Classes Files Functions Typedefs Enumerations Pages
handle_quotes.c File Reference

Handling of quoted strings in the minishell project. More...

#include "minishell.h"
Include dependency graph for handle_quotes.c:

Functions

char * handle_quotes (t_shell *shell, char **str, char end_quote, t_expander *inter)
 Handles quoted strings within a shell command.
 

Detailed Description

Handling of quoted strings in the minishell project.

This file contains functions related to the handling of quoted strings within the minishell project. Quoted strings are enclosed in single (' ') or double (" ") quotes and may contain variable expansions.

Function Documentation

◆ handle_quotes()

char * handle_quotes ( t_shell shell,
char **  str,
char  end_quote,
t_expander inter 
)

Handles quoted strings within a shell command.

This function processes quoted strings within a shell command, including variable expansions if present. It handles both single (' ') and double (" ") quotes.

Parameters
[in]shellA pointer to the shell struct.
[in,out]strA pointer to the command string to be processed.
[in]end_quoteThe character that marks the end of the quoted string (' ' or " ").
[in,out]interA pointer to the expander struct.
Returns
A dynamically allocated string with the processed contents.