second patch Arjan van de Ven <arjan@fenrus.demon.nl> to autodetect/load

1999-11-05  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf-io.c: second patch Arjan van de Ven
	<arjan@fenrus.demon.nl> to autodetect/load the sunras files.
This commit is contained in:
Jonathan Blandford 1999-11-05 21:29:33 +00:00 committed by Jonathan Blandford
parent b71e53b222
commit 9ab8dfc3e4

View File

@ -120,6 +120,21 @@ pixbuf_check_pnm (guchar *buffer, int size)
} }
return FALSE; return FALSE;
} }
static gboolean
pixbuf_check_sunras (guchar *buffer, int size)
{
if (size < 32)
return FALSE;
if (buffer [0] != 0x59 ||
buffer [1] != 0xA6 ||
buffer [2] != 0x6A ||
buffer [3] != 0x95)
return FALSE;
return TRUE;
}
#if 0 #if 0
static gboolean static gboolean
@ -144,6 +159,7 @@ GdkPixbufModule file_formats [] = {
#define XPM_FILE_FORMAT_INDEX 4 #define XPM_FILE_FORMAT_INDEX 4
{ "xpm", pixbuf_check_xpm, NULL, NULL, NULL, NULL, NULL, NULL }, { "xpm", pixbuf_check_xpm, NULL, NULL, NULL, NULL, NULL, NULL },
{ "pnm", pixbuf_check_pnm, NULL, NULL, NULL, NULL, NULL, NULL }, { "pnm", pixbuf_check_pnm, NULL, NULL, NULL, NULL, NULL, NULL },
{ "ras", pixbuf_check_sunras, NULL, NULL, NULL, NULL, NULL, NULL },
#if 0 #if 0
{ "bmp", pixbuf_check_bmp, NULL, NULL, NULL, NULL, NULL, NULL }, { "bmp", pixbuf_check_bmp, NULL, NULL, NULL, NULL, NULL, NULL },
#endif #endif