]> Pileus Git - ~andy/gtk/blob - demos/pixbuf-init.c
Some cleanups after the module cache file change
[~andy/gtk] / demos / pixbuf-init.c
1 #include "config.h"
2 #include <glib.h>
3
4 #include <sys/stat.h>
5 #include <stdlib.h>
6
7 static gboolean
8 file_exists (const char *filename)
9 {
10   struct stat statbuf;
11
12   return stat (filename, &statbuf) == 0;
13 }
14
15 void
16 pixbuf_init (void)
17 {
18   if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
19     g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE);
20 }