
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc -\/g eina\_iterator\_01.c -\/o eina\_iterator\_01 `pkg-\/config -\/-\/cflags -\/-\/libs eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{print\_one(\textcolor{keyword}{const} \textcolor{keywordtype}{void} *container \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{void} *data, \textcolor{keywordtype}{void} *fdata \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, (\textcolor{keywordtype}{char}*)data);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{print\_eina\_container(\mbox{\hyperlink{struct__Eina__Iterator}{Eina\_Iterator}} *it)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Iterator__Group_gad9b7adc8db40a640d03e9bc4a5d52370}{eina\_iterator\_foreach}}(it, print\_one, NULL);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\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} *strings[] = \{}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}unintersting string"{}}, \textcolor{stringliteral}{"{}husker"{}}, \textcolor{stringliteral}{"{}starbuck"{}}, \textcolor{stringliteral}{"{}husker"{}}}
\DoxyCodeLine{   \};}
\DoxyCodeLine{   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *more\_strings[] = \{}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}very unintersting string"{}},}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}what do your hear?"{}},}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}nothing but the rain"{}},}
\DoxyCodeLine{      \textcolor{stringliteral}{"{}then grab your gun and bring the cat in"{}}}
\DoxyCodeLine{   \};}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Array}{Eina\_Array}} *array;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *list = NULL;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Iterator}{Eina\_Iterator}} *it;}
\DoxyCodeLine{   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{   \textcolor{keywordtype}{char} *uninteresting;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_gafee4bfc0e509b6ffed6598edf6f4b3de}{eina\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   array = \mbox{\hyperlink{group__Eina__Array__Group_gad671e356ded4049ccff24cc46f6f6f43}{eina\_array\_new}}(4);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{for} (i = 0; i < 4; i++)}
\DoxyCodeLine{      \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__Array__Group_ga97ac1fe353f4cd7a9762af4d4db7b9c4}{eina\_array\_push}}(array, strings[i]);}
\DoxyCodeLine{        list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, more\_strings[i]);}
\DoxyCodeLine{      \}}
\DoxyCodeLine{}
\DoxyCodeLine{   it = \mbox{\hyperlink{group__Eina__Array__Group_ga444c58bd06ac5a6f62ff4f30701701aa}{eina\_array\_iterator\_new}}(array);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\_iterator\_next}}(it, (\textcolor{keywordtype}{void} **)\&uninteresting))}
\DoxyCodeLine{     \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{   print\_eina\_container(it);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Array__Group_gaee9eb6a413ab294a5d69771f14cf3543}{eina\_array\_free}}(\mbox{\hyperlink{group__Eina__Iterator__Group_ga5583ab703b156f74f0c2a74875c95cc2}{eina\_iterator\_container\_get}}(it));}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\_iterator\_free}}(it);}
\DoxyCodeLine{}
\DoxyCodeLine{   it = \mbox{\hyperlink{group__Eina__List__Group_gabcfb6a861aa7c0db0ee36252ac2a254d}{eina\_list\_iterator\_new}}(list);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\_iterator\_next}}(it, (\textcolor{keywordtype}{void} **)\&uninteresting))}
\DoxyCodeLine{     \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{   print\_eina\_container(it);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\_iterator\_free}}(it);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_ga608bd2fbf06293a1b794648990703ab4}{eina\_list\_free}}(list);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_ga2c8b4020427108a30c44707af22c99d3}{eina\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 