\hypertarget{eet-data-simple_8c-example}{}\doxysection{eet-\/data-\/simple.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{\textcolor{comment}{//\ gcc\ -\/o\ eet-\/data-\/simple\ eet-\/data-\/simple.c\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eet\ eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eet_8h}{Eet.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <limits.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <sys/types.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <sys/stat.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <unistd.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ The\ struct\ that\ will\ be\ loaded\ and\ saved.}}
\DoxyCodeLine{\textcolor{comment}{//\ note\ that\ only\ the\ members\ described\ in\ the\ eet\_data\_descriptor}}
\DoxyCodeLine{\textcolor{comment}{//\ will\ be\ automatically\ handled.\ The\ other\ members\ will\ have\ their}}
\DoxyCodeLine{\textcolor{comment}{//\ space\ reserved\ and\ zeroed\ (as\ it\ uses\ calloc()),\ but\ not}}
\DoxyCodeLine{\textcolor{comment}{//\ saved\ or\ loaded\ from\ eet\ files.}}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ version;\ \textcolor{comment}{//\ it\ is\ recommended\ to\ use\ versioned\ configuration!}}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *name;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ id;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ not\_saved\_value;\ \textcolor{comment}{//\ example\ of\ not\ saved\ data\ inside!}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ \ \ \ enabled;}
\DoxyCodeLine{\}\ My\_Conf\_Type;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ string\ that\ represents\ the\ entry\ in\ eet\ file,\ you\ might\ like\ to\ have}}
\DoxyCodeLine{\textcolor{comment}{//\ different\ profiles\ or\ so\ in\ the\ same\ file,\ this\ is\ possible\ with}}
\DoxyCodeLine{\textcolor{comment}{//\ different\ strings}}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ MY\_CONF\_FILE\_ENTRY[]\ =\ \textcolor{stringliteral}{"{}config"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{//\ keep\ the\ descriptor\ static\ global,\ so\ it\ can\ be}}
\DoxyCodeLine{\textcolor{comment}{//\ shared\ by\ different\ functions\ (load/save)\ of\ this\ and\ only\ this}}
\DoxyCodeLine{\textcolor{comment}{//\ file.}}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}}\ *\_my\_conf\_descriptor;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_my\_conf\_descriptor\_init(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}}\ eddc;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ The\ class\ describe\ the\ functions\ to\ use\ to\ create\ the\ type\ and\ its}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ full\ allocated\ size.}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ Eina\ types\ are\ very\ convenient,\ so\ use\ them\ to\ create\ the\ descriptor,}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ so\ we\ get\ eina\_list,\ \ eina\_hash\ and\ eina\_stringshare\ automatically!}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ The\ STREAM\ variant\ is\ better\ for\ configuration\ files\ as\ the\ values}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ will\ likely\ change\ a\ lot.}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ The\ other\ variant,\ FILE,\ is\ good\ for\ caches\ and\ things\ that\ are\ just}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ appended,\ but\ needs\ to\ take\ care\ when\ changing\ strings\ and\ files\ must}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ be\ kept\ open\ so\ mmap()ed\ strings\ will\ be\ kept\ alive.}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga941b1fcd6c6c72221d9390f9a0ed751c}{EET\_EINA\_STREAM\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc,\ My\_Conf\_Type);}
\DoxyCodeLine{\ \ \ \_my\_conf\_descriptor\ =\ \mbox{\hyperlink{group__Eet__Data__Group_ga5c2ad8edc9910f201b0dcbdbc5cc2694}{eet\_data\_descriptor\_stream\_new}}(\&eddc);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ Describe\ the\ members\ to\ be\ saved:}}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ Use\ a\ temporary\ macro\ so\ we\ don't\ type\ a\ lot,\ also\ avoid\ errors:}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define\ MY\_CONF\_ADD\_BASIC(member,\ eet\_type)\ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ EET\_DATA\_DESCRIPTOR\_ADD\_BASIC\ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{\textcolor{preprocessor}{\ \ \ \ (\_my\_conf\_descriptor,\ My\_Conf\_Type,\ \#\ member,\ member,\ eet\_type)}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ MY\_CONF\_ADD\_BASIC(version,\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{\ \ \ MY\_CONF\_ADD\_BASIC(name,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{\ \ \ MY\_CONF\_ADD\_BASIC(\textcolor{keywordtype}{id},\ \mbox{\hyperlink{group__Eet__Data__Group_ga4e196733795867f14c6e387af7287baa}{EET\_T\_INT}});}
\DoxyCodeLine{\ \ \ MY\_CONF\_ADD\_BASIC(enabled,\ \mbox{\hyperlink{group__Eet__Data__Group_ga09a1341cc158fda0ba60ad2386ecd795}{EET\_T\_UCHAR}});}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#undef\ MY\_CONF\_ADD\_BASIC}}
\DoxyCodeLine{\}\ \textcolor{comment}{/*\ \_my\_conf\_descriptor\_init\ */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_my\_conf\_descriptor\_shutdown(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_my\_conf\_descriptor);}
\DoxyCodeLine{\}\ \textcolor{comment}{/*\ \_my\_conf\_descriptor\_shutdown\ */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ My\_Conf\_Type\ *}
\DoxyCodeLine{\_my\_conf\_new(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ My\_Conf\_Type\ *my\_conf\ =\ calloc(1,\ \textcolor{keyword}{sizeof}(My\_Conf\_Type));}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ calloc\ My\_Conf\_Type\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ my\_conf-\/>version\ =\ 0x112233;}
\DoxyCodeLine{\ \ \ my\_conf-\/>enabled\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ my\_conf;}
\DoxyCodeLine{\}\ \textcolor{comment}{/*\ \_my\_conf\_new\ */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_my\_conf\_free(My\_Conf\_Type\ *my\_conf)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5538b4a134987b8a01744fad1a845ba4}{eina\_stringshare\_del}}(my\_conf-\/>name);}
\DoxyCodeLine{\ \ \ free(my\_conf);}
\DoxyCodeLine{\}\ \textcolor{comment}{/*\ \_my\_conf\_free\ */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ My\_Conf\_Type\ *}
\DoxyCodeLine{\_my\_conf\_load(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *filename)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ My\_Conf\_Type\ *my\_conf;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *ef\ =\ \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(filename,\ \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81}{EET\_FILE\_MODE\_READ}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!ef)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ open\ '\%s'\ for\ read\(\backslash\)n"{}},\ filename);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ my\_conf\ =\ \mbox{\hyperlink{group__Eet__Data__Group_ga4c09f4dfb051baabc0c0551ea98b6830}{eet\_data\_read}}(ef,\ \_my\_conf\_descriptor,\ MY\_CONF\_FILE\_ENTRY);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{goto}\ end;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (my\_conf-\/>version\ <\ 0x112233)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}WARNING:\ version\ \%\#x\ was\ too\ old,\ upgrading\ it\ to\ \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ my\_conf-\/>version,\ 0x112233);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ my\_conf-\/>version\ =\ 0x112233;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ my\_conf-\/>enabled\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{end:}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ my\_conf;}
\DoxyCodeLine{\}\ \textcolor{comment}{/*\ \_my\_conf\_load\ */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_my\_conf\_save(\textcolor{keyword}{const}\ My\_Conf\_Type\ *my\_conf,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ \ \ \ \ \ \ \ *filename)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ tmp[PATH\_MAX];}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *ef;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ ret;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ i,\ len;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{struct\ }stat\ st;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ len\ =\ \mbox{\hyperlink{group__Eina__String__Group_gae28caa0c42c4e76ae584f22bd3615723}{eina\_strlcpy}}(tmp,\ filename,\ \textcolor{keyword}{sizeof}(tmp));}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (len\ +\ 12\ >=\ (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(tmp))}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ file\ name\ is\ too\ big:\ \%s\(\backslash\)n"{}},\ filename);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ i\ =\ 0;}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ snprintf(tmp\ +\ len,\ 12,\ \textcolor{stringliteral}{"{}.\%u"{}},\ i);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ i++;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{while}\ (stat(tmp,\ \&st)\ ==\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ef\ =\ \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(tmp,\ \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9}{EET\_FILE\_MODE\_WRITE}});}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!ef)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ open\ '\%s'\ for\ write\(\backslash\)n"{}},\ tmp);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__Data__Group_gac66d1c49e3490bc5d803982d833ff8aa}{eet\_data\_write}}}
\DoxyCodeLine{\ \ \ \ \ \ \ (ef,\ \_my\_conf\_descriptor,\ MY\_CONF\_FILE\_ENTRY,\ my\_conf,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ret)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ unlink(filename);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ rename(tmp,\ filename);}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ ret;}
\DoxyCodeLine{\}\ \textcolor{comment}{/*\ \_my\_conf\_save\ */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{int}\ \ \ argc,}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordtype}{char}\ *argv[])}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ My\_Conf\_Type\ *my\_conf;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ ret\ =\ 0;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (argc\ !=\ 3)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Usage:\(\backslash\)n\(\backslash\)t\%s\ <input>\ <output>\(\backslash\)n\(\backslash\)n"{}},\ argv[0]);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__Group_ga9903687bfa20fe9a9e59d4c1d213e89a}{eet\_init}}();}
\DoxyCodeLine{\ \ \ \_my\_conf\_descriptor\_init();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ my\_conf\ =\ \_my\_conf\_load(argv[1]);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{\ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}creating\ new\ configuration.\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \ \ \ \ \ my\_conf\ =\ \_my\_conf\_new();}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ ret\ =\ -\/2;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ end;}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \ \}}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}My\_Conf\_Type:\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tversion:\ \%\#x\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tname...:\ '\%s'\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tid.....:\ \%d\(\backslash\)n"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tenabled:\ \%hhu\(\backslash\)n"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ my\_conf-\/>version,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ my\_conf-\/>name\ ?\ my\_conf-\/>name\ :\ \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ my\_conf-\/>id,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ my\_conf-\/>enabled);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (!\_my\_conf\_save(my\_conf,\ argv[2]))}
\DoxyCodeLine{\ \ \ \ \ ret\ =\ -\/3;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \_my\_conf\_free(my\_conf);}
\DoxyCodeLine{}
\DoxyCodeLine{end:}
\DoxyCodeLine{\ \ \ \_my\_conf\_descriptor\_shutdown();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__Group_gacbc7583179399d3b3e7b003e911f866f}{eet\_shutdown}}();}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ ret;}
\DoxyCodeLine{\}\ \textcolor{comment}{/*\ main\ */}}
\DoxyCodeLine{}

\end{DoxyCodeInclude}
 