int
main(void)
{
char *ret;
int size;
char *entries[] =
{
"Entry 1",
"Big text string here compared to others",
"Eet is cool"
};
eet_write(ef,
"Entry 1", entries[0], strlen(entries[0]) + 1, 0);
eet_write(ef,
"Entry 2", entries[1], strlen(entries[1]) + 1, 1);
eet_write(ef,
"Entry 3", entries[2], strlen(entries[2]) + 1, 0);
printf("%s\n", ret);
free(ret);
printf("%s\n", ret);
free(ret);
printf("%s\n", ret);
free(ret);
}
The file that provides the eet functions.
EAPI Eet_Error eet_close(Eet_File *ef)
Closes an eet file handle and flush pending writes.
Definition: eet_lib.c:1899
EAPI Eet_File * eet_open(const char *file, Eet_File_Mode mode)
Opens an eet file on disk, and returns a handle to it.
Definition: eet_lib.c:1499
EAPI int eet_write(Eet_File *ef, const char *name, const void *data, int size, int compress)
Write a specified entry to an eet file handle.
Definition: eet_lib.c:2492
struct _Eet_File Eet_File
Opaque handle that defines an Eet file (or memory).
Definition: Eet.h:527
EAPI void * eet_read(Eet_File *ef, const char *name, int *size_ret)
Reads a specified entry from an eet file and return data.
Definition: eet_lib.c:2006
@ EET_FILE_MODE_READ
File is read-only.
Definition: Eet.h:479
@ EET_FILE_MODE_WRITE
File is write-only.
Definition: Eet.h:480
EAPI int eet_init(void)
Initializes the EET library.
Definition: eet_lib.c:540
EAPI int eet_shutdown(void)
Shuts down the EET library.
Definition: eet_lib.c:594