mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Revert slurp_image extraction for svg_load
* src/image.c (svg_load): Inline slurp_image code again, as it didn't build in its current form. Reported by Andreas Schwab <schwab@linux-m68k.org>.
This commit is contained in:
parent
bf4d4ab4dd
commit
505c806230
1 changed files with 15 additions and 4 deletions
19
src/image.c
19
src/image.c
|
|
@ -11684,11 +11684,22 @@ svg_load (struct frame *f, struct image *img)
|
||||||
base_uri = image_spec_value (img->spec, QCbase_uri, NULL);
|
base_uri = image_spec_value (img->spec, QCbase_uri, NULL);
|
||||||
if (STRINGP (file_name))
|
if (STRINGP (file_name))
|
||||||
{
|
{
|
||||||
ptrdiff_t size;
|
image_fd fd;
|
||||||
char *contents = slurp_image (file_name, &size, "SVG");
|
Lisp_Object file = image_find_image_fd (file_name, &fd);
|
||||||
if (contents == NULL)
|
if (!STRINGP (file))
|
||||||
return false;
|
{
|
||||||
|
image_not_found_error (file_name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Read the entire file into memory. */
|
||||||
|
ptrdiff_t size;
|
||||||
|
char *contents = slurp_file (fd, &size);
|
||||||
|
if (contents == NULL)
|
||||||
|
{
|
||||||
|
image_error ("Error loading SVG image `%s'", file);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
/* If the file was slurped into memory properly, parse it. */
|
/* If the file was slurped into memory properly, parse it. */
|
||||||
if (!STRINGP (base_uri))
|
if (!STRINGP (base_uri))
|
||||||
base_uri = file;
|
base_uri = file;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue