From: Martin S. <mar...@us...> - 2008-04-16 19:55:23
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10846 Modified Files: coord.c cursor.c navigation.c osm2navit.c route.c Log Message: Fix:Core:Rearranged some code to make it work on older gccs Index: coord.c =================================================================== RCS file: /cvsroot/navit/navit/src/coord.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** coord.c 3 Jan 2008 22:55:50 -0000 1.10 --- coord.c 16 Apr 2008 19:55:21 -0000 1.11 *************** *** 178,184 **** *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; args=sscanf(str, "%lf %c %lf %c%n", &lat, &ns, &lng, &ew, &ret); if (args < 4) --- 178,184 ---- *c_ret=c; } else if (*s == 'N' || *s == 'n' || *s == 'S' || *s == 's') { 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) Index: osm2navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/osm2navit.c,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** osm2navit.c 13 Apr 2008 22:21:55 -0000 1.77 --- osm2navit.c 16 Apr 2008 19:55:22 -0000 1.78 *************** *** 1316,1321 **** tile_bbox(char *tile, struct rect *r) { - *r=world_bbox; struct coord c; while (*tile) { c.x=(r->l.x+r->h.x)/2; --- 1316,1321 ---- tile_bbox(char *tile, struct rect *r) { struct coord c; + *r=world_bbox; while (*tile) { c.x=(r->l.x+r->h.x)/2; Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** navigation.c 15 Apr 2008 22:24:43 -0000 1.40 --- navigation.c 16 Apr 2008 19:55:22 -0000 1.41 *************** *** 385,390 **** { struct navigation_itm *itm, *last=NULL, *last_itm=NULL; - itm=this_->first; int delta; this_->cmd_last=NULL; this_->cmd_first=NULL; --- 385,390 ---- { struct navigation_itm *itm, *last=NULL, *last_itm=NULL; int delta; + itm=this_->first; this_->cmd_last=NULL; this_->cmd_first=NULL; *************** *** 731,737 **** 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 *attrs_navigation[]={&navigation_attr, &data_attr, NULL}; if (! this_->map) --- 731,741 ---- navigation_get_map(struct navigation *this_) { ! 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) Index: route.c =================================================================== RCS file: /cvsroot/navit/navit/src/route.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** route.c 20 Mar 2008 21:27:21 -0000 1.40 --- route.c 16 Apr 2008 19:55:22 -0000 1.41 *************** *** 1743,1749 **** 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 *attrs_route[]={&route_attr, &data_attr, NULL}; if (! *map) --- 1743,1753 ---- route_get_map_helper(struct route *this_, struct map **map, char *type) { ! 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) Index: cursor.c =================================================================== RCS file: /cvsroot/navit/navit/src/cursor.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** cursor.c 17 Mar 2008 23:46:37 -0000 1.17 --- cursor.c 16 Apr 2008 19:55:21 -0000 1.18 *************** *** 104,111 **** static gboolean cursor_animate(struct cursor * this) { 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; --- 104,111 ---- static gboolean cursor_animate(struct cursor * this) { + struct point p; this->current_gc++; if (this->current_gc >= NUM_GC) this->current_gc=0; p.x = this->cursor_pnt.x; p.y = this->cursor_pnt.y; *************** *** 119,124 **** 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); this->gra=gra; this->animate_timer=0; --- 119,124 ---- unsigned char dash_list[] = { 4, 6 }; int i; 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; |