#include "utils.h"
#include "poi.h"
+#include "path.h"
#include "route.h"
#include "track.h"
-#include "path.h"
#include "settings.h"
#include "gps.h"
#include "map.h"
GtkListStore *store;
route_download(NULL);
-store=route_generate_store();
+store=route_generate_store(&_route);
if (store!=NULL) {
gtk_tree_view_set_model(route_tree_view, store);
g_object_unref(G_OBJECT(store));
GtkListStore *store;
route_open_file();
-store=route_generate_store();
+store=route_generate_store(&_route);
if (store!=NULL) {
gtk_tree_view_set_model(route_tree_view, store);
g_object_unref(G_OBJECT(store));
g_free(latlonstr);
MACRO_CURL_EASY_INIT(_autoroute_data.curl_easy);
-curl_easy_setopt(_autoroute_data.curl_easy, CURLOPT_URL,
- _autoroute_data.src_str);
-curl_easy_setopt(_autoroute_data.curl_easy, CURLOPT_WRITEFUNCTION,
- route_dl_cb_read);
-curl_easy_setopt(_autoroute_data.curl_easy, CURLOPT_WRITEDATA,
- &_autoroute_data.rdl_data);
+curl_easy_setopt(_autoroute_data.curl_easy, CURLOPT_URL, _autoroute_data.src_str);
+curl_easy_setopt(_autoroute_data.curl_easy, CURLOPT_WRITEFUNCTION, route_dl_cb_read);
+curl_easy_setopt(_autoroute_data.curl_easy, CURLOPT_WRITEDATA, &_autoroute_data.rdl_data);
if (!_curl_multi) {
/* Initialize CURL. */
_curl_multi = curl_multi_init();
/***/
GtkListStore *
-route_generate_store(void)
+route_generate_store(Path *route)
{
WayPoint *wcurr;
GtkTreeIter iter;
gdouble lat1, lon1, lat2, lon2;
gfloat sum=0.0;
-if (_route.whead==_route.wtail)
+if (route->whead==route->wtail)
return NULL;
-wcurr = _route.whead;
+wcurr=route->whead;
if (!wcurr->point)
return NULL;
store = gtk_list_store_new(ROUTE_NUM_COLUMNS,G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
-while (wcurr!=_route.wtail) {
+while (wcurr!=route->wtail) {
if (!wcurr)
break;