ok.. if silyl people list entries on eets they opened for write and havent

added any entires....


SVN revision: 6575
This commit is contained in:
Carsten Haitzler 2003-01-13 04:31:00 +00:00
parent 7c80fa9a3e
commit d814b97a3e
1 changed files with 8 additions and 1 deletions

View File

@ -212,6 +212,8 @@ eet_flush(Eet_File *ef)
/* check to see its' an eet file pointer */
if ((!ef) || (ef->magic != EET_MAGIC_FILE))
return;
if (!ef->header) return;
if (!ef->header->directory) return;
if (ef->mode != EET_FILE_MODE_WRITE) return;
if (!ef->writes_pending) return;
@ -637,6 +639,10 @@ eet_read(Eet_File *ef, char *name, int *size_ret)
}
/* get hash bucket this should be in */
hash = eet_hash_gen(name, ef->header->directory->size);
/* no header, return NULL */
if (!ef->header) return NULL;
/* no directory, return NULL */
if (!ef->header->directory) return NULL;
/* hunt hash bucket */
num = ef->header->directory->hash[hash].size;
for (i = 0; i < num; i++)
@ -857,7 +863,8 @@ eet_list(Eet_File *ef, char *glob, int *count_ret)
int i, j, num;
/* check to see its' an eet file pointer */
if ((!ef) || (ef->magic != EET_MAGIC_FILE) || (!glob))
if ((!ef) || (ef->magic != EET_MAGIC_FILE) || (!glob) ||
(!ef->header) || (!ef->header->directory))
{
if (count_ret) *count_ret = 0;
return NULL;