
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{00002\ \textcolor{comment}{//\ gcc\ -\/o\ eet-\/basic\ eet-\/basic.c\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eet`}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eet_8h}{Eet.h}}>}}
\DoxyCodeLine{00005\ }
\DoxyCodeLine{00006\ \textcolor{keywordtype}{int}}
\DoxyCodeLine{00007\ main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{00008\ \{}
\DoxyCodeLine{00009\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *ef;}
\DoxyCodeLine{00010\ \ \ \ \textcolor{keywordtype}{char}\ *ret;}
\DoxyCodeLine{00011\ \ \ \ \textcolor{keywordtype}{int}\ size;}
\DoxyCodeLine{00012\ \ \ \ \textcolor{keywordtype}{char}\ *entries[]\ =}
\DoxyCodeLine{00013\ \ \ \ \{}
\DoxyCodeLine{00014\ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Entry\ 1"{}},}
\DoxyCodeLine{00015\ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Big\ text\ string\ here\ compared\ to\ others"{}},}
\DoxyCodeLine{00016\ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Eet\ is\ cool"{}}}
\DoxyCodeLine{00017\ \ \ \ \};}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ \ \ \ \mbox{\hyperlink{group__Eet__Group_ga9903687bfa20fe9a9e59d4c1d213e89a}{eet\_init}}();}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ \ \ \ \textcolor{comment}{//\ blindly\ open\ an\ file\ for\ output\ and\ write\ strings\ with\ their\ NUL\ char}}
\DoxyCodeLine{00022\ \ \ \ ef\ =\ \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(\textcolor{stringliteral}{"{}test.eet"{}},\ \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9}{EET\_FILE\_MODE\_WRITE}});}
\DoxyCodeLine{00023\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 1"{}},\ entries[0],\ strlen(entries[0])\ +\ 1,\ 0);}
\DoxyCodeLine{00024\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 2"{}},\ entries[1],\ strlen(entries[1])\ +\ 1,\ 1);}
\DoxyCodeLine{00025\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 3"{}},\ entries[2],\ strlen(entries[2])\ +\ 1,\ 0);}
\DoxyCodeLine{00026\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \ \ \ \textcolor{comment}{//\ open\ the\ file\ again\ and\ blindly\ get\ the\ entries\ we\ wrote}}
\DoxyCodeLine{00029\ \ \ \ ef\ =\ \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(\textcolor{stringliteral}{"{}test.eet"{}},\ \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81}{EET\_FILE\_MODE\_READ}});}
\DoxyCodeLine{00030\ \ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 1"{}},\ \&size);}
\DoxyCodeLine{00031\ \ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ ret);}
\DoxyCodeLine{00032\ \ \ \ free(ret);}
\DoxyCodeLine{00033\ \ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 2"{}},\ \&size);}
\DoxyCodeLine{00034\ \ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ ret);}
\DoxyCodeLine{00035\ \ \ \ free(ret);}
\DoxyCodeLine{00036\ \ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 3"{}},\ \&size);}
\DoxyCodeLine{00037\ \ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ ret);}
\DoxyCodeLine{00038\ \ \ \ free(ret);}
\DoxyCodeLine{00039\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00041\ \ \ \ \mbox{\hyperlink{group__Eet__Group_gacbc7583179399d3b3e7b003e911f866f}{eet\_shutdown}}();}
\DoxyCodeLine{00042\ \}}
\DoxyCodeLine{00043\ }

\end{DoxyCodeInclude}
 