#include "curl_download.h"
#define GEONAMES_WIKIPEDIA_URL_FMT "http://ws.geonames.org/wikipediaBoundingBoxJSON?formatted=true&north=%s&south=%s&east=%s&west=%s"
#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_COUNTRY_PATTERN "\"countryName\": \""
#define GEONAMES_LONGITUDE_PATTERN "\"lng\": "
#define GEONAMES_NAME_PATTERN "\"name\": \""
#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
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