cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

parsehelper_8c.tex (3165B)


      1\hypertarget{parsehelper_8c}{\section{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/parsehelper.c File Reference}
      2\label{parsehelper_8c}\index{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/parsehelper.\-c@{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/parsehelper.\-c}}
      3}
      4{\ttfamily \#include $<$S\-D\-L\-\_\-test.\-h$>$}\\*
      5{\ttfamily \#include \char`\"{}S\-D\-L\-\_\-visualtest\-\_\-harness\-\_\-argparser.\-h\char`\"{}}\\*
      6\subsection*{Functions}
      7\begin{DoxyCompactItemize}
      8\item 
      9char $\ast$$\ast$ \hyperlink{parsehelper_8c_a508e690ed938e09fc3b724d2faf06899}{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize} (char $\ast$str, int max\-\_\-token\-\_\-len)
     10\item 
     11char $\ast$$\ast$ \hyperlink{parsehelper_8c_a5f168fdd02f9d40ddbad97bd8c0b6361}{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv} (char $\ast$args)
     12\end{DoxyCompactItemize}
     13
     14
     15\subsection{Detailed Description}
     16Source file with some helper functions for parsing strings. 
     17
     18\subsection{Function Documentation}
     19\hypertarget{parsehelper_8c_a5f168fdd02f9d40ddbad97bd8c0b6361}{\index{parsehelper.\-c@{parsehelper.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv@{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv}}
     20\index{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv@{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv}!parsehelper.c@{parsehelper.\-c}}
     21\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv (
     22\begin{DoxyParamCaption}
     23\item[{char $\ast$}]{args}
     24\end{DoxyParamCaption}
     25)}}\label{parsehelper_8c_a5f168fdd02f9d40ddbad97bd8c0b6361}
     26Takes an string of command line arguments and breaks them up into an array based on whitespace.
     27
     28
     29\begin{DoxyParams}{Parameters}
     30{\em args} & The string of arguments.\\
     31\hline
     32\end{DoxyParams}
     33\begin{DoxyReturn}{Returns}
     34N\-U\-L\-L on failure, an array of strings on success. The last element of the array is N\-U\-L\-L. The first element of the array is N\-U\-L\-L and should be set to the path of the executable by the caller. 
     35\end{DoxyReturn}
     36\hypertarget{parsehelper_8c_a508e690ed938e09fc3b724d2faf06899}{\index{parsehelper.\-c@{parsehelper.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Tokenize@{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}}
     37\index{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize@{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}!parsehelper.c@{parsehelper.\-c}}
     38\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ S\-D\-L\-Visual\-Test\-\_\-\-Tokenize (
     39\begin{DoxyParamCaption}
     40\item[{char $\ast$}]{str, }
     41\item[{int}]{max\-\_\-token\-\_\-len}
     42\end{DoxyParamCaption}
     43)}}\label{parsehelper_8c_a508e690ed938e09fc3b724d2faf06899}
     44Takes a string and breaks it into tokens by splitting on whitespace.
     45
     46
     47\begin{DoxyParams}{Parameters}
     48{\em str} & The string to be split. \\
     49\hline
     50{\em max\-\_\-token\-\_\-len} & Length of each element in the array to be returned.\\
     51\hline
     52\end{DoxyParams}
     53\begin{DoxyReturn}{Returns}
     54N\-U\-L\-L on failure; an array of strings with the tokens on success. The last element of the array is N\-U\-L\-L. 
     55\end{DoxyReturn}