\hypertarget{eina_inarray_02_8c-example}{}\doxysection{eina\+\_\+inarray\+\_\+02.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc\ -\/g\ eina\_inarray\_02.c\ -\/o\ eina\_inarray\_02\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{int}\ argc\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keywordtype}{char}\ **argv\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*\ strings[]\ =\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}helo"{}},\ \textcolor{stringliteral}{"{}hera"{}},\ \textcolor{stringliteral}{"{}starbuck"{}},\ \textcolor{stringliteral}{"{}kat"{}},\ \textcolor{stringliteral}{"{}boomer"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}hotdog"{}},\ \textcolor{stringliteral}{"{}longshot"{}},\ \textcolor{stringliteral}{"{}jammer"{}},\ \textcolor{stringliteral}{"{}crashdown"{}},\ \textcolor{stringliteral}{"{}hardball"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}duck"{}},\ \textcolor{stringliteral}{"{}racetrack"{}},\ \textcolor{stringliteral}{"{}apolo"{}},\ \textcolor{stringliteral}{"{}husker"{}},\ \textcolor{stringliteral}{"{}freaker"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}skulls"{}},\ \textcolor{stringliteral}{"{}bulldog"{}},\ \textcolor{stringliteral}{"{}flat\ top"{}},\ \textcolor{stringliteral}{"{}hammerhead"{}},\ \textcolor{stringliteral}{"{}gonzo"{}}}
\DoxyCodeLine{\ \ \ \};}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ **str,\ **str2;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__Inarray}{Eina\_Inarray}}\ *iarr;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ i;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{\ \ \ iarr\ =\ \mbox{\hyperlink{group__Eina__Inline__Array__Group_gab90ef5e018c9e18341d5057254fd2f5b}{eina\_inarray\_new}}(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{char}\ *),\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ 20;\ i++)\{}
\DoxyCodeLine{\ \ \ \ \ str\ =\ (\textcolor{keywordtype}{char}\ **)(\&strings[i]);}
\DoxyCodeLine{\ \ \ \ \ \ \mbox{\hyperlink{group__Eina__Inline__Array__Group_ga1546c690e7e63307af20f7ac3db1b095}{eina\_inarray\_push}}(iarr,\ str);}
\DoxyCodeLine{\ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Inline\ array\ of\ strings:\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Inline__Array__Group_gab6ffcad27b5099aa34af9ecd5e2b22f9}{EINA\_INARRAY\_FOREACH}}(iarr,\ str2)}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}string:\ \%s(pointer:\ \%p)\(\backslash\)n"{}},\ *str2,\ str2);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Inline__Array__Group_ga030924ac7ef1ce357b328e4a40e5f77f}{eina\_inarray\_free}}(iarr);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 