\doxysection{eina\+\_\+array\+\_\+02.\+c}
\hypertarget{eina_array_02_8c-example}{}\label{eina_array_02_8c-example}
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc\ -\/g\ eina\_array\_02.c\ -\/o\ eina\_array\_02\ \`{}pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <string.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ keep(\textcolor{keywordtype}{void}\ *data,\ \textcolor{keywordtype}{void}\ *gdata\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (strlen((\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}*)data)\ <=\ 5)}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\}}
\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}*\ strs[]\ =\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}one"{}},\ \textcolor{stringliteral}{"{}two"{}},\ \textcolor{stringliteral}{"{}three"{}},\ \textcolor{stringliteral}{"{}four"{}},\ \textcolor{stringliteral}{"{}five"{}},\ \textcolor{stringliteral}{"{}six"{}},\ \textcolor{stringliteral}{"{}seven"{}},\ \textcolor{stringliteral}{"{}eight"{}},\ \textcolor{stringliteral}{"{}nine"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}ten"{}},\ \textcolor{stringliteral}{"{}eleven"{}},\ \textcolor{stringliteral}{"{}twelve"{}},\ \textcolor{stringliteral}{"{}thirteen"{}},\ \textcolor{stringliteral}{"{}fourtenn"{}},\ \textcolor{stringliteral}{"{}fifteen"{}},\ \textcolor{stringliteral}{"{}sixteen"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}seventeen"{}},\ \textcolor{stringliteral}{"{}eighteen"{}},\ \textcolor{stringliteral}{"{}nineteen"{}},\ \textcolor{stringliteral}{"{}twenty"{}}}
\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{\ \ \ \mbox{\hyperlink{struct__Eina__Array}{Eina\_Array}}\ *array;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Array__Group_gaf9af7cd8afa60d6b1cab805bd5b838aa}{Eina\_Array\_Iterator}}\ iterator;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *item;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ i;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ array\ =\ \mbox{\hyperlink{group__Eina__Array__Group_gaf4b5844225b5359a617744210a5ed6ff}{eina\_array\_new}}(10);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ 20;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Eina__Array__Group_ga97ac1fe353f4cd7a9762af4d4db7b9c4}{eina\_array\_push}}(array,\ strs[i]);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Array__Group_gace3c240bf1eab8aee3897a69555abf94}{eina\_array\_clean}}(array);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ 20;\ i++)}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Eina__Array__Group_ga97ac1fe353f4cd7a9762af4d4db7b9c4}{eina\_array\_push}}(array,\ strings[i]);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Array__Group_ga3a813776e908340a6663a6f9fdc70baa}{eina\_array\_data\_set}}(array,\ 17,\ \textcolor{stringliteral}{"{}flattop"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Array__Group_ga1be2b07ef177ba8499c5de24c97d72e0}{eina\_array\_remove}}(array,\ keep,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Array__Group_ga810ed3618ca03f7d549a1bf2c33b2b6e}{EINA\_ARRAY\_ITER\_NEXT}}(array,\ i,\ item,\ iterator)}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}item\ \#\%u:\ \%s\(\backslash\)n"{}},\ i,\ item);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Array__Group_ga7fa7e2cdcfb739140d5c5a5044086ce1}{eina\_array\_free}}(array);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 