aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eet/src/examples/eet-basic.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:29:19 +1000
committerDavid Walter Seikel2013-01-13 17:29:19 +1000
commit07274513e984f0b5544586c74508ccd16e7dcafa (patch)
treeb32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/eet/src/examples/eet-basic.c
parentAdded Irrlicht 1.8, but without all the Windows binaries. (diff)
downloadSledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/eet/src/examples/eet-basic.c')
-rw-r--r--libraries/eet/src/examples/eet-basic.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/libraries/eet/src/examples/eet-basic.c b/libraries/eet/src/examples/eet-basic.c
deleted file mode 100644
index 05ff397..0000000
--- a/libraries/eet/src/examples/eet-basic.c
+++ /dev/null
@@ -1,40 +0,0 @@
1#include <Eet.h>
2
3int
4main(void)
5{
6 Eet_File *ef;
7 char *ret;
8 int size;
9 char *entries[] =
10 {
11 "Entry 1",
12 "Big text string here compared to others",
13 "Eet is cool"
14 };
15
16 eet_init();
17
18 // blindly open an file for output and write strings with their NUL char
19 ef = eet_open("test.eet", EET_FILE_MODE_WRITE);
20 eet_write(ef, "Entry 1", entries[0], strlen(entries[0]) + 1, 0);
21 eet_write(ef, "Entry 2", entries[1], strlen(entries[1]) + 1, 1);
22 eet_write(ef, "Entry 3", entries[2], strlen(entries[2]) + 1, 0);
23 eet_close(ef);
24
25 // open the file again and blindly get the entries we wrote
26 ef = eet_open("test.eet", EET_FILE_MODE_READ);
27 ret = eet_read(ef, "Entry 1", &size);
28 printf("%s\n", ret);
29 free(ret);
30 ret = eet_read(ef, "Entry 2", &size);
31 printf("%s\n", ret);
32 free(ret);
33 ret = eet_read(ef, "Entry 3", &size);
34 printf("%s\n", ret);
35 free(ret);
36 eet_close(ef);
37
38 eet_shutdown();
39}
40