mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-26 09:35:38 +00:00
86 lines
5.8 KiB
TeX
Executable file
86 lines
5.8 KiB
TeX
Executable file
\hypertarget{variator__common_8c}{\section{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/variator\-\_\-common.c File Reference}
|
|
\label{variator__common_8c}\index{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/variator\-\_\-common.\-c@{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/src/variator\-\_\-common.\-c}}
|
|
}
|
|
{\ttfamily \#include $<$S\-D\-L\-\_\-test.\-h$>$}\\*
|
|
{\ttfamily \#include \char`\"{}S\-D\-L\-\_\-visualtest\-\_\-variator\-\_\-common.\-h\char`\"{}}\\*
|
|
\subsection*{Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
int \hyperlink{variator__common_8c_aafcecc06c8feb24b6f6a509bfa9db681}{S\-D\-L\-Visual\-Test\-\_\-\-Next\-Value} (\hyperlink{union_s_d_l_visual_test___s_u_t_option_value}{S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Option\-Value} $\ast$var, \hyperlink{struct_s_d_l_visual_test___s_u_t_option}{S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Option} $\ast$opt)
|
|
\item
|
|
int \hyperlink{variator__common_8c_ad981c2efab849e76dc878ef8da9d6017}{S\-D\-L\-Visual\-Test\-\_\-\-Make\-Str\-From\-Variation} (\hyperlink{struct_s_d_l_visual_test___variation}{S\-D\-L\-Visual\-Test\-\_\-\-Variation} $\ast$variation, \hyperlink{struct_s_d_l_visual_test___s_u_t_config}{S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Config} $\ast$config, char $\ast$buffer, int size)
|
|
\item
|
|
int \hyperlink{variator__common_8c_ac87934906c51364778dc910ebca47b6c}{S\-D\-L\-Visual\-Test\-\_\-\-Init\-Variation} (\hyperlink{struct_s_d_l_visual_test___variation}{S\-D\-L\-Visual\-Test\-\_\-\-Variation} $\ast$variation, \hyperlink{struct_s_d_l_visual_test___s_u_t_config}{S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Config} $\ast$config)
|
|
\end{DoxyCompactItemize}
|
|
|
|
|
|
\subsection{Detailed Description}
|
|
Source file for some common functionality used by variators.
|
|
|
|
\subsection{Function Documentation}
|
|
\hypertarget{variator__common_8c_ac87934906c51364778dc910ebca47b6c}{\index{variator\-\_\-common.\-c@{variator\-\_\-common.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Init\-Variation@{S\-D\-L\-Visual\-Test\-\_\-\-Init\-Variation}}
|
|
\index{S\-D\-L\-Visual\-Test\-\_\-\-Init\-Variation@{S\-D\-L\-Visual\-Test\-\_\-\-Init\-Variation}!variator_common.c@{variator\-\_\-common.\-c}}
|
|
\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Init\-Variation}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Init\-Variation (
|
|
\begin{DoxyParamCaption}
|
|
\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-Variation} $\ast$}]{variation, }
|
|
\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Config} $\ast$}]{config}
|
|
\end{DoxyParamCaption}
|
|
)}}\label{variator__common_8c_ac87934906c51364778dc910ebca47b6c}
|
|
Initializes the variation using the following rules\-:
|
|
\begin{DoxyItemize}
|
|
\item Boolean options are initialized to S\-D\-L\-\_\-\-F\-A\-L\-S\-E.
|
|
\item Integer options are initialized to the minimum valid value they can hold.
|
|
\item Enum options are initialized to the first element in the list of values they can take.
|
|
\item String options are initialized to the name of the option.
|
|
\end{DoxyItemize}
|
|
|
|
\begin{DoxyReturn}{Returns}
|
|
1 on success, 0 on failure.
|
|
\end{DoxyReturn}
|
|
\hypertarget{variator__common_8c_ad981c2efab849e76dc878ef8da9d6017}{\index{variator\-\_\-common.\-c@{variator\-\_\-common.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Make\-Str\-From\-Variation@{S\-D\-L\-Visual\-Test\-\_\-\-Make\-Str\-From\-Variation}}
|
|
\index{S\-D\-L\-Visual\-Test\-\_\-\-Make\-Str\-From\-Variation@{S\-D\-L\-Visual\-Test\-\_\-\-Make\-Str\-From\-Variation}!variator_common.c@{variator\-\_\-common.\-c}}
|
|
\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Make\-Str\-From\-Variation}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Make\-Str\-From\-Variation (
|
|
\begin{DoxyParamCaption}
|
|
\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-Variation} $\ast$}]{variation, }
|
|
\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Config} $\ast$}]{config, }
|
|
\item[{char $\ast$}]{buffer, }
|
|
\item[{int}]{size}
|
|
\end{DoxyParamCaption}
|
|
)}}\label{variator__common_8c_ad981c2efab849e76dc878ef8da9d6017}
|
|
Converts a variation object into a string of command line arguments.
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em variation} & Variation object to be converted. \\
|
|
\hline
|
|
{\em config} & Config object for the S\-U\-T. \\
|
|
\hline
|
|
{\em buffer} & Pointer to the buffer the arguments string will be copied into. \\
|
|
\hline
|
|
{\em size} & Size of the buffer.\\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
1 on success, 0 on failure
|
|
\end{DoxyReturn}
|
|
\hypertarget{variator__common_8c_aafcecc06c8feb24b6f6a509bfa9db681}{\index{variator\-\_\-common.\-c@{variator\-\_\-common.\-c}!S\-D\-L\-Visual\-Test\-\_\-\-Next\-Value@{S\-D\-L\-Visual\-Test\-\_\-\-Next\-Value}}
|
|
\index{S\-D\-L\-Visual\-Test\-\_\-\-Next\-Value@{S\-D\-L\-Visual\-Test\-\_\-\-Next\-Value}!variator_common.c@{variator\-\_\-common.\-c}}
|
|
\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Next\-Value}]{\setlength{\rightskip}{0pt plus 5cm}int S\-D\-L\-Visual\-Test\-\_\-\-Next\-Value (
|
|
\begin{DoxyParamCaption}
|
|
\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Option\-Value} $\ast$}]{var, }
|
|
\item[{{\bf S\-D\-L\-Visual\-Test\-\_\-\-S\-U\-T\-Option} $\ast$}]{opt}
|
|
\end{DoxyParamCaption}
|
|
)}}\label{variator__common_8c_aafcecc06c8feb24b6f6a509bfa9db681}
|
|
\char`\"{}\-Increments\char`\"{} the value of the option by one and returns the carry. We wrap around to the initial value on overflow which makes the carry one. For example\-: \char`\"{}incrementing\char`\"{} an S\-D\-L\-\_\-\-F\-A\-L\-S\-E option makes it S\-D\-L\-\_\-\-T\-R\-U\-E with no carry, and \char`\"{}incrementing\char`\"{} an S\-D\-L\-\_\-\-T\-R\-U\-E option makes it S\-D\-L\-\_\-\-F\-A\-L\-S\-E with carry one. For integers, a random value in the valid range for the option is used.
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em var} & Value of the option \\
|
|
\hline
|
|
{\em opt} & Object with metadata about the option\\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
1 if there is a carry for enum and bool type options, 0 otherwise. 1 is always returned for integer and string type options. -\/1 is returned on error.
|
|
\end{DoxyReturn}
|