Cleaning up variable names in image loading

Use more explicit variabel names and make the get timestamp function actually
return the timestamp rather than getting a pointer argument

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2015-04-24 14:19:41 +02:00 committed by Dirk Hohndel
parent c97e136435
commit a0a3c6ec15
4 changed files with 39 additions and 45 deletions

View file

@ -354,20 +354,19 @@ picture_load_exit:
return;
}
extern "C" void picture_get_timestamp(char *filename, timestamp_t *t)
extern "C" timestamp_t picture_get_timestamp(char *filename)
{
EXIFInfo exif;
memblock mem;
int retval;
if (readfile(filename, &mem) <= 0)
return;
return 0;
retval = exif.parseFrom((const unsigned char *)mem.buffer, (unsigned)mem.size);
free(mem.buffer);
if (retval != PARSE_EXIF_SUCCESS)
return;
*t = exif.epoch();
return;
return 0;
return exif.epoch();
}
extern "C" const char *system_default_directory(void)