parsehelper_8c.tex 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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
  9. char $\ast$$\ast$ \hyperlink{parsehelper_8c_a508e690ed938e09fc3b724d2faf06899}{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize} (char $\ast$str, int max\-\_\-token\-\_\-len)
  10. \item
  11. char $\ast$$\ast$ \hyperlink{parsehelper_8c_a5f168fdd02f9d40ddbad97bd8c0b6361}{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv} (char $\ast$args)
  12. \end{DoxyCompactItemize}
  13. \subsection{Detailed Description}
  14. Source file with some helper functions for parsing strings.
  15. \subsection{Function Documentation}
  16. \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}}
  17. \index{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv@{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv}!parsehelper.c@{parsehelper.\-c}}
  18. \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 (
  19. \begin{DoxyParamCaption}
  20. \item[{char $\ast$}]{args}
  21. \end{DoxyParamCaption}
  22. )}}\label{parsehelper_8c_a5f168fdd02f9d40ddbad97bd8c0b6361}
  23. Takes an string of command line arguments and breaks them up into an array based on whitespace.
  24. \begin{DoxyParams}{Parameters}
  25. {\em args} & The string of arguments.\\
  26. \hline
  27. \end{DoxyParams}
  28. \begin{DoxyReturn}{Returns}
  29. N\-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.
  30. \end{DoxyReturn}
  31. \hypertarget{parsehelper_8c_a508e690ed938e09fc3b724d2faf06899}{\index{parsehelper.\-c@{parsehelper.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Tokenize@{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}}
  32. \index{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize@{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}!parsehelper.c@{parsehelper.\-c}}
  33. \subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ S\-D\-L\-Visual\-Test\-\_\-\-Tokenize (
  34. \begin{DoxyParamCaption}
  35. \item[{char $\ast$}]{str, }
  36. \item[{int}]{max\-\_\-token\-\_\-len}
  37. \end{DoxyParamCaption}
  38. )}}\label{parsehelper_8c_a508e690ed938e09fc3b724d2faf06899}
  39. Takes a string and breaks it into tokens by splitting on whitespace.
  40. \begin{DoxyParams}{Parameters}
  41. {\em str} & The string to be split. \\
  42. \hline
  43. {\em max\-\_\-token\-\_\-len} & Length of each element in the array to be returned.\\
  44. \hline
  45. \end{DoxyParams}
  46. \begin{DoxyReturn}{Returns}
  47. N\-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.
  48. \end{DoxyReturn}