{
osm_place *n;
+g_return_val_if_fail(sql.select_place, FALSE);
+
n=*nr;
n=osm_place_cache_lookup(id);
if (n) {
gint range;
osm_place *n=NULL;
+g_return_val_if_fail(sql.select_place_near, FALSE);
+
switch (type) {
case NODE_PLACE_SUBURB:
range=95000;
gulong tms;
guint wc=0;
+g_return_val_if_fail(sql.select_way2, NULL);
+
sqlite3_reset(sql.select_way2);
sqlite3_clear_bindings(sql.select_way2);
guint wc=0;
sqlite3_stmt *psql=NULL;
+g_return_val_if_fail(sql.select_node_next, FALSE);
+g_return_val_if_fail(sql.select_node_prev, FALSE);
+
switch (d) {
case OSM_NODE_NEXT:
psql=sql.select_node_next;
osm_way_node *
osm_way_get_prev_node(osm_way *w)
{
+g_return_val_if_fail(sql.select_way_prev_seg, NULL);
+
sqlite3_reset(sql.select_way_prev_seg);
sqlite3_clear_bindings(sql.select_way_prev_seg);
osm_way_node *
osm_way_get_next_node(osm_way *w)
{
+g_return_val_if_fail(sql.select_way_next_seg, NULL);
+
sqlite3_reset(sql.select_way_next_seg);
sqlite3_clear_bindings(sql.select_way_next_seg);
if (w->nodes!=NULL)
return TRUE;
+g_return_val_if_fail(sql.select_way_nodes, FALSE);
+
sqlite3_reset(sql.select_way_nodes);
sqlite3_clear_bindings(sql.select_way_nodes);
gboolean
osm_way_get_name(osm_way *w)
{
+g_return_val_if_fail(sql.select_way_name, FALSE);
+
sqlite3_reset(sql.select_way_name);
sqlite3_clear_bindings(sql.select_way_name);
gboolean
osm_way_get_name_nls(osm_way *w)
{
+g_return_val_if_fail(sql.select_way_name_nls, FALSE);
+
sqlite3_reset(sql.select_way_name_nls);
sqlite3_clear_bindings(sql.select_way_name_nls);
gboolean
osm_way_get_ref(osm_way *w)
{
+g_return_val_if_fail(sql.select_way_ref, FALSE);
+
sqlite3_reset(sql.select_way_ref);
sqlite3_clear_bindings(sql.select_way_ref);
gchar tmp1[16], tmp2[16];
gdouble range=6;
+g_return_val_if_fail(sql.select_place_search, FALSE);
+g_return_val_if_fail(text, FALSE);
+
ltext=g_strdup_printf("%s%%", text);
if (SQLITE_OK != sqlite3_bind_double(sql.select_place_search, 1, lat) ||
gchar tmp1[16], tmp2[16];
gdouble range=6;
+g_return_val_if_fail(sql.select_way_name_search, FALSE);
+g_return_val_if_fail(text, FALSE);
+
g_debug("Way Search: [%s] around %.6f %.6f", text, lat, lon);
ltext=g_strdup_printf("%s%%", text);