
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{1 \textcolor{comment}{//Compile with:}}
\DoxyCodeLine{2 \textcolor{comment}{// gcc -\/o eet-\/basic eet-\/basic.c `pkg-\/config -\/-\/cflags -\/-\/libs eet`}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{Eet_8h}{Eet.h}}>}}
\DoxyCodeLine{5 }
\DoxyCodeLine{6 \textcolor{keywordtype}{int}}
\DoxyCodeLine{7 main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{8 \{}
\DoxyCodeLine{9    \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}} *ef;}
\DoxyCodeLine{10    \textcolor{keywordtype}{char} *ret;}
\DoxyCodeLine{11    \textcolor{keywordtype}{int} size;}
\DoxyCodeLine{12    \textcolor{keywordtype}{char} *entries[] =}
\DoxyCodeLine{13    \{}
\DoxyCodeLine{14       \textcolor{stringliteral}{"{}Entry 1"{}},}
\DoxyCodeLine{15       \textcolor{stringliteral}{"{}Big text string here compared to others"{}},}
\DoxyCodeLine{16       \textcolor{stringliteral}{"{}Eet is cool"{}}}
\DoxyCodeLine{17    \};}
\DoxyCodeLine{18 }
\DoxyCodeLine{19    \mbox{\hyperlink{group__Eet__Group_ga9903687bfa20fe9a9e59d4c1d213e89a}{eet\_init}}();}
\DoxyCodeLine{20 }
\DoxyCodeLine{21    \textcolor{comment}{// blindly open an file for output and write strings with their NUL char}}
\DoxyCodeLine{22    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{23    \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef, \textcolor{stringliteral}{"{}Entry 1"{}}, entries[0], strlen(entries[0]) + 1, 0);}
\DoxyCodeLine{24    \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef, \textcolor{stringliteral}{"{}Entry 2"{}}, entries[1], strlen(entries[1]) + 1, 1);}
\DoxyCodeLine{25    \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef, \textcolor{stringliteral}{"{}Entry 3"{}}, entries[2], strlen(entries[2]) + 1, 0);}
\DoxyCodeLine{26    \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{27 }
\DoxyCodeLine{28    \textcolor{comment}{// open the file again and blindly get the entries we wrote}}
\DoxyCodeLine{29    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{30    ret = \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef, \textcolor{stringliteral}{"{}Entry 1"{}}, \&size);}
\DoxyCodeLine{31    printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{32    free(ret);}
\DoxyCodeLine{33    ret = \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef, \textcolor{stringliteral}{"{}Entry 2"{}}, \&size);}
\DoxyCodeLine{34    printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{35    free(ret);}
\DoxyCodeLine{36    ret = \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef, \textcolor{stringliteral}{"{}Entry 3"{}}, \&size);}
\DoxyCodeLine{37    printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{38    free(ret);}
\DoxyCodeLine{39    \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{40 }
\DoxyCodeLine{41    \mbox{\hyperlink{group__Eet__Group_gacbc7583179399d3b3e7b003e911f866f}{eet\_shutdown}}();}
\DoxyCodeLine{42 \}}
\DoxyCodeLine{43 }

\end{DoxyCodeInclude}
 