#include "curl_download.h"
#define GEONAMES_WIKIPEDIA_URL_FMT "http://ws.geonames.org/wikipediaBoundingBoxJSON?formatted=true&north=%s&south=%s&east=%s&west=%s"
-#define GEONAMES_SEARCH_URL_FMT "http://ws.geonames.org/searchJSON?formatted=true&style=medium&maxRows=10&lang=en&q=%s"
#define GEONAMES_COUNTRY_PATTERN "\"countryName\": \""
#define GEONAMES_LONGITUDE_PATTERN "\"lng\": "
#define GEONAMES_NAME_PATTERN "\"name\": \""
tmp_file = fdopen(tmp_fd, "r+");
// TODO: curl may not be available
- if (curl_download_uri(uri, tmp_file, NULL)) { // error
+ if (curl_download_uri(uri, tmp_file, NULL, 0, NULL)) { // error
fclose(tmp_file);
tmp_file = NULL;
g_remove(tmpname);