Mathieu Albinet <mathieu17@gmail.com>:
* Windows port: rename interface to source_interface
* Portability: replace mmap functions by g_mapped_file*
+ * Portability: use of g_ascii_dtostr to format google url
2008-05-02:
Guilhem Bonnefille <guilhem.bonnefille@gmail.com>:
gchar *tmpname;
gchar *uri;
VikCoord coord;
+ gchar coord_north_south[G_ASCII_DTOSTR_BUF_SIZE], coord_east_west[G_ASCII_DTOSTR_BUF_SIZE];
gchar *text, *pat, *beg;
GMappedFile *mf;
gsize len;
}
google_mapcoord_to_center_coord(mapcoord, &coord);
- uri = g_strdup_printf("http://maps.google.com/maps?f=q&hl=en&q=%f,%f", coord.north_south, coord.east_west);
+ uri = g_strdup_printf("http://maps.google.com/maps?f=q&hl=en&q=%s,%s",
+ g_ascii_dtostr (coord_north_south, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) coord.north_south),
+ g_ascii_dtostr (coord_east_west, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) coord.east_west));
tmp_file = fdopen(tmp_fd, "r+");
if (curl_download_uri(uri, tmp_file, &dl_options)) { /* error */