#include "config.h"
#endif
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
#include <glib/gprintf.h>
#include <glib/gi18n.h>
static VikCoord *last_coord = NULL;
static gchar *last_successful_search_str = NULL;
-static DownloadOptions googlesearch_options = { "http://maps.google.com/", 0 };
+static DownloadOptions googlesearch_options = { "http://maps.google.com/", 0, a_check_map_file };
gchar * a_googlesearch_get_search_string_for_this_place(VikWindow *vw)
{
/* TODO: curl may not be available */
if (curl_download_uri(uri, tmp_file, &googlesearch_options)) { /* error */
fclose(tmp_file);
+ tmp_file = NULL;
ret = -1;
goto done;
}
fclose(tmp_file);
+ tmp_file = NULL;
if (!parse_file_for_latlon(tmpname, &ll)) {
ret = -1;
goto done;
done:
g_free(escaped_srch_str);
g_free(uri);
- remove(tmpname);
+ g_remove(tmpname);
g_free(tmpname);
return ret;
}