harness__argparser_8c.tex (5353B)
1\hypertarget{harness__argparser_8c}{\section{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/harness\-\_\-argparser.c File Reference} 2\label{harness__argparser_8c}\index{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/harness\-\_\-argparser.\-c@{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/harness\-\_\-argparser.\-c}} 3} 4{\ttfamily \#include $<$S\-D\-L\-\_\-test.\-h$>$}\\* 5{\ttfamily \#include $<$stdio.\-h$>$}\\* 6{\ttfamily \#include $<$string.\-h$>$}\\* 7{\ttfamily \#include \char`\"{}S\-D\-L\-\_\-visualtest\-\_\-harness\-\_\-argparser.\-h\char`\"{}}\\* 8{\ttfamily \#include \char`\"{}S\-D\-L\-\_\-visualtest\-\_\-rwhelper.\-h\char`\"{}}\\* 9\subsection*{Macros} 10\begin{DoxyCompactItemize} 11\item 12\#define \hyperlink{harness__argparser_8c_a7186273cd88640b740b6333cd98ae243}{M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N}~400 13\item 14\#define \hyperlink{harness__argparser_8c_a6669f8e5a07e7a0e4622dd23362831e7}{D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-U\-T\-\_\-\-T\-I\-M\-E\-O\-U\-T}~(60 $\ast$ 1000) 15\end{DoxyCompactItemize} 16\subsection*{Functions} 17\begin{DoxyCompactItemize} 18\item 19int \hyperlink{harness__argparser_8c_a629609acc04ef21a21fdfbbf6c1589c8}{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Harness\-Args} (char $\ast$$\ast$argv, \hyperlink{struct_s_d_l_visual_test___harness_state}{S\-D\-L\-Visual\-Test\-\_\-\-Harness\-State} $\ast$state) 20\item 21void \hyperlink{harness__argparser_8c_a833147d8da541982c615645a797627cc}{S\-D\-L\-Visual\-Test\-\_\-\-Free\-Harness\-State} (\hyperlink{struct_s_d_l_visual_test___harness_state}{S\-D\-L\-Visual\-Test\-\_\-\-Harness\-State} $\ast$state) 22\end{DoxyCompactItemize} 23 24 25\subsection{Detailed Description} 26Source file for functions to parse arguments to the test harness. 27 28\subsection{Macro Definition Documentation} 29\hypertarget{harness__argparser_8c_a6669f8e5a07e7a0e4622dd23362831e7}{\index{harness\-\_\-argparser.\-c@{harness\-\_\-argparser.\-c}!D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-U\-T\-\_\-\-T\-I\-M\-E\-O\-U\-T@{D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-U\-T\-\_\-\-T\-I\-M\-E\-O\-U\-T}} 30\index{D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-U\-T\-\_\-\-T\-I\-M\-E\-O\-U\-T@{D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-U\-T\-\_\-\-T\-I\-M\-E\-O\-U\-T}!harness_argparser.c@{harness\-\_\-argparser.\-c}} 31\subsubsection[{D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-U\-T\-\_\-\-T\-I\-M\-E\-O\-U\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-U\-T\-\_\-\-T\-I\-M\-E\-O\-U\-T~(60 $\ast$ 1000)}}\label{harness__argparser_8c_a6669f8e5a07e7a0e4622dd23362831e7} 32Default value for the timeout after which the S\-U\-T is forcefully killed \hypertarget{harness__argparser_8c_a7186273cd88640b740b6333cd98ae243}{\index{harness\-\_\-argparser.\-c@{harness\-\_\-argparser.\-c}!M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N@{M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N}} 33\index{M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N@{M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N}!harness_argparser.c@{harness\-\_\-argparser.\-c}} 34\subsubsection[{M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N~400}}\label{harness__argparser_8c_a7186273cd88640b740b6333cd98ae243} 35Maximum length of one line in the config file 36 37\subsection{Function Documentation} 38\hypertarget{harness__argparser_8c_a833147d8da541982c615645a797627cc}{\index{harness\-\_\-argparser.\-c@{harness\-\_\-argparser.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Free\-Harness\-State@{S\-D\-L\-Visual\-Test\-\_\-\-Free\-Harness\-State}} 39\index{S\-D\-L\-Visual\-Test\-\_\-\-Free\-Harness\-State@{S\-D\-L\-Visual\-Test\-\_\-\-Free\-Harness\-State}!harness_argparser.c@{harness\-\_\-argparser.\-c}} 40\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Free\-Harness\-State}]{\setlength{\rightskip}{0pt plus 5cm}void S\-D\-L\-Visual\-Test\-\_\-\-Free\-Harness\-State ( 41\begin{DoxyParamCaption} 42\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-Harness\-State} $\ast$}]{state} 43\end{DoxyParamCaption} 44)}}\label{harness__argparser_8c_a833147d8da541982c615645a797627cc} 45Frees any resources associated with the state object pointed to by {\ttfamily state}. \hypertarget{harness__argparser_8c_a629609acc04ef21a21fdfbbf6c1589c8}{\index{harness\-\_\-argparser.\-c@{harness\-\_\-argparser.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Harness\-Args@{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Harness\-Args}} 46\index{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Harness\-Args@{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Harness\-Args}!harness_argparser.c@{harness\-\_\-argparser.\-c}} 47\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Harness\-Args}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Harness\-Args ( 48\begin{DoxyParamCaption} 49\item[{char $\ast$$\ast$}]{argv, } 50\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-Harness\-State} $\ast$}]{state} 51\end{DoxyParamCaption} 52)}}\label{harness__argparser_8c_a629609acc04ef21a21fdfbbf6c1589c8} 53Parse command line paramters to the test harness and populate a state object. 54 55 56\begin{DoxyParams}{Parameters} 57{\em argv} & The array of command line parameters. \\ 58\hline 59{\em state} & Pointer to the state object to be populated.\\ 60\hline 61\end{DoxyParams} 62\begin{DoxyReturn}{Returns} 63Non-\/zero on success, zero on failure. 64\end{DoxyReturn}