\hypertarget{eet-basic_8c-example}{}\doxysection{eet-\/basic.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{\textcolor{comment}{//\ gcc\ -\/o\ eet-\/basic\ eet-\/basic.c\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eet`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eet_8h}{Eet.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *ef;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *ret;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ size;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *entries[]\ =}
\DoxyCodeLine{\ \ \ \{}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}Entry\ 1"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}Big\ text\ string\ here\ compared\ to\ others"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \textcolor{stringliteral}{"{}Eet\ is\ cool"{}}}
\DoxyCodeLine{\ \ \ \};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__Group_ga9903687bfa20fe9a9e59d4c1d213e89a}{eet\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ blindly\ open\ an\ file\ for\ output\ and\ write\ strings\ with\ their\ NUL\ char}}
\DoxyCodeLine{\ \ \ 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{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 1"{}},\ entries[0],\ strlen(entries[0])\ +\ 1,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 2"{}},\ entries[1],\ strlen(entries[1])\ +\ 1,\ 1);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga682d04715f0e11380c460814c4a9bd21}{eet\_write}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 3"{}},\ entries[2],\ strlen(entries[2])\ +\ 1,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//\ open\ the\ file\ again\ and\ blindly\ get\ the\ entries\ we\ wrote}}
\DoxyCodeLine{\ \ \ 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{\ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 1"{}},\ \&size);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ ret);}
\DoxyCodeLine{\ \ \ free(ret);}
\DoxyCodeLine{\ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 2"{}},\ \&size);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ ret);}
\DoxyCodeLine{\ \ \ free(ret);}
\DoxyCodeLine{\ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__File__Group_gab525b8d547c3542f6e430eeb6d919558}{eet\_read}}(ef,\ \textcolor{stringliteral}{"{}Entry\ 3"{}},\ \&size);}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ ret);}
\DoxyCodeLine{\ \ \ free(ret);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eet__Group_gacbc7583179399d3b3e7b003e911f866f}{eet\_shutdown}}();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}

\end{DoxyCodeInclude}
 