#include "vikmapslayer.h"
-#if !GLIB_CHECK_VERSION(2,26,0)
-typedef struct stat GStatBuf;
-#endif
-
struct _VikMapnikLayerClass
{
VikLayerClass object_class;
if ( !g_strcmp0 ( vml->filename_xml, vml->filename_css ) ) {
vml->filename_xml = g_strconcat ( vml->filename_css, ".xml", NULL );
}
+ g_regex_unref ( regex );
}
if ( !g_file_set_contents (vml->filename_xml, mystdout, -1, &error) ) {
g_warning ("%s: %s", __FUNCTION__, error->message );
gchar *dir = g_path_get_dirname ( filename );
if ( !g_file_test ( filename, G_FILE_TEST_EXISTS ) )
- g_mkdir_with_parents ( dir , 0777 );
+ if ( g_mkdir_with_parents ( dir , 0777 ) != 0 )
+ g_warning ("%s: Failed to mkdir %s", __FUNCTION__, dir );
g_free ( dir );
if ( !gdk_pixbuf_save (pixbuf, filename, "png", &error, NULL ) ) {
/**
* Thread
*/
-void thread_add (VikMapnikLayer *vml, MapCoord *mul, VikCoord *ul, VikCoord *br, gint x, gint y, gint z, gint zoom, const gchar* name )
+static void thread_add (VikMapnikLayer *vml, MapCoord *mul, VikCoord *ul, VikCoord *br, gint x, gint y, gint z, gint zoom, const gchar* name )
{
// Create request
guint nn = name ? g_str_hash ( name ) : 0;
if ( g_file_test ( filename, G_FILE_TEST_EXISTS ) ) {
filemsg = g_strconcat ( "Tile File: ", filename, NULL );
// Get some timestamp information of the tile
- struct stat stat_buf;
+ GStatBuf stat_buf;
if ( g_stat ( filename, &stat_buf ) == 0 ) {
gchar time_buf[64];
strftime ( time_buf, sizeof(time_buf), "%c", gmtime((const time_t *)&stat_buf.st_mtime) );