fetch() now knows nothing about struct image; it simply loads a file and

returns the allocated buffer.
This commit is contained in:
Michael Brown
2007-01-12 08:02:27 +00:00
parent 2876197306
commit 475d6d1f7c
5 changed files with 19 additions and 22 deletions

View File

@@ -54,7 +54,7 @@ int imgfetch ( const char *filename, const char *name,
strncpy ( image->name, name, ( sizeof ( image->name ) - 1 ) );
/* Fetch the file */
if ( ( rc = fetch ( image, filename ) ) != 0 )
if ( ( rc = fetch ( filename, &image->data, &image->len ) ) != 0 )
goto err;
/* Register the image */