77 lines
4.0 KiB
TeX
77 lines
4.0 KiB
TeX
\doxysection{src/parsing.c File Reference}
|
|
\hypertarget{parsing_8c}{}\label{parsing_8c}\index{src/parsing.c@{src/parsing.c}}
|
|
{\ttfamily \#include "{}parsing.\+h"{}}\newline
|
|
{\ttfamily \#include "{}const.\+h"{}}\newline
|
|
{\ttfamily \#include "{}exec.\+h"{}}\newline
|
|
{\ttfamily \#include $<$stdio.\+h$>$}\newline
|
|
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
|
|
{\ttfamily \#include $<$string.\+h$>$}\newline
|
|
{\ttfamily \#include $<$unistd.\+h$>$}\newline
|
|
Include dependency graph for parsing.\+c\+:
|
|
% FIG 0
|
|
\doxysubsubsection*{Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
char \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{parsing_8c_a9e35a75d71f9fc522c563668fbbec457}{read\+\_\+line}} ()
|
|
\begin{DoxyCompactList}\small\item\em Attend que l\textquotesingle{}utilisateur appuie sur entrée pour récupérer la ligne écrite puis la renvoi. \end{DoxyCompactList}\item
|
|
char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{parsing_8c_a1f1804b333ed064f276628d7bfa31bfa}{split\+\_\+line}} (char \texorpdfstring{$\ast$}{*}line)
|
|
\begin{DoxyCompactList}\small\item\em Sépare une ligne par des espaces (pour la ligne "{}ls -\/l"{} ça va renvoyer \{"{}ls"{}, "{}-\/l"{}\}) \end{DoxyCompactList}\item
|
|
void \mbox{\hyperlink{parsing_8c_a5b4b9d6208b7a7cad8f4c53b126e8f97}{shell\+\_\+loop}} (void)
|
|
\begin{DoxyCompactList}\small\item\em La boucle du shell, elle consiste en trois étapes \+: \end{DoxyCompactList}\end{DoxyCompactItemize}
|
|
|
|
|
|
\doxysubsection{Function Documentation}
|
|
\Hypertarget{parsing_8c_a9e35a75d71f9fc522c563668fbbec457}\label{parsing_8c_a9e35a75d71f9fc522c563668fbbec457}
|
|
\index{parsing.c@{parsing.c}!read\_line@{read\_line}}
|
|
\index{read\_line@{read\_line}!parsing.c@{parsing.c}}
|
|
\doxysubsubsection{\texorpdfstring{read\_line()}{read\_line()}}
|
|
{\footnotesize\ttfamily char \texorpdfstring{$\ast$}{*} read\+\_\+line (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
Attend que l\textquotesingle{}utilisateur appuie sur entrée pour récupérer la ligne écrite puis la renvoi.
|
|
|
|
\begin{DoxyReturn}{Returns}
|
|
La ligne écrite par l\textquotesingle{}utilisateur
|
|
\end{DoxyReturn}
|
|
\Hypertarget{parsing_8c_a5b4b9d6208b7a7cad8f4c53b126e8f97}\label{parsing_8c_a5b4b9d6208b7a7cad8f4c53b126e8f97}
|
|
\index{parsing.c@{parsing.c}!shell\_loop@{shell\_loop}}
|
|
\index{shell\_loop@{shell\_loop}!parsing.c@{parsing.c}}
|
|
\doxysubsubsection{\texorpdfstring{shell\_loop()}{shell\_loop()}}
|
|
{\footnotesize\ttfamily void shell\+\_\+loop (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
La boucle du shell, elle consiste en trois étapes \+:
|
|
|
|
|
|
\begin{DoxyItemize}
|
|
\item Quand l\textquotesingle{}utilisateur appui sur entrer pour récupérer son entrée standard
|
|
\item Parser la ligne en fonction de ses espaces
|
|
\item Exécuter la commande demandée \begin{DoxySeeAlso}{See also}
|
|
char\texorpdfstring{$\ast$}{*} \doxylink{parsing_8c_a9e35a75d71f9fc522c563668fbbec457}{read\+\_\+line()}
|
|
|
|
char\texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*} \doxylink{parsing_8c_a1f1804b333ed064f276628d7bfa31bfa}{split\+\_\+line(char \texorpdfstring{$\ast$}{*}line)}
|
|
|
|
int \doxylink{exec_8c_a0eaeafb557648df1d7fb77848b11edf5}{execute\+\_\+cmd(char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}args)}
|
|
\end{DoxySeeAlso}
|
|
|
|
\end{DoxyItemize}\Hypertarget{parsing_8c_a1f1804b333ed064f276628d7bfa31bfa}\label{parsing_8c_a1f1804b333ed064f276628d7bfa31bfa}
|
|
\index{parsing.c@{parsing.c}!split\_line@{split\_line}}
|
|
\index{split\_line@{split\_line}!parsing.c@{parsing.c}}
|
|
\doxysubsubsection{\texorpdfstring{split\_line()}{split\_line()}}
|
|
{\footnotesize\ttfamily char \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*} split\+\_\+line (\begin{DoxyParamCaption}\item[{char \texorpdfstring{$\ast$}{*}}]{line }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
Sépare une ligne par des espaces (pour la ligne "{}ls -\/l"{} ça va renvoyer \{"{}ls"{}, "{}-\/l"{}\})
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em char} & \texorpdfstring{$\ast$}{*}line la ligne à parser \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
la liste des arguments de la commande
|
|
\end{DoxyReturn}
|