summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-04-16 19:55:23 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-04-16 19:55:23 +0000
commita242daba46e552573c71376f81234159a51ce174 (patch)
tree0c8db36fc3b7b1af4aaceb9c56dd47148fb78b58
parent5c1a38289c05c45e78881e1db804415e818d3a83 (diff)
downloadnavit-svn-a242daba46e552573c71376f81234159a51ce174.tar.gz
Fix:Core:Rearranged some code to make it work on older gccs
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@1016 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--coord.c2
-rw-r--r--cursor.c4
-rw-r--r--data/binfile/binfile.c3
-rw-r--r--data/mg/street.c2
-rw-r--r--gui/internal/gui_internal.c6
-rw-r--r--navigation.c10
-rw-r--r--osm2navit.c2
-rw-r--r--route.c8
8 files changed, 21 insertions, 16 deletions
diff --git a/coord.c b/coord.c
index 0d800fc3..74b6a104 100644
--- a/coord.c
+++ b/coord.c
@@ -177,9 +177,9 @@ coord_parse(const char *c_str, enum projection pro, struct coord *c_ret)
}
*c_ret=c;
} else if (*s == 'N' || *s == 'n' || *s == 'S' || *s == 's') {
- dbg(1,"str='%s'\n", str);
double lng, lat;
char ns, ew;
+ dbg(1,"str='%s'\n", str);
args=sscanf(str, "%lf %c %lf %c%n", &lat, &ns, &lng, &ew, &ret);
if (args < 4)
goto out;
diff --git a/cursor.c b/cursor.c
index 485754ee..cf706c24 100644
--- a/cursor.c
+++ b/cursor.c
@@ -103,10 +103,10 @@ cursor_draw(struct cursor *this_, struct point *pnt, int dir, int draw_dir, int
static gboolean cursor_animate(struct cursor * this)
{
+ struct point p;
this->current_gc++;
if (this->current_gc >= NUM_GC)
this->current_gc=0;
- struct point p;
p.x = this->cursor_pnt.x;
p.y = this->cursor_pnt.y;
cursor_draw(this, &p, this->last_dir, this->last_draw_dir, 1);
@@ -118,8 +118,8 @@ cursor_new(struct graphics *gra, struct color *c, struct color *c2, int animate)
{
unsigned char dash_list[] = { 4, 6 };
int i;
- dbg(2,"enter gra=%p c=%p\n", gra, c);
struct cursor *this=g_new(struct cursor,1);
+ dbg(2,"enter gra=%p c=%p\n", gra, c);
this->gra=gra;
this->animate_timer=0;
for (i=0;i<NUM_GC;i++) {
diff --git a/data/binfile/binfile.c b/data/binfile/binfile.c
index 4ea7c30e..51508cc6 100644
--- a/data/binfile/binfile.c
+++ b/data/binfile/binfile.c
@@ -452,6 +452,7 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search,
struct map_rect_priv *map_rec;
struct map_search_priv *msp;
struct map_selection *ms;
+ struct item *town;
int i;
switch (search->type) {
@@ -477,7 +478,7 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search,
ms->order[i] = 18;
}
map_rec = map_rect_new_binfile(map, ms);
- struct item *town = map_rect_get_item_byid_binfile(map_rec, item->id_hi, item->id_lo);
+ town = map_rect_get_item_byid_binfile(map_rec, item->id_hi, item->id_lo);
if (town) {
struct map_search_priv *msp = g_new(struct map_search_priv, 1);
struct coord *c = g_new(struct coord, 1);
diff --git a/data/mg/street.c b/data/mg/street.c
index 457f7dad..019adb77 100644
--- a/data/mg/street.c
+++ b/data/mg/street.c
@@ -622,7 +622,7 @@ street_name_attr_get(void *priv_data, enum attr_type attr_type, struct attr *att
printf("\n");
{
while (p < end) {
- unsigned char *pn,*pn_end;;
+ unsigned char *pn,*pn_end;
struct street_name_number nn;
street_name_numbers_get(&nns, &p);
printf("name_numbers:\n");
diff --git a/gui/internal/gui_internal.c b/gui/internal/gui_internal.c
index 8c4e1476..e953754e 100644
--- a/gui/internal/gui_internal.c
+++ b/gui/internal/gui_internal.c
@@ -1,12 +1,8 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <gdk/gdkkeysyms.h>
-#if !defined(GDK_Book) || !defined(GDK_Calendar)
-#include <X11/XF86keysym.h>
-#endif
#include <libintl.h>
-#include <gtk/gtk.h>
+#include <glib.h>
#include "config.h"
#include "item.h"
#include "navit.h"
diff --git a/navigation.c b/navigation.c
index 9f04c0ba..86fcb34b 100644
--- a/navigation.c
+++ b/navigation.c
@@ -384,8 +384,8 @@ static void
make_maneuvers(struct navigation *this_)
{
struct navigation_itm *itm, *last=NULL, *last_itm=NULL;
- itm=this_->first;
int delta;
+ itm=this_->first;
this_->cmd_last=NULL;
this_->cmd_first=NULL;
while (itm) {
@@ -730,9 +730,13 @@ navigation_unregister_callback(struct navigation *this_, enum attr_type type, st
struct map *
navigation_get_map(struct navigation *this_)
{
- struct attr navigation_attr={.type=attr_navigation,.u.navigation=this_};
- struct attr data_attr={.type=attr_data,.u.str=""};
+ struct attr navigation_attr;
+ struct attr data_attr;
struct attr *attrs_navigation[]={&navigation_attr, &data_attr, NULL};
+ navigation_attr.type=attr_navigation;
+ navigation_attr.u.navigation=this_;
+ data_attr.type=attr_data;
+ data_attr.u.str="";
if (! this_->map)
this_->map=map_new("navigation",attrs_navigation);
diff --git a/osm2navit.c b/osm2navit.c
index 22d6be8b..cc5622a7 100644
--- a/osm2navit.c
+++ b/osm2navit.c
@@ -1315,8 +1315,8 @@ tile(struct rect *r, char *ret, int max)
static void
tile_bbox(char *tile, struct rect *r)
{
- *r=world_bbox;
struct coord c;
+ *r=world_bbox;
while (*tile) {
c.x=(r->l.x+r->h.x)/2;
c.y=(r->l.y+r->h.y)/2;
diff --git a/route.c b/route.c
index 85e8a5a7..3c107899 100644
--- a/route.c
+++ b/route.c
@@ -1742,9 +1742,13 @@ route_graph_map_new(struct map_methods *meth, struct attr **attrs)
static struct map *
route_get_map_helper(struct route *this_, struct map **map, char *type)
{
- struct attr route_attr={.type=attr_route,.u.route=this_};
- struct attr data_attr={.type=attr_data,.u.str=""};
+ struct attr route_attr;
+ struct attr data_attr;
struct attr *attrs_route[]={&route_attr, &data_attr, NULL};
+ route_attr.type=attr_route;
+ route_attr.u.route=this_;
+ data_attr.type=attr_data;
+ data_attr.u.str="";
if (! *map)
*map=map_new(type,attrs_route);