\hypertarget{eina_list_03_8c-example}{}\doxysection{eina\+\_\+list\+\_\+03.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc -\/g eina\_list\_03.c -\/o eina\_list\_03 `pkg-\/config -\/-\/cflags -\/-\/libs eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   (void)argc;}
\DoxyCodeLine{   (void)argv;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *list = NULL, *r\_list;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *l;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__Iterator}{Eina\_Iterator}} *itr;}
\DoxyCodeLine{   \textcolor{keywordtype}{void} *list\_data;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_gafee4bfc0e509b6ffed6598edf6f4b3de}{eina\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"caprica"});}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"sagittarius"});}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"aerilon"});}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"gemenon"});}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga1037e7ab9d39bece24d864526332828c}{eina\_list\_promote\_list}}(list, \mbox{\hyperlink{group__Eina__List__Group_gad4a1e3b0fdecd8ed4cb2ff592ceeb553}{eina\_list\_nth\_list}}(list, 2));}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga082644881a2333bd16208c00931703cd}{eina\_list\_demote\_list}}(list, \mbox{\hyperlink{group__Eina__List__Group_gad4a1e3b0fdecd8ed4cb2ff592ceeb553}{eina\_list\_nth\_list}}(list, 2));}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga7c0c6e07aa592a1cb2e010049a718035}{eina\_list\_remove}}(list, \textcolor{stringliteral}{"sagittarius"});}
\DoxyCodeLine{}
\DoxyCodeLine{   l = \mbox{\hyperlink{group__Eina__List__Group_ga860144725b63d93b8f84cdf1d816bda8}{eina\_list\_data\_find\_list}}(list, \textcolor{stringliteral}{"aerilon"});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_ga213776ffa28b780440da26f673917687}{eina\_list\_data\_set}}(l, \textcolor{stringliteral}{"aquarius"});}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"size: \%d\(\backslash\)n"}, \mbox{\hyperlink{group__Eina__List__Group_ga301729054a498a2df09a5f1dd760697e}{eina\_list\_count}}(list));}
\DoxyCodeLine{}
\DoxyCodeLine{   r\_list = \mbox{\hyperlink{group__Eina__List__Group_ga67cb29eef0bf0a3cb2cc160ae506a07f}{eina\_list\_reverse\_clone}}(list);}
\DoxyCodeLine{}
\DoxyCodeLine{   itr = \mbox{\hyperlink{group__Eina__List__Group_gabcfb6a861aa7c0db0ee36252ac2a254d}{eina\_list\_iterator\_new}}(r\_list);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}{EINA\_ITERATOR\_FOREACH}}(itr, list\_data)}
\DoxyCodeLine{     printf(\textcolor{stringliteral}{"\%s\(\backslash\)n"}, (\textcolor{keywordtype}{char}*)list\_data);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Iterator__Group_gaf9261991a4b05dc63e3401278a3281f8}{eina\_iterator\_free}}(itr);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_ga608bd2fbf06293a1b794648990703ab4}{eina\_list\_free}}(list);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_ga608bd2fbf06293a1b794648990703ab4}{eina\_list\_free}}(r\_list);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_ga2c8b4020427108a30c44707af22c99d3}{eina\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}
\end{DoxyCodeInclude}
 