
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{00002\ \textcolor{comment}{//\ gcc\ -\/o\ eet-\/data-\/simple\ eet-\/data-\/simple.c\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eet\ eina`}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eet_8h}{Eet.h}}>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <limits.h>}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <sys/types.h>}}
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <sys/stat.h>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <unistd.h>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{comment}{//\ The\ struct\ that\ will\ be\ loaded\ and\ saved.}}
\DoxyCodeLine{00013\ \textcolor{comment}{//\ note\ that\ only\ the\ members\ described\ in\ the\ eet\_data\_descriptor}}
\DoxyCodeLine{00014\ \textcolor{comment}{//\ will\ be\ automatically\ handled.\ The\ other\ members\ will\ have\ their}}
\DoxyCodeLine{00015\ \textcolor{comment}{//\ space\ reserved\ and\ zeroed\ (as\ it\ uses\ calloc()),\ but\ not}}
\DoxyCodeLine{00016\ \textcolor{comment}{//\ saved\ or\ loaded\ from\ eet\ files.}}
\DoxyCodeLine{00017\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00018\ \{}
\DoxyCodeLine{00019\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ version;\ \textcolor{comment}{//\ it\ is\ recommended\ to\ use\ versioned\ configuration!}}
\DoxyCodeLine{00020\ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *name;}
\DoxyCodeLine{00021\ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ id;}
\DoxyCodeLine{00022\ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ not\_saved\_value;\ \textcolor{comment}{//\ example\ of\ not\ saved\ data\ inside!}}
\DoxyCodeLine{00023\ \ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ \ \ \ enabled;}
\DoxyCodeLine{00024\ \}\ My\_Conf\_Type;}
\DoxyCodeLine{00025\ }
\DoxyCodeLine{00026\ \textcolor{comment}{//\ string\ that\ represents\ the\ entry\ in\ eet\ file,\ you\ might\ like\ to\ have}}
\DoxyCodeLine{00027\ \textcolor{comment}{//\ different\ profiles\ or\ so\ in\ the\ same\ file,\ this\ is\ possible\ with}}
\DoxyCodeLine{00028\ \textcolor{comment}{//\ different\ strings}}
\DoxyCodeLine{00029\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ MY\_CONF\_FILE\_ENTRY[]\ =\ \textcolor{stringliteral}{"{}config"{}};}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ \textcolor{comment}{//\ keep\ the\ descriptor\ static\ global,\ so\ it\ can\ be}}
\DoxyCodeLine{00032\ \textcolor{comment}{//\ shared\ by\ different\ functions\ (load/save)\ of\ this\ and\ only\ this}}
\DoxyCodeLine{00033\ \textcolor{comment}{//\ file.}}
\DoxyCodeLine{00034\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}}\ *\_my\_conf\_descriptor;}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00037\ \_my\_conf\_descriptor\_init(\textcolor{keywordtype}{void})}
\DoxyCodeLine{00038\ \{}
\DoxyCodeLine{00039\ \ \ \ \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}}\ eddc;}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00041\ \ \ \ \textcolor{comment}{//\ The\ class\ describe\ the\ functions\ to\ use\ to\ create\ the\ type\ and\ its}}
\DoxyCodeLine{00042\ \ \ \ \textcolor{comment}{//\ full\ allocated\ size.}}
\DoxyCodeLine{00043\ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{00044\ \ \ \ \textcolor{comment}{//\ Eina\ types\ are\ very\ convenient,\ so\ use\ them\ to\ create\ the\ descriptor,}}
\DoxyCodeLine{00045\ \ \ \ \textcolor{comment}{//\ so\ we\ get\ eina\_list,\ \ eina\_hash\ and\ eina\_stringshare\ automatically!}}
\DoxyCodeLine{00046\ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{00047\ \ \ \ \textcolor{comment}{//\ The\ STREAM\ variant\ is\ better\ for\ configuration\ files\ as\ the\ values}}
\DoxyCodeLine{00048\ \ \ \ \textcolor{comment}{//\ will\ likely\ change\ a\ lot.}}
\DoxyCodeLine{00049\ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{00050\ \ \ \ \textcolor{comment}{//\ The\ other\ variant,\ FILE,\ is\ good\ for\ caches\ and\ things\ that\ are\ just}}
\DoxyCodeLine{00051\ \ \ \ \textcolor{comment}{//\ appended,\ but\ needs\ to\ take\ care\ when\ changing\ strings\ and\ files\ must}}
\DoxyCodeLine{00052\ \ \ \ \textcolor{comment}{//\ be\ kept\ open\ so\ mmap()ed\ strings\ will\ be\ kept\ alive.}}
\DoxyCodeLine{00053\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga941b1fcd6c6c72221d9390f9a0ed751c}{EET\_EINA\_STREAM\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc,\ My\_Conf\_Type);}
\DoxyCodeLine{00054\ \ \ \ \_my\_conf\_descriptor\ =\ \mbox{\hyperlink{group__Eet__Data__Group_ga5c2ad8edc9910f201b0dcbdbc5cc2694}{eet\_data\_descriptor\_stream\_new}}(\&eddc);}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ \ \ \ \textcolor{comment}{//\ Describe\ the\ members\ to\ be\ saved:}}
\DoxyCodeLine{00057\ \ \ \ \textcolor{comment}{//\ Use\ a\ temporary\ macro\ so\ we\ don't\ type\ a\ lot,\ also\ avoid\ errors:}}
\DoxyCodeLine{00058\ \textcolor{preprocessor}{\#define\ MY\_CONF\_ADD\_BASIC(member,\ eet\_type)\ \(\backslash\)}}
\DoxyCodeLine{00059\ \textcolor{preprocessor}{\ \ EET\_DATA\_DESCRIPTOR\_ADD\_BASIC\ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00060\ \textcolor{preprocessor}{\ \ \ \ (\_my\_conf\_descriptor,\ My\_Conf\_Type,\ \#\ member,\ member,\ eet\_type)}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \ \ \ MY\_CONF\_ADD\_BASIC(version,\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{00063\ \ \ \ MY\_CONF\_ADD\_BASIC(name,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{00064\ \ \ \ MY\_CONF\_ADD\_BASIC(\textcolor{keywordtype}{id},\ \mbox{\hyperlink{group__Eet__Data__Group_ga4e196733795867f14c6e387af7287baa}{EET\_T\_INT}});}
\DoxyCodeLine{00065\ \ \ \ MY\_CONF\_ADD\_BASIC(enabled,\ \mbox{\hyperlink{group__Eet__Data__Group_ga09a1341cc158fda0ba60ad2386ecd795}{EET\_T\_UCHAR}});}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \textcolor{preprocessor}{\#undef\ MY\_CONF\_ADD\_BASIC}}
\DoxyCodeLine{00068\ \}\ \textcolor{comment}{/*\ \_my\_conf\_descriptor\_init\ */}}
\DoxyCodeLine{00069\ }
\DoxyCodeLine{00070\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00071\ \_my\_conf\_descriptor\_shutdown(\textcolor{keywordtype}{void})}
\DoxyCodeLine{00072\ \{}
\DoxyCodeLine{00073\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_my\_conf\_descriptor);}
\DoxyCodeLine{00074\ \}\ \textcolor{comment}{/*\ \_my\_conf\_descriptor\_shutdown\ */}}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \textcolor{keyword}{static}\ My\_Conf\_Type\ *}
\DoxyCodeLine{00077\ \_my\_conf\_new(\textcolor{keywordtype}{void})}
\DoxyCodeLine{00078\ \{}
\DoxyCodeLine{00079\ \ \ \ My\_Conf\_Type\ *my\_conf\ =\ calloc(1,\ \textcolor{keyword}{sizeof}(My\_Conf\_Type));}
\DoxyCodeLine{00080\ \ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{00081\ \ \ \ \ \ \{}
\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ calloc\ My\_Conf\_Type\(\backslash\)n"{}});}
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{00084\ \ \ \ \ \ \}}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \ \ \ my\_conf-\/>version\ =\ 0x112233;}
\DoxyCodeLine{00087\ \ \ \ my\_conf-\/>enabled\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{00088\ \ \ \ \textcolor{keywordflow}{return}\ my\_conf;}
\DoxyCodeLine{00089\ \}\ \textcolor{comment}{/*\ \_my\_conf\_new\ */}}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00092\ \_my\_conf\_free(My\_Conf\_Type\ *my\_conf)}
\DoxyCodeLine{00093\ \{}
\DoxyCodeLine{00094\ \ \ \ \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5538b4a134987b8a01744fad1a845ba4}{eina\_stringshare\_del}}(my\_conf-\/>name);}
\DoxyCodeLine{00095\ \ \ \ free(my\_conf);}
\DoxyCodeLine{00096\ \}\ \textcolor{comment}{/*\ \_my\_conf\_free\ */}}
\DoxyCodeLine{00097\ }
\DoxyCodeLine{00098\ \textcolor{keyword}{static}\ My\_Conf\_Type\ *}
\DoxyCodeLine{00099\ \_my\_conf\_load(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *filename)}
\DoxyCodeLine{00100\ \{}
\DoxyCodeLine{00101\ \ \ \ My\_Conf\_Type\ *my\_conf;}
\DoxyCodeLine{00102\ \ \ \ \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{00103\ \ \ \ \textcolor{keywordflow}{if}\ (!ef)}
\DoxyCodeLine{00104\ \ \ \ \ \ \{}
\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ open\ '\%s'\ for\ read\(\backslash\)n"{}},\ filename);}
\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{00107\ \ \ \ \ \ \}}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00109\ \ \ \ my\_conf\ =\ \mbox{\hyperlink{group__Eet__Data__Group_ga4c09f4dfb051baabc0c0551ea98b6830}{eet\_data\_read}}(ef,\ \_my\_conf\_descriptor,\ MY\_CONF\_FILE\_ENTRY);}
\DoxyCodeLine{00110\ \ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{00111\ \ \ \ \ \ \textcolor{keywordflow}{goto}\ end;}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ \ \ \ \textcolor{keywordflow}{if}\ (my\_conf-\/>version\ <\ 0x112233)}
\DoxyCodeLine{00114\ \ \ \ \ \ \{}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ fprintf(stderr,}
\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}WARNING:\ version\ \%\#x\ was\ too\ old,\ upgrading\ it\ to\ \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ my\_conf-\/>version,\ 0x112233);}
\DoxyCodeLine{00118\ }
\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ my\_conf-\/>version\ =\ 0x112233;}
\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ my\_conf-\/>enabled\ =\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{00121\ \ \ \ \ \ \}}
\DoxyCodeLine{00122\ }
\DoxyCodeLine{00123\ end:}
\DoxyCodeLine{00124\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{00125\ \ \ \ \textcolor{keywordflow}{return}\ my\_conf;}
\DoxyCodeLine{00126\ \}\ \textcolor{comment}{/*\ \_my\_conf\_load\ */}}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00128\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{00129\ \_my\_conf\_save(\textcolor{keyword}{const}\ My\_Conf\_Type\ *my\_conf,}
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ \ \ \ \ \ \ \ *filename)}
\DoxyCodeLine{00131\ \{}
\DoxyCodeLine{00132\ \ \ \ \textcolor{keywordtype}{char}\ tmp[PATH\_MAX];}
\DoxyCodeLine{00133\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *ef;}
\DoxyCodeLine{00134\ \ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ ret;}
\DoxyCodeLine{00135\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ i,\ len;}
\DoxyCodeLine{00136\ \ \ \ \textcolor{keyword}{struct\ }stat\ st;}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00138\ \ \ \ len\ =\ \mbox{\hyperlink{group__Eina__String__Group_gae28caa0c42c4e76ae584f22bd3615723}{eina\_strlcpy}}(tmp,\ filename,\ \textcolor{keyword}{sizeof}(tmp));}
\DoxyCodeLine{00139\ \ \ \ \textcolor{keywordflow}{if}\ (len\ +\ 12\ >=\ (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(tmp))}
\DoxyCodeLine{00140\ \ \ \ \ \ \{}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ file\ name\ is\ too\ big:\ \%s\(\backslash\)n"{}},\ filename);}
\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{00143\ \ \ \ \ \ \}}
\DoxyCodeLine{00144\ }
\DoxyCodeLine{00145\ \ \ \ i\ =\ 0;}
\DoxyCodeLine{00146\ \ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{00147\ \ \ \ \ \ \{}
\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ snprintf(tmp\ +\ len,\ 12,\ \textcolor{stringliteral}{"{}.\%u"{}},\ i);}
\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ i++;}
\DoxyCodeLine{00150\ \ \ \ \ \ \}}
\DoxyCodeLine{00151\ \ \ \ \textcolor{keywordflow}{while}\ (stat(tmp,\ \&st)\ ==\ 0);}
\DoxyCodeLine{00152\ }
\DoxyCodeLine{00153\ \ \ \ ef\ =\ \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(tmp,\ \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9}{EET\_FILE\_MODE\_WRITE}});}
\DoxyCodeLine{00154\ \ \ \ \textcolor{keywordflow}{if}\ (!ef)}
\DoxyCodeLine{00155\ \ \ \ \ \ \{}
\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ open\ '\%s'\ for\ write\(\backslash\)n"{}},\ tmp);}
\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{00158\ \ \ \ \ \ \}}
\DoxyCodeLine{00159\ }
\DoxyCodeLine{00160\ \ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__Data__Group_gac66d1c49e3490bc5d803982d833ff8aa}{eet\_data\_write}}}
\DoxyCodeLine{00161\ \ \ \ \ \ \ \ (ef,\ \_my\_conf\_descriptor,\ MY\_CONF\_FILE\_ENTRY,\ my\_conf,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{00162\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{00163\ }
\DoxyCodeLine{00164\ \ \ \ \textcolor{keywordflow}{if}\ (ret)}
\DoxyCodeLine{00165\ \ \ \ \ \ \{}
\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ unlink(filename);}
\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ rename(tmp,\ filename);}
\DoxyCodeLine{00168\ \ \ \ \ \ \}}
\DoxyCodeLine{00169\ }
\DoxyCodeLine{00170\ \ \ \ \textcolor{keywordflow}{return}\ ret;}
\DoxyCodeLine{00171\ \}\ \textcolor{comment}{/*\ \_my\_conf\_save\ */}}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00173\ \textcolor{keywordtype}{int}}
\DoxyCodeLine{00174\ main(\textcolor{keywordtype}{int}\ \ \ argc,}
\DoxyCodeLine{00175\ \ \ \ \ \ \textcolor{keywordtype}{char}\ *argv[])}
\DoxyCodeLine{00176\ \{}
\DoxyCodeLine{00177\ \ \ \ My\_Conf\_Type\ *my\_conf;}
\DoxyCodeLine{00178\ \ \ \ \textcolor{keywordtype}{int}\ ret\ =\ 0;}
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00180\ \ \ \ \textcolor{keywordflow}{if}\ (argc\ !=\ 3)}
\DoxyCodeLine{00181\ \ \ \ \ \ \{}
\DoxyCodeLine{00182\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}Usage:\(\backslash\)n\(\backslash\)t\%s\ <input>\ <output>\(\backslash\)n\(\backslash\)n"{}},\ argv[0]);}
\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{00184\ \ \ \ \ \ \}}
\DoxyCodeLine{00185\ }
\DoxyCodeLine{00186\ \ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{00187\ \ \ \ \mbox{\hyperlink{group__Eet__Group_ga9903687bfa20fe9a9e59d4c1d213e89a}{eet\_init}}();}
\DoxyCodeLine{00188\ \ \ \ \_my\_conf\_descriptor\_init();}
\DoxyCodeLine{00189\ }
\DoxyCodeLine{00190\ \ \ \ my\_conf\ =\ \_my\_conf\_load(argv[1]);}
\DoxyCodeLine{00191\ \ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{00192\ \ \ \ \ \ \{}
\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}creating\ new\ configuration.\(\backslash\)n"{}});}
\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ my\_conf\ =\ \_my\_conf\_new();}
\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!my\_conf)}
\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ \ \ \ \ \ ret\ =\ -\/2;}
\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ end;}
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00200\ \ \ \ \ \ \}}
\DoxyCodeLine{00201\ }
\DoxyCodeLine{00202\ \ \ \ printf(\textcolor{stringliteral}{"{}My\_Conf\_Type:\(\backslash\)n"{}}}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tversion:\ \%\#x\(\backslash\)n"{}}}
\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tname...:\ '\%s'\(\backslash\)n"{}}}
\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tid.....:\ \%d\(\backslash\)n"{}}}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tenabled:\ \%hhu\(\backslash\)n"{}},}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \ \ my\_conf-\/>version,}
\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \ \ my\_conf-\/>name\ ?\ my\_conf-\/>name\ :\ \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \ \ my\_conf-\/>id,}
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ my\_conf-\/>enabled);}
\DoxyCodeLine{00211\ }
\DoxyCodeLine{00212\ \ \ \ \textcolor{keywordflow}{if}\ (!\_my\_conf\_save(my\_conf,\ argv[2]))}
\DoxyCodeLine{00213\ \ \ \ \ \ ret\ =\ -\/3;}
\DoxyCodeLine{00214\ }
\DoxyCodeLine{00215\ \ \ \ \_my\_conf\_free(my\_conf);}
\DoxyCodeLine{00216\ }
\DoxyCodeLine{00217\ end:}
\DoxyCodeLine{00218\ \ \ \ \_my\_conf\_descriptor\_shutdown();}
\DoxyCodeLine{00219\ \ \ \ \mbox{\hyperlink{group__Eet__Group_gacbc7583179399d3b3e7b003e911f866f}{eet\_shutdown}}();}
\DoxyCodeLine{00220\ \ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{00221\ }
\DoxyCodeLine{00222\ \ \ \ \textcolor{keywordflow}{return}\ ret;}
\DoxyCodeLine{00223\ \}\ \textcolor{comment}{/*\ main\ */}}
\DoxyCodeLine{00224\ }

\end{DoxyCodeInclude}
 