You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(59) |
Sep
(43) |
Oct
(95) |
Nov
(135) |
Dec
(108) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(229) |
Feb
(141) |
Mar
(59) |
Apr
(70) |
May
(64) |
Jun
(87) |
Jul
(57) |
Aug
(108) |
Sep
(74) |
Oct
(203) |
Nov
(141) |
Dec
(108) |
2009 |
Jan
(114) |
Feb
(91) |
Mar
(101) |
Apr
(69) |
May
(54) |
Jun
(82) |
Jul
(49) |
Aug
(109) |
Sep
(81) |
Oct
(93) |
Nov
(100) |
Dec
(79) |
2010 |
Jan
(46) |
Feb
(36) |
Mar
(135) |
Apr
(103) |
May
(116) |
Jun
(130) |
Jul
(52) |
Aug
(31) |
Sep
(46) |
Oct
(48) |
Nov
(98) |
Dec
(110) |
2011 |
Jan
(234) |
Feb
(184) |
Mar
(150) |
Apr
(43) |
May
(53) |
Jun
(52) |
Jul
(112) |
Aug
(72) |
Sep
(79) |
Oct
(23) |
Nov
(6) |
Dec
(30) |
2012 |
Jan
(39) |
Feb
(37) |
Mar
(49) |
Apr
(60) |
May
(63) |
Jun
(38) |
Jul
(33) |
Aug
(24) |
Sep
(20) |
Oct
(14) |
Nov
(23) |
Dec
(50) |
2013 |
Jan
(30) |
Feb
(32) |
Mar
(27) |
Apr
(41) |
May
(59) |
Jun
(21) |
Jul
(10) |
Aug
(73) |
Sep
(23) |
Oct
(60) |
Nov
(14) |
Dec
(15) |
2014 |
Jan
(4) |
Feb
(8) |
Mar
(11) |
Apr
(6) |
May
(27) |
Jun
(4) |
Jul
(29) |
Aug
(62) |
Sep
(11) |
Oct
(17) |
Nov
(58) |
Dec
(9) |
2015 |
Jan
(23) |
Feb
(3) |
Mar
(26) |
Apr
(47) |
May
(8) |
Jun
(28) |
Jul
(10) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: KaZeR <ka...@us...> - 2007-10-19 10:58:02
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2993 Modified Files: transform.c Log Message: zaxl patch : navit-fixtypo.diff Index: transform.c =================================================================== RCS file: /cvsroot/navit/navit/src/transform.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** transform.c 9 Oct 2007 18:14:27 -0000 1.4 --- transform.c 19 Oct 2007 10:57:45 -0000 1.5 *************** *** 102,106 **** yc=ycn; } ! #ifdef AVOID_FLOAT xc=xc*16.0/(double)(t->scale); yc=yc*16.0/(double)(t->scale); --- 102,106 ---- yc=ycn; } ! #ifndef AVOID_FLOAT xc=xc*16.0/(double)(t->scale); yc=yc*16.0/(double)(t->scale); |
From: KaZeR <ka...@us...> - 2007-10-17 13:55:55
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6702 Modified Files: graphics.c Log Message: Zaxl patch : fix-circle-without-label Index: graphics.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** graphics.c 9 Oct 2007 18:14:27 -0000 1.17 --- graphics.c 17 Oct 2007 13:55:56 -0000 1.18 *************** *** 361,365 **** gc->meth.gc_set_linewidth(gc->priv, e->u.polyline.width); gra->meth.draw_circle(gra->priv, gc->priv, &di->pnt[0], e->u.circle.radius); ! if (e->label_size) { p.x=di->pnt[0].x+3; p.y=di->pnt[0].y+10; --- 361,365 ---- gc->meth.gc_set_linewidth(gc->priv, e->u.polyline.width); gra->meth.draw_circle(gra->priv, gc->priv, &di->pnt[0], e->u.circle.radius); ! if (di->label && e->label_size) { p.x=di->pnt[0].x+3; p.y=di->pnt[0].y+10; |
From: KaZeR <ka...@us...> - 2007-10-17 13:28:44
|
Update of /cvsroot/navit/navit/src/graphics/gtk_drawing_area In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16335/graphics/gtk_drawing_area Modified Files: Makefile.am Log Message: Patch from zaxl : fix-gtkdrawarea-build Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/gtk_drawing_area/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 11 Jul 2007 14:01:14 -0000 1.7 --- Makefile.am 17 Oct 2007 13:28:44 -0000 1.8 *************** *** 3,4 **** --- 3,5 ---- modulegraphics_LTLIBRARIES = libgraphics_gtk_drawing_area.la libgraphics_gtk_drawing_area_la_SOURCES = graphics_gtk_drawing_area.c + libgraphics_gtk_drawing_area_la_LDFLAGS = @GTK2_LIBS@ |
From: KaZeR <ka...@us...> - 2007-10-17 13:27:59
|
Update of /cvsroot/navit/navit/src/fib-1.1 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15361/fib-1.1 Modified Files: Makefile.am Log Message: Patch from zaxl : fix fib-1.1 compilation on slack 10 Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/fib-1.1/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 5 Jul 2007 17:16:20 -0000 1.2 --- Makefile.am 17 Oct 2007 13:27:55 -0000 1.3 *************** *** 1,4 **** ! noinst_LTLIBRARIES = libfib.la ! libfib_la_SOURCES = fib.c fib.h fibpriv.h ! libfib_la_LDFLAGS = -static EXTRA_DIST=README configure.in fh_extractmin.3 fh_makeheap.3 fh_makekeyheap.3 fibtest.c fibtest2.c tt.c use.c --- 1,3 ---- ! noinst_LIBRARIES = libfib.a ! libfib_a_SOURCES = fib.c fib.h fibpriv.h EXTRA_DIST=README configure.in fh_extractmin.3 fh_makeheap.3 fh_makekeyheap.3 fibtest.c fibtest2.c tt.c use.c |
From: KaZeR <ka...@us...> - 2007-10-17 13:27:37
|
Update of /cvsroot/navit/navit/src/data/poi_geodownload/libmdb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15171/data/poi_geodownload/libmdb Modified Files: Makefile.am Log Message: Patch from zaxl : fix libmdb compilation on slack 10 Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/data/poi_geodownload/libmdb/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 23 Aug 2007 19:29:51 -0000 1.3 --- Makefile.am 17 Oct 2007 13:27:26 -0000 1.4 *************** *** 1,5 **** SUBDIRS=include AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(srcdir)/include ! noinst_LTLIBRARIES = libmdb.la ! libmdb_la_LDFLAGS = -static ! libmdb_la_SOURCES=backend.c catalog.c data.c dump.c file.c iconv.c index.c kkd.c like.c map.c mem.c money.c options.c props.c sargs.c stats.c table.c worktable.c write.c --- 1,4 ---- SUBDIRS=include AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(srcdir)/include ! noinst_LIBRARIES = libmdb.a ! libmdb_a_SOURCES=backend.c catalog.c data.c dump.c file.c iconv.c index.c kkd.c like.c map.c mem.c money.c options.c props.c sargs.c stats.c table.c worktable.c write.c |
From: KaZeR <ka...@us...> - 2007-10-17 12:59:52
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24292 Modified Files: configure.in Log Message: Fixed sdl gui loading after zaxl patch Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** configure.in 3 Oct 2007 20:15:56 -0000 1.31 --- configure.in 17 Oct 2007 12:59:48 -0000 1.32 *************** *** 95,99 **** Define to 1 if you have the <CEGUI/CEGUI.h> header file. ) ! CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer" CEGUI_CFLAGS="-I /usr/local/include/CEGUI -I /usr/include/CEGUI" cegui=yes, --- 95,99 ---- Define to 1 if you have the <CEGUI/CEGUI.h> header file. ) ! CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUISILLYImageCodec -lCEGUIExpatParser -lCEGUIFalagardWRBase" CEGUI_CFLAGS="-I /usr/local/include/CEGUI -I /usr/include/CEGUI" cegui=yes, |
From: KaZeR <ka...@us...> - 2007-10-16 12:59:34
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30985/src Modified Files: plugin.c Log Message: patch navit-dont-register-symbols-global from zaxl Index: plugin.c =================================================================== RCS file: /cvsroot/navit/navit/src/plugin.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** plugin.c 5 Jul 2007 20:43:59 -0000 1.5 --- plugin.c 16 Oct 2007 12:59:35 -0000 1.6 *************** *** 43,47 **** return 0; } ! mod=g_module_open(pl->name, pl->lazy ? G_MODULE_BIND_LAZY : 0); if (! mod) { g_warning("can't load '%s', Error '%s'\n", pl->name, g_module_error()); --- 43,47 ---- return 0; } ! mod=g_module_open(pl->name, G_MODULE_BIND_LOCAL | (pl->lazy ? G_MODULE_BIND_LAZY : 0)); if (! mod) { g_warning("can't load '%s', Error '%s'\n", pl->name, g_module_error()); |
From: KaZeR <ka...@us...> - 2007-10-11 16:56:16
|
Update of /cvsroot/navit/navit/src/graphics/opengl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16555/graphics/opengl Modified Files: graphics_opengl.c Log Message: Removed temp settings Index: graphics_opengl.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/opengl/graphics_opengl.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** graphics_opengl.c 11 Oct 2007 16:55:41 -0000 1.7 --- graphics_opengl.c 11 Oct 2007 16:56:17 -0000 1.8 *************** *** 319,323 **** glPushMatrix(); ! glcRenderStyle(GLC_TRIANGLE); glColor4f(0,0,0,1); glTranslatef(x, y, 1); --- 319,323 ---- glPushMatrix(); ! glcRenderStyle(GLC_TEXTURE); glColor4f(0,0,0,1); glTranslatef(x, y, 1); |
From: KaZeR <ka...@us...> - 2007-10-11 16:55:40
|
Update of /cvsroot/navit/navit/src/graphics/opengl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16142/graphics/opengl Modified Files: graphics_opengl.c Log Message: Removed temp settings Index: graphics_opengl.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/opengl/graphics_opengl.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** graphics_opengl.c 9 Oct 2007 16:58:00 -0000 1.6 --- graphics_opengl.c 11 Oct 2007 16:55:41 -0000 1.7 *************** *** 320,329 **** glPushMatrix(); glcRenderStyle(GLC_TRIANGLE); ! glColor4f(0,1,0,1); glTranslatef(x, y, 1); glRotatef(180,1,0,0); // glRotatef(angle,0,0,1); ! glScalef(20, 20, 20); // FIXME : add some error checking : glcGetError() glcRenderString(label); --- 320,329 ---- glPushMatrix(); glcRenderStyle(GLC_TRIANGLE); ! glColor4f(0,0,0,1); glTranslatef(x, y, 1); glRotatef(180,1,0,0); // glRotatef(angle,0,0,1); ! glScalef(14, 14, 14); // FIXME : add some error checking : glcGetError() glcRenderString(label); |
From: Martin S. <mar...@us...> - 2007-10-10 08:46:04
|
Update of /cvsroot/navit/navit/src/script In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13358/src/script Modified Files: osm2navit Log Message: process one-ways correctly in osm2navit Index: osm2navit =================================================================== RCS file: /cvsroot/navit/navit/src/script/osm2navit,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** osm2navit 3 Oct 2007 13:47:35 -0000 1.2 --- osm2navit 10 Oct 2007 08:46:03 -0000 1.3 *************** *** 191,194 **** --- 191,197 ---- $oline.=' label="' . $tag{'name'} . '"'; } + if ($tag{'oneway'} eq 'true' || $tag{'oneway'} eq 'yes') { + $oline.=' limit=1'; + } $oline .= ' debug="way_id=' . $way_id . ' '; while (($key,$value)=each(%tag)) { |
From: Martin S. <mar...@us...> - 2007-10-09 19:03:05
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30158/src Modified Files: route.c route.h vehicle.c Log Message: Added API for querying route path coordinates Index: vehicle.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** vehicle.c 9 Oct 2007 18:14:27 -0000 1.24 --- vehicle.c 9 Oct 2007 19:03:06 -0000 1.25 *************** *** 520,523 **** --- 520,525 ---- vehicle_demo_timer (struct vehicle *this) { + struct route_path_coord_handle *h; + struct coord *c; dbg(1,"###### Entering simulation loop\n"); if(!this->navit){ *************** *** 533,636 **** } ! struct route_info_handle *h; ! struct route_info *pos; ! dbg(2,"calling route_get_pos\n"); ! pos=route_get_pos(vehicle_route); ! ! struct coord *current_pos=vehicle_pos_get(this); ! dbg(1,"vehicle is at %lx,%lx\n",current_pos->x,current_pos->y); ! if(!pos){ ! dbg(1,"Pos is NULL, can't continue\n"); ! return 1; ! } ! dbg(2,"opening the handle\n"); ! // Obtain end coordinates of current segment ! h=route_info_open(NULL, pos, 0); ! dbg(2,"handle opened\n"); ! ! if (! h) { ! dbg(1,"route_info_handle is null\n"); return 1; } ! ! struct coord *c,*target; ! int i=0; ! target=0; ! while ((c=route_info_get(h))) { ! i++; ! dbg(1,"#%i: c=%lx,%lx\n", i,c->x,c->y); ! if(!target){ ! target=c; ! dbg(1,"moving toward #%i\n",i); ! } else { ! dbg(1,"target is not null, i keep the last destination choice\n"); ! } ! } ! ! if((target->x==current_pos->x)&&(target->y==current_pos->y)){ ! dbg(1,"Looks like we are already at the end of the segment\n"); ! // There was only one point left on the segment. ! // We have to find the next segment. ! struct route_path_handle *rp=route_path_open(vehicle_route); ! if(!rp){ ! dbg(1,"** rp is null!\n"); ! return 1; ! } ! ! struct route_path_segment *seg=route_path_get_segment(rp); ! if(!seg){ ! dbg(1,"********************** seg is null!\n"); ! return 1; ! } ! dbg(1,"seg=%p\n",seg); ! // FIXME : following block can probably be removed ! /* ! seg=route_path_get_segment(rp); ! if(!seg){ ! dbg(1,"******************* seg2 is null!\n"); ! return 1; ! } ! dbg(1,"seg (2) =%p\n",seg); ! */ ! struct item *item=route_path_segment_get_item(seg); ! if(!item){ ! dbg(2,"** item is null!\n"); ! return 1; ! } else { ! dbg(2,"item->id_hi = %lx & item->id_lo = %lx item = %lx and item->type = %lx\n",item->id_hi,item->id_lo,item,item->type); ! } ! ! ! struct map_rect *mr=map_rect_new(item->map,NULL); ! struct item *item2=map_rect_get_item_byid(mr, item->id_hi, item->id_lo); ! ! struct street_data *street=street_get_data(item2); ! if(!street){ ! dbg(1,"** street_data is null!\n"); ! return 1; ! } ! ! ! if(street->count){ ! dbg(1,"vehicle is at %lx,%lx (2)\n",current_pos->x,current_pos->y); ! dbg(1,"street->c[0] = %lx,%lx, street->c[street->count-1]= %lx,%lx count=%d\n",street->c[0].x,street->c[0].y, street->c[street->count-1].x, street->c[street->count-1].y, street->count); ! if((current_pos->x==street->c[0].x)&&(current_pos->y==street->c[0].y)){ ! target->x=street->c[1].x; ! target->y=street->c[1].y; ! dbg(1,"Moving to : street->c[1] (%lx,%lx)\n",street->c[1].x,street->c[1].y); ! } else { ! target->x=street->c[street->count-2].x; ! target->y=street->c[street->count-2].y; ! dbg(1,"Moving to : street->c[street->count-2] (%lx,%lx)\n",street->c[street->count-2].x,street->c[street->count-2].y); ! } ! vehicle_set_position(this,target); ! } else { ! dbg(1,"BAD ! street->count = %i\n",street->count); ! } ! } else { ! dbg(1,"Looks like we can move\n"); ! vehicle_set_position(this,target); } - return 1; } --- 535,553 ---- } ! h=route_path_coord_open(vehicle_route); ! if (!h) { ! dbg(1,"navit_path_coord_open NOK\n"); return 1; } ! c=route_path_coord_get(h); ! dbg(1,"current pos=%p\n", c); ! if (c) ! dbg(1,"current pos=0x%x,0x%x\n", c->x, c->y); ! c=route_path_coord_get(h); ! dbg(1,"next pos=%p\n", c); ! if (c) { ! dbg(1,"next pos=0x%x,0x%x\n", c->x, c->y); ! vehicle_set_position(this,c); } return 1; } Index: route.c =================================================================== RCS file: /cvsroot/navit/navit/src/route.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** route.c 9 Oct 2007 16:57:38 -0000 1.17 --- route.c 9 Oct 2007 19:03:06 -0000 1.18 *************** *** 497,500 **** --- 497,602 ---- } + struct route_path_coord_handle { + struct route *route; + int pos; /* -1 = Begin, 0 = Middle, 1 = End */ + int dir; + int spos; + struct coord last; + struct route_info_handle *ri; + struct route_path_handle *rp; + struct street_data *street_data; + }; + + struct route_path_coord_handle * + route_path_coord_open(struct route *this) + { + struct route_path_coord_handle *ret; + + if (! route_get_pos(this) || ! route_get_dst(this)) + return NULL; + + ret=g_new0(struct route_path_coord_handle, 1); + ret->route=this; + ret->ri=route_info_open(route_get_pos(this), route_get_dst(this), 0); + if (!ret->ri) { + ret->ri=route_info_open(route_get_pos(this), NULL, 0); + ret->pos=-1; + } + else + ret->pos=1; + return ret; + } + + struct coord * + route_path_coord_get(struct route_path_coord_handle *h) + { + struct coord *c; + struct route_path_segment *seg; + struct item *item, *item2; + struct map_rect *mr; + + switch(h->pos) { + case -1: + c=route_info_get(h->ri); + if (c) { + h->last=*c; + return c; + } + h->pos=0; + h->rp=route_path_open(h->route); + case 0: + if (! h->street_data) { + seg=route_path_get_segment(h->rp); + if (seg) { + item=route_path_segment_get_item(seg); + mr=map_rect_new(item->map,NULL); + item2=map_rect_get_item_byid(mr, item->id_hi, item->id_lo); + h->street_data=street_get_data(item2); + map_rect_destroy(mr); + if (h->street_data->c[0].x == h->last.x && h->street_data->c[0].y == h->last.y) { + h->spos=1; + h->dir=1; + } else { + h->spos=h->street_data->count-2; + h->dir=-1; + } + } + } + if (h->street_data) { + c=&h->street_data->c[h->spos]; + h->last=*c; + h->spos+=h->dir; + if (h->spos < 0 || h->spos >= h->street_data->count) { + street_data_free(h->street_data); + h->street_data=NULL; + } + return c; + } + h->pos=1; + case 1: + c=route_info_get(h->ri); + if (c) { + h->last=*c; + return c; + } + h->pos=2; + default: + return NULL; + } + + } + + void + route_path_coord_close(struct route_path_coord_handle *h) + { + if (h->street_data) + street_data_free(h->street_data); + if (h->rp) + route_path_close(h->rp); + if (h->ri) + route_info_close(h->ri); + g_free(h); + } + static void Index: route.h =================================================================== RCS file: /cvsroot/navit/navit/src/route.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** route.h 9 Oct 2007 16:48:41 -0000 1.9 --- route.h 9 Oct 2007 19:03:06 -0000 1.10 *************** *** 12,15 **** --- 12,22 ---- }; + struct street_data { + struct item item; + int count; + int limit; + struct coord c[0]; + }; + #define route_item_first type_street_0 #define route_item_last type_ferry *************** *** 20,34 **** struct displaylist; struct item; - - #ifndef STREETDATA - #define STREETDATA - struct street_data { - struct item item; - int count; - int limit; - struct coord c[0]; - }; - #endif - struct map_selection; struct mapset; --- 27,30 ---- *************** *** 36,39 **** --- 32,36 ---- struct route_info; struct route_info_handle; + struct route_path_coord_handle; struct route_path_handle; struct route_path_segment; *************** *** 61,64 **** --- 58,64 ---- int route_path_segment_get_time(struct route_path_segment *s); void route_path_close(struct route_path_handle *h); + struct route_path_coord_handle *route_path_coord_open(struct route *this); + struct coord *route_path_coord_get(struct route_path_coord_handle *h); + void route_path_coord_close(struct route_path_coord_handle *h); int route_time(int *speedlist, struct item *item, int len); int route_info_length(struct route_info *pos, struct route_info *dst, int dir); |
From: Martin S. <mar...@us...> - 2007-10-09 18:14:30
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7779/src Modified Files: attr_def.h coord.c graphics.c item_def.h log.c log.h navit.c transform.c vehicle.c vehicle.h xmlconfig.c Log Message: Fixed some errors in demo vehicle, added logging system, renamed this to this_ in vehicle.c Index: graphics.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** graphics.c 9 Oct 2007 16:57:38 -0000 1.16 --- graphics.c 9 Oct 2007 18:14:27 -0000 1.17 *************** *** 361,369 **** gc->meth.gc_set_linewidth(gc->priv, e->u.polyline.width); gra->meth.draw_circle(gra->priv, gc->priv, &di->pnt[0], e->u.circle.radius); ! p.x=di->pnt[0].x+3; ! p.y=di->pnt[0].y+10; ! if (! gra->font[e->label_size]) ! gra->font[e->label_size]=graphics_font_new(gra, e->label_size*20); ! gra->meth.draw_text(gra->priv, gra->gc[2]->priv, gra->gc[1]->priv, gra->font[e->label_size]->priv, di->label, &p, 0x10000, 0); break; case element_label: --- 361,371 ---- gc->meth.gc_set_linewidth(gc->priv, e->u.polyline.width); gra->meth.draw_circle(gra->priv, gc->priv, &di->pnt[0], e->u.circle.radius); ! if (e->label_size) { ! p.x=di->pnt[0].x+3; ! p.y=di->pnt[0].y+10; ! if (! gra->font[e->label_size]) ! gra->font[e->label_size]=graphics_font_new(gra, e->label_size*20); ! gra->meth.draw_text(gra->priv, gra->gc[2]->priv, gra->gc[1]->priv, gra->font[e->label_size]->priv, di->label, &p, 0x10000, 0); ! } break; case element_label: *************** *** 505,509 **** g_assert(count < max); if (!transform_contains(t, pro, &r)) { ! dbg(1,"not visible\n"); continue; } --- 507,511 ---- g_assert(count < max); if (!transform_contains(t, pro, &r)) { ! dbg(1,"poly not visible\n"); continue; } Index: item_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/item_def.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** item_def.h 28 Aug 2007 20:09:29 -0000 1.7 --- item_def.h 9 Oct 2007 18:14:27 -0000 1.8 *************** *** 64,67 **** --- 64,68 ---- ITEM(poi) ITEM(waypoint) + ITEM(trackpoint) ITEM(bookmark) ITEM(former_destination) *************** *** 121,124 **** --- 122,126 ---- ITEM(height_line_1) ITEM(height_line_2) + ITEM(track) /* Area */ ITEM2(0xc0000000,area) Index: attr_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr_def.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** attr_def.h 4 Oct 2007 17:51:15 -0000 1.8 --- attr_def.h 9 Oct 2007 18:14:27 -0000 1.9 *************** *** 21,28 **** ATTR(x) ATTR(y) ATTR2(type_int_end,0x0002ffff) ATTR2(type_string_begin,0x00030000) ! ATTR(skin) ATTR(label) ATTR(data) --- 21,32 ---- ATTR(x) ATTR(y) + ATTR(flush_size) + ATTR(flush_time) + /* boolean */ + ATTR(overwrite) ATTR2(type_int_end,0x0002ffff) ATTR2(type_string_begin,0x00030000) ! ATTR(type) ATTR(label) ATTR(data) *************** *** 44,47 **** --- 48,52 ---- ATTR(entry_fee) ATTR(open_hours) + ATTR(skin) /* poi */ ATTR(icon) Index: transform.c =================================================================== RCS file: /cvsroot/navit/navit/src/transform.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** transform.c 4 Jul 2007 22:44:33 -0000 1.3 --- transform.c 9 Oct 2007 18:14:27 -0000 1.4 *************** *** 90,93 **** --- 90,94 ---- xc=c->x; yc=c->y; + dbg(2,"0x%x, 0x%x - 0x%x,0x%x contains 0x%x,0x%x\n", t->r.lu.x, t->r.lu.y, t->r.rl.x, t->r.rl.y, c->x, c->y); ret=coord_rect_contains(&t->r, c); xc-=t->center.x; Index: vehicle.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** vehicle.c 9 Oct 2007 16:51:30 -0000 1.23 --- vehicle.c 9 Oct 2007 18:14:27 -0000 1.24 *************** *** 23,35 **** #include "statusbar.h" #include "navit.h" #include "vehicle.h" #include "item.h" #include "route.h" ! int vfd; ! ! ! static void disable_watch(struct vehicle *this); [...1104 lines suppressed...] + this_->gpx_log=log; + log_set_header(log,header,strlen(header)); + log_set_trailer(log,trailer,strlen(trailer)); + } else if (!strcmp(type->u.str,"textfile")) { + char *header="type=track\n"; + this_->textfile_log=log; + log_set_header(log,header,strlen(header)); + } else + return 1; + return 0; + } + void ! vehicle_destroy(struct vehicle *this_) { ! vehicle_close(this_); ! callback_list_destroy(this_->cbl); ! g_free(this_->url); ! g_free(this_); } Index: log.c =================================================================== RCS file: /cvsroot/navit/navit/src/log.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** log.c 5 Jul 2007 20:59:56 -0000 1.4 --- log.c 9 Oct 2007 18:14:27 -0000 1.5 *************** *** 4,89 **** #include <string.h> #include <stdlib.h> #include "file.h" ! #include "map_data.h" #include "log.h" ! void ! log_write(char *message, struct file *file, void *data, int size) { ! char log[4096]; ! char *l; ! unsigned char *p=data; ! int fd=open("log.txt",O_RDWR|O_CREAT|O_APPEND|O_SYNC, 0644); ! sprintf(log,"# %s\n",message); ! l=log+strlen(log); ! sprintf(l, "%s 0x%x ", file->name, p-file->begin); ! l=log+strlen(log); ! while (size) { ! sprintf(l,"%02x ", *p++); ! l+=3; ! size--; } ! *l++='\n'; ! *l='\0'; ! write(fd, log, strlen(log)); ! close(fd); } void ! log_apply(struct map_data *map, int files) { ! char buffer[4096],*p; ! char *filename, *addr; ! struct file *file; ! unsigned char *data; ! unsigned long dataval; ! struct map_data *curr; ! int j; ! FILE *f=fopen("log.txt","r"); ! if (!f) ! return; ! while (fgets(buffer, 4096, f)) { ! if (buffer[0] != '#') { ! buffer[strlen(buffer)-1]='\0'; ! filename=buffer; ! p=buffer; ! while (*p && *p != ' ') ! p++; ! if (! *p) ! continue; ! *p++=0; ! file=NULL; ! curr=map; ! while (curr) { ! for(j = 0 ; j < files ; j++) { ! if (curr->file[j] && !strcmp(curr->file[j]->name, filename)) { ! file=curr->file[j]; ! break; ! } ! } ! if (file) ! break; ! curr=curr->next; ! } ! if (file) { ! addr=p; ! while (*p && *p != ' ') ! p++; ! if (! *p) ! continue; ! *p++=0; ! data=file->begin+strtoul(addr, NULL, 16); ! while (*p) { ! dataval=strtoul(p, NULL, 16); ! *data++=dataval; ! p+=2; ! while (*p == ' ') ! p++; ! } ! } ! } ! } ! fclose(f); } --- 4,210 ---- #include <string.h> #include <stdlib.h> + #include <time.h> + #include <sys/time.h> + #include <glib.h> #include "file.h" ! #include "item.h" ! #include "debug.h" #include "log.h" ! struct log_data { ! int len; ! int max_len; ! char *data; ! }; ! ! struct log { ! FILE *f; ! int overwrite; ! int empty; ! int flush_size; ! int flush_time; ! guint timer; ! struct timeval last_flush; ! char *filename; ! char *filename_ex1; ! char *filename_ex2; ! struct log_data header; ! struct log_data data; ! struct log_data trailer; ! }; ! ! static void ! strftime_localtime(char *buffer, int size, char *fmt) { ! time_t t; ! struct tm *tm; ! t=time(NULL); ! tm=localtime(&t); ! strftime(buffer, 4096, fmt, tm); ! } ! ! static void ! expand_filenames(struct log *this_) ! { ! char buffer[4096]; ! int i; ! ! strftime_localtime(buffer, 4096, this_->filename); ! this_->filename_ex1=g_strdup(buffer); ! if (strstr(this_->filename_ex1,"%i")) { ! i=0; ! do { ! g_free(this_->filename_ex2); ! this_->filename_ex2=g_strdup_printf(this_->filename_ex1,i++); ! } while (file_exists(this_->filename_ex2)); ! } else ! this_->filename_ex2=g_strdup(this_->filename_ex1); ! } ! ! static void ! log_open(struct log *this_) ! { ! char *mode; ! if (this_->overwrite) ! mode="w"; ! else ! mode="a"; ! this_->f=fopen(this_->filename_ex2, mode); ! this_->empty = !ftell(this_->f); ! } ! ! static void ! log_close(struct log *this_) ! { ! if (this_->trailer.len) ! fwrite(this_->header.data, 1, this_->trailer.len, this_->f); ! fflush(this_->f); ! fclose(this_->f); ! this_->f=NULL; ! } ! ! static void ! log_flush(struct log *this_) ! { ! if (this_->empty) { ! if (this_->header.len) ! fwrite(this_->header.data, 1, this_->header.len, this_->f); ! if (this_->header.len || this_->data.len) ! this_->empty=0; } ! fwrite(this_->data.data, 1, this_->data.len, this_->f); ! fflush(this_->f); ! g_free(this_->data.data); ! this_->data.data=NULL; ! this_->data.max_len=this_->data.len=0; ! gettimeofday(&this_->last_flush, NULL); ! } ! ! static int ! log_flush_required(struct log *this_) ! { ! return this_->data.len > this_->flush_size; ! } ! ! ! static void ! log_change(struct log *this_) ! { ! log_flush(this_); ! log_close(this_); ! log_open(this_); ! } ! ! static int ! log_change_required(struct log *this_) ! { ! char buffer[4096]; ! ! strftime_localtime(buffer, 4096, this_->filename); ! return (strcmp(this_->filename_ex1, buffer) != 0); ! } ! ! static gboolean ! log_timer(gpointer data) ! { ! struct log *this_=data; ! struct timeval tv; ! int delta; ! gettimeofday(&tv, NULL); ! delta=(tv.tv_sec-this_->last_flush.tv_sec)*1000+(tv.tv_usec-this_->last_flush.tv_usec)/1000; ! if (this_->flush_time && delta > this_->flush_time*1000) ! log_flush(this_); ! ! return TRUE; ! } ! ! struct log * ! log_new(struct attr **attrs) ! { ! struct log *ret=g_new0(struct log, 1); ! struct attr *data,*overwrite,*flush_size,*flush_time; ! ! dbg(0,"enter\n"); ! data=attr_search(attrs, NULL, attr_data); ! if (! data) ! return NULL; ! ret->filename=g_strdup(data->u.str); ! overwrite=attr_search(attrs, NULL, attr_overwrite); ! if (overwrite) ! ret->overwrite=overwrite->u.num; ! flush_size=attr_search(attrs, NULL, attr_flush_size); ! if (flush_size) ! ret->flush_size=flush_size->u.num; ! flush_time=attr_search(attrs, NULL, attr_flush_time); ! if (flush_time) ! ret->flush_time=flush_time->u.num; ! if (ret->flush_time) ! ret->timer=g_timeout_add(ret->flush_time*1000, log_timer, ret); ! expand_filenames(ret); ! log_open(ret); ! return ret; } void ! log_set_header(struct log *this_, char *data, int len) { ! this_->header.data=g_malloc(len); ! this_->header.max_len=this_->header.len=len; ! memcpy(this_->header.data, data, len); ! } ! void ! log_set_trailer(struct log *this_, char *data, int len) ! { ! this_->trailer.data=g_malloc(len); ! this_->trailer.max_len=this_->trailer.len=len; ! memcpy(this_->trailer.data, data, len); ! } ! ! void ! log_write(struct log *this_, char *data, int len) ! { ! dbg(1,"enter\n"); ! if (log_change_required(this_)) ! log_change(this_); ! if (this_->data.len + len > this_->data.max_len) { ! dbg(2,"overflow\n"); ! this_->data.max_len+=16384; ! this_->data.data=g_realloc(this_->data.data,this_->data.max_len); ! } ! memcpy(this_->data.data+this_->data.len, data, len); ! this_->data.len+=len; ! if (log_flush_required(this_)) ! log_flush(this_); ! } ! ! void ! log_destroy(struct log *this_) ! { ! if (this_->timer) ! g_source_remove(this_->timer); ! log_flush(this_); ! log_close(this_); ! g_free(this_); } Index: coord.c =================================================================== RCS file: /cvsroot/navit/navit/src/coord.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** coord.c 8 Jul 2007 15:48:38 -0000 1.5 --- coord.c 9 Oct 2007 18:14:27 -0000 1.6 *************** *** 184,189 **** if (args < 2) return 0; ! printf("str='%s' x=%f y=%f c=%d\n", str, lng, lat, ret); ! printf("rest='%s'\n", str+ret); } if (debug) --- 184,192 ---- if (args < 2) return 0; ! dbg(1,"str='%s' x=%f y=%f c=%d\n", str, lng, lat, ret); ! dbg(1,"rest='%s'\n", str+ret); ! g.lng=lng; ! g.lat=lat; ! transform_from_geo(pro, &g, c_ret); } if (debug) Index: xmlconfig.c =================================================================== RCS file: /cvsroot/navit/navit/src/xmlconfig.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** xmlconfig.c 3 Sep 2007 07:43:15 -0000 1.16 --- xmlconfig.c 9 Oct 2007 18:14:27 -0000 1.17 *************** *** 18,23 **** #include "graphics.h" #include "gui.h" - #include "xmlconfig.h" #include "osd.h" --- 18,24 ---- #include "graphics.h" #include "gui.h" #include "osd.h" + #include "log.h" + #include "xmlconfig.h" *************** *** 271,274 **** --- 272,289 ---- static int + xmlconfig_log(struct xmlstate *state) + { + struct attr **attrs; + attrs=convert_to_attrs(state); + state->element_object = log_new(attrs); + if (! state->element_object) + return 0; + if (vehicle_add_log(state->parent->element_object, state->element_object, attrs)) + return 0; + return 1; + } + + + static int xmlconfig_window_items(struct xmlstate *state) { *************** *** 612,615 **** --- 627,631 ---- { "speed", "route", xmlconfig_speed}, { "vehicle", "navit", xmlconfig_vehicle}, + { "log", "vehicle", xmlconfig_log}, { "window_items", "navit", xmlconfig_window_items}, { "plugins", NULL, xmlconfig_plugins}, Index: log.h =================================================================== RCS file: /cvsroot/navit/navit/src/log.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** log.h 9 Oct 2007 16:48:35 -0000 1.2 --- log.h 9 Oct 2007 18:14:27 -0000 1.3 *************** *** 1,8 **** #ifndef NAVIT_LOG_H #define NAVIT_LOG_H ! ! void log_write(char *message, struct file *file, void *data, int size); ! void log_apply(struct map_data *map, int files); ! #endif - --- 1,12 ---- #ifndef NAVIT_LOG_H #define NAVIT_LOG_H ! /* prototypes */ ! struct attr; ! struct log; ! struct log *log_new(struct attr **attrs); ! void log_set_header(struct log *this_, char *data, int len); ! void log_set_trailer(struct log *this_, char *data, int len); ! void log_write(struct log *this_, char *data, int len); ! void log_destroy(struct log *this_); ! /* end of prototypes */ #endif Index: vehicle.h =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** vehicle.h 9 Oct 2007 16:48:44 -0000 1.15 --- vehicle.h 9 Oct 2007 18:14:27 -0000 1.16 *************** *** 7,12 **** --- 7,15 ---- /* prototypes */ enum projection; + struct attr; struct callback; struct coord; + struct log; + struct navit; struct vehicle; enum projection vehicle_projection(struct vehicle *this_); *************** *** 20,27 **** double *vehicle_pdop_get(struct vehicle *this_); void vehicle_set_position(struct vehicle *this_, struct coord *pos); ! void vehicle_set_navit(struct vehicle *this_,struct navit *nav); struct vehicle *vehicle_new(const char *url); void vehicle_callback_add(struct vehicle *this_, struct callback *cb); void vehicle_callback_remove(struct vehicle *this_, struct callback *cb); void vehicle_destroy(struct vehicle *this_); /* end of prototypes */ --- 23,31 ---- double *vehicle_pdop_get(struct vehicle *this_); void vehicle_set_position(struct vehicle *this_, struct coord *pos); ! void vehicle_set_navit(struct vehicle *this_, struct navit *nav); struct vehicle *vehicle_new(const char *url); void vehicle_callback_add(struct vehicle *this_, struct callback *cb); void vehicle_callback_remove(struct vehicle *this_, struct callback *cb); + int vehicle_add_log(struct vehicle *this_, struct log *log, struct attr **attrs); void vehicle_destroy(struct vehicle *this_); /* end of prototypes */ Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** navit.c 4 Oct 2007 17:51:15 -0000 1.32 --- navit.c 9 Oct 2007 18:14:27 -0000 1.33 *************** *** 56,60 **** struct transformation *trans; struct compass *compass; - struct map_data *map_data; struct menu *menu; struct menu *toolbar; --- 56,59 ---- |
From: KaZeR <ka...@us...> - 2007-10-09 17:04:43
|
Update of /cvsroot/navit/navit/src/gui/gtk In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9397 Modified Files: gui_gtk_statusbar.c Log Message: Moved street_data to route.h Index: gui_gtk_statusbar.c =================================================================== RCS file: /cvsroot/navit/navit/src/gui/gtk/gui_gtk_statusbar.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gui_gtk_statusbar.c 4 Jul 2007 22:44:44 -0000 1.3 --- gui_gtk_statusbar.c 9 Oct 2007 17:04:43 -0000 1.4 *************** *** 4,7 **** --- 4,8 ---- #include <math.h> #include <gtk/gtk.h> + #include "item.h" #include "coord.h" #include "route.h" |
From: KaZeR <ka...@us...> - 2007-10-09 16:57:47
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5524 Modified Files: compass.c graphics.c navigation.c phrase.c route.c track.c Log Message: Moved street_data to route.h Index: compass.c =================================================================== RCS file: /cvsroot/navit/navit/src/compass.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** compass.c 4 Jul 2007 22:44:21 -0000 1.7 --- compass.c 9 Oct 2007 16:57:38 -0000 1.8 *************** *** 6,9 **** --- 6,10 ---- #include "graphics.h" #include "transform.h" + #include "item.h" #include "route.h" #include "vehicle.h" Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** navigation.c 4 Oct 2007 17:51:15 -0000 1.23 --- navigation.c 9 Oct 2007 16:57:38 -0000 1.24 *************** *** 56,67 **** }; - struct street_data { - struct item item; - int count; - int limit; - struct coord c[0]; - }; - - struct navigation * navigation_new(struct mapset *ms) --- 56,59 ---- Index: route.c =================================================================== RCS file: /cvsroot/navit/navit/src/route.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** route.c 28 Aug 2007 17:31:13 -0000 1.16 --- route.c 9 Oct 2007 16:57:38 -0000 1.17 *************** *** 76,87 **** }; - - struct street_data { - struct item item; - int count; - int limit; - struct coord c[0]; - }; - struct route_info { struct coord c; --- 76,79 ---- *************** *** 128,132 **** static void route_path_update(struct route *this); - static void route_path_destroy(struct route_path *this) --- 120,123 ---- Index: graphics.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** graphics.c 29 Aug 2007 18:32:13 -0000 1.15 --- graphics.c 9 Oct 2007 16:57:38 -0000 1.16 *************** *** 14,20 **** #include "profile.h" #include "mapset.h" #include "route.h" #include "util.h" - #include "layout.h" struct graphics --- 14,20 ---- #include "profile.h" #include "mapset.h" + #include "layout.h" #include "route.h" #include "util.h" struct graphics Index: phrase.c =================================================================== RCS file: /cvsroot/navit/navit/src/phrase.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** phrase.c 8 Jul 2007 16:42:08 -0000 1.5 --- phrase.c 9 Oct 2007 16:57:38 -0000 1.6 *************** *** 2,5 **** --- 2,6 ---- #include <glib.h> #include "coord.h" + #include "item.h" #include "route.h" #include "speech.h" Index: track.c =================================================================== RCS file: /cvsroot/navit/navit/src/track.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** track.c 7 Sep 2007 12:04:57 -0000 1.12 --- track.c 9 Oct 2007 16:57:38 -0000 1.13 *************** *** 22,33 **** #endif - struct street_data { - struct item item; - int count; - int limit; - struct coord c[0]; - }; - - struct tracking_line --- 22,25 ---- |
From: KaZeR <ka...@us...> - 2007-10-09 16:55:25
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4425 Modified Files: attr.h Log Message: Added include checks Index: attr.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** attr.h 3 Sep 2007 13:05:30 -0000 1.7 --- attr.h 9 Oct 2007 16:55:22 -0000 1.8 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_ATTR_H + #define NAVIT_ATTR_H + #ifdef __cplusplus extern "C" { *************** *** 38,39 **** --- 41,44 ---- } #endif + + #endif |
From: KaZeR <ka...@us...> - 2007-10-09 16:51:30
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv337 Modified Files: vehicle.c Log Message: Worked on demo vehicle Index: vehicle.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** vehicle.c 5 Oct 2007 17:15:23 -0000 1.22 --- vehicle.c 9 Oct 2007 16:51:30 -0000 1.23 *************** *** 24,27 **** --- 24,29 ---- #include "navit.h" #include "vehicle.h" + #include "item.h" + #include "route.h" int vfd; *************** *** 505,511 **** vehicle_demo_timer (struct vehicle *this) { ! // dbg(0,"Entering simulation loop\n"); if(!this->navit){ ! dbg(0,"vehicle->navit is not set. Can't simulate\n"); return 1; } --- 507,513 ---- vehicle_demo_timer (struct vehicle *this) { ! dbg(1,"###### Entering simulation loop\n"); if(!this->navit){ ! dbg(1,"vehicle->navit is not set. Can't simulate\n"); return 1; } *************** *** 513,554 **** // <cp15> Then check whether the route is set, if not return TRUE struct route * vehicle_route=navit_get_route(this->navit); ! if(vehicle_route){ ! // dbg(0,"navit_get_route OK\n"); ! } else { ! dbg(0,"navit_get_route NOK\n"); return 1; } - - //<cp15> Then check whether a position is set. If not, there are two possibilities - //<cp15> - return TRUE, waiting for the user to set a position - //<cp15> - Use the map center as position... Don't know what makes more sense - - // <cp15> Then query the second point of the route_inf and move your position a bit towards this point - // <cp15> and return TRUE - - // <cp15> Don't know whether it works in every case, since route_inf might contain only one point if you are exactly on a node - - - // <cp15> Usually you use route_info_open to query the points at the first (pos!=NULL) or last (dst!=NULL) route segment struct route_info_handle *h; struct route_info *pos; h=route_info_open(NULL, pos, 0); if (! h) { ! dbg(0,"route_info_handle is null\n"); return 1; } ! struct coord *c; while ((c=route_info_get(h))) { ! dbg(0,"c=%lx,%lx\n", c->x,c->y); } ! // <cp15> But you have one problem here: If the first and the last route segment are the same (you are close to your destination), this will give no sensible results, since the last point will always be at the end of a segment ! // <cp15> So try route_info_open(pos,dst) first: If it works, you are close to the destination, and the result will be as expected ! // <cp15> If it doesn't work (segments are different) use route_info_open(pos, NULL) ! dbg(0,"end of loop\n"); return 1; } --- 515,623 ---- // <cp15> Then check whether the route is set, if not return TRUE struct route * vehicle_route=navit_get_route(this->navit); ! if(!vehicle_route){ ! dbg(1,"navit_get_route NOK\n"); return 1; } struct route_info_handle *h; struct route_info *pos; + dbg(2,"calling route_get_pos\n"); + pos=route_get_pos(vehicle_route); + + struct coord *current_pos=vehicle_pos_get(this); + dbg(1,"vehicle is at %lx,%lx\n",current_pos->x,current_pos->y); + if(!pos){ + dbg(1,"Pos is NULL, can't continue\n"); + return 1; + } + dbg(2,"opening the handle\n"); + // Obtain end coordinates of current segment h=route_info_open(NULL, pos, 0); + dbg(2,"handle opened\n"); if (! h) { ! dbg(1,"route_info_handle is null\n"); return 1; } ! struct coord *c,*target; ! int i=0; ! target=0; while ((c=route_info_get(h))) { ! i++; ! dbg(1,"#%i: c=%lx,%lx\n", i,c->x,c->y); ! if(!target){ ! target=c; ! dbg(1,"moving toward #%i\n",i); ! } else { ! dbg(1,"target is not null, i keep the last destination choice\n"); ! } } + if((target->x==current_pos->x)&&(target->y==current_pos->y)){ + dbg(1,"Looks like we are already at the end of the segment\n"); + // There was only one point left on the segment. + // We have to find the next segment. + struct route_path_handle *rp=route_path_open(vehicle_route); + if(!rp){ + dbg(1,"** rp is null!\n"); + return 1; + } ! struct route_path_segment *seg=route_path_get_segment(rp); ! if(!seg){ ! dbg(1,"********************** seg is null!\n"); ! return 1; ! } ! dbg(1,"seg=%p\n",seg); ! // FIXME : following block can probably be removed ! /* ! seg=route_path_get_segment(rp); ! if(!seg){ ! dbg(1,"******************* seg2 is null!\n"); ! return 1; ! } ! dbg(1,"seg (2) =%p\n",seg); ! */ ! struct item *item=route_path_segment_get_item(seg); ! if(!item){ ! dbg(2,"** item is null!\n"); ! return 1; ! } else { ! dbg(2,"item->id_hi = %lx & item->id_lo = %lx item = %lx and item->type = %lx\n",item->id_hi,item->id_lo,item,item->type); ! } ! ! ! struct map_rect *mr=map_rect_new(item->map,NULL); ! struct item *item2=map_rect_get_item_byid(mr, item->id_hi, item->id_lo); ! ! struct street_data *street=street_get_data(item2); ! if(!street){ ! dbg(1,"** street_data is null!\n"); ! return 1; ! } ! ! ! if(street->count){ ! dbg(1,"vehicle is at %lx,%lx (2)\n",current_pos->x,current_pos->y); ! dbg(1,"street->c[0] = %lx, street->c[street->count-1]= %lx (2)\n",street->c[0],street->c[street->count-1]); ! if((current_pos->x==street->c[i].x)&&(current_pos->y==street->c[i].y)){ ! target->x=street->c[1].x; ! target->y=street->c[1].y; ! dbg(1,"Moving to : street->c[0] (%lx,%lx)\n",street->c[0].x,street->c[0].y); ! } else { ! target->x=street->c[street->count-1].x; ! target->y=street->c[street->count-1].y; ! dbg(1,"Moving to : street->c[street->count-1] (%lx,%lx)\n",street->c[street->count-1].x,street->c[street->count-1].y); ! } ! vehicle_set_position(this,target); ! } else { ! dbg(1,"BAD ! street->count = %i\n",street->count); ! } ! } else { ! dbg(1,"Looks like we can move\n"); ! vehicle_set_position(this,target); ! } ! return 1; } |
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28411 Modified Files: item.h layer.h layout.h log.h main.h map_data.h map.h mapset.h map-share.h maptype.h menu.h navigation.h navit.h osd.h param.h phrase.h plugin.h point.h popup.h profile.h projection.h route.h search.h speech.h statusbar.h track.h transform.h types.h util.h vehicle.h xmlconfig.h Log Message: Added include checks Index: navigation.h =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** navigation.h 4 Oct 2007 17:51:15 -0000 1.8 --- navigation.h 9 Oct 2007 16:48:37 -0000 1.9 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_NAVIGATION_H + #define NAVIT_NAVIGATION_H + #ifdef __cplusplus extern "C" { *************** *** 25,26 **** --- 28,31 ---- } #endif + + #endif Index: mapset.h =================================================================== RCS file: /cvsroot/navit/navit/src/mapset.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mapset.h 4 Jul 2007 22:44:26 -0000 1.2 --- mapset.h 9 Oct 2007 16:48:36 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_MAPSET_H + #define NAVIT_MAPSET_H + /* prototypes */ struct attr; *************** *** 15,16 **** --- 18,22 ---- struct item *mapset_search_get_item(struct mapset_search *this); void mapset_search_destroy(struct mapset_search *this); + + #endif + Index: profile.h =================================================================== RCS file: /cvsroot/navit/navit/src/profile.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** profile.h 4 Jul 2007 22:44:31 -0000 1.2 --- profile.h 9 Oct 2007 16:48:40 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_PROFILE_H + #define NAVIT_PROFILE_H + #ifdef __cplusplus extern "C" { *************** *** 7,8 **** --- 10,14 ---- } #endif + + #endif + Index: menu.h =================================================================== RCS file: /cvsroot/navit/navit/src/menu.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** menu.h 4 Jul 2007 22:44:27 -0000 1.2 --- menu.h 9 Oct 2007 16:48:37 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_MENU_H + #define NAVIT_MENU_H + enum menu_type { menu_type_submenu, *************** *** 26,27 **** --- 29,33 ---- void menu_set_toggle(struct menu *menu, int active); int menu_get_toggle(struct menu *menu); + + #endif + Index: point.h =================================================================== RCS file: /cvsroot/navit/navit/src/point.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** point.h 2 Dec 2005 10:41:56 -0000 1.1 --- point.h 9 Oct 2007 16:48:39 -0000 1.2 *************** *** 1,4 **** ! #ifndef POINT_H ! #define POINT_H struct point { --- 1,4 ---- ! #ifndef NAVIT_POINT_H ! #define NAVIT_POINT_H struct point { Index: util.h =================================================================== RCS file: /cvsroot/navit/navit/src/util.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** util.h 5 Jul 2007 20:43:59 -0000 1.3 --- util.h 9 Oct 2007 16:48:44 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_types_H + #define NAVIT_types_H + #include <ctype.h> *************** *** 4,5 **** --- 7,11 ---- void strtolower(char *dest, const char *src); GList * g_hash_to_list(GHashTable *h); + + #endif + Index: popup.h =================================================================== RCS file: /cvsroot/navit/navit/src/popup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** popup.h 4 Jul 2007 22:44:31 -0000 1.2 --- popup.h 9 Oct 2007 16:48:40 -0000 1.3 *************** *** 1,3 **** --- 1,8 ---- + #ifndef NAVIT_POPUP_H + #define NAVIT_POPUP_H + struct navit; struct point; void popup(struct navit *nav, int button, struct point *p); + + #endif Index: xmlconfig.h =================================================================== RCS file: /cvsroot/navit/navit/src/xmlconfig.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xmlconfig.h 4 Jul 2007 22:44:34 -0000 1.2 --- xmlconfig.h 9 Oct 2007 16:48:44 -0000 1.3 *************** *** 1,3 **** --- 1,8 ---- + #ifndef NAVIT_XMLCONFIG_H + #define NAVIT_XMLCONFIG_H struct container; gboolean config_load(char *filename,GError **error); + + #endif + Index: transform.h =================================================================== RCS file: /cvsroot/navit/navit/src/transform.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** transform.h 4 Jul 2007 22:44:33 -0000 1.4 --- transform.h 9 Oct 2007 16:48:43 -0000 1.5 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_TRANSFORM_H + #define NAVIT_TRANSFORM_H + #ifdef __cplusplus extern "C" { *************** *** 46,47 **** --- 49,52 ---- } #endif + + #endif Index: osd.h =================================================================== RCS file: /cvsroot/navit/navit/src/osd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** osd.h 29 Aug 2007 18:32:13 -0000 1.2 --- osd.h 9 Oct 2007 16:48:38 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_OSD_H + #define NAVIT_OSD_H + struct osd_methods { void (*osd_destroy)(struct osd_priv *osd); *************** *** 9,10 **** --- 12,16 ---- struct osd *osd_new(struct navit *nav, const char *type, struct attr **attrs); /* end of prototypes */ + + #endif + Index: track.h =================================================================== RCS file: /cvsroot/navit/navit/src/track.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** track.h 2 Oct 2007 20:36:43 -0000 1.5 --- track.h 9 Oct 2007 16:48:42 -0000 1.6 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_TRACK_H + #define NAVIT_TRACK_H + #ifdef __cplusplus extern "C" { *************** *** 19,20 **** --- 22,25 ---- } #endif + + #endif Index: layout.h =================================================================== RCS file: /cvsroot/navit/navit/src/layout.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** layout.h 5 Jul 2007 16:15:42 -0000 1.3 --- layout.h 9 Oct 2007 16:48:34 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_LAYOUT_H + #define NAVIT_LAYOUT_H + #include "item.h" #include "color.h" *************** *** 58,59 **** --- 61,65 ---- struct element *icon_new(const char *src); struct element *image_new(void); + + #endif + Index: phrase.h =================================================================== RCS file: /cvsroot/navit/navit/src/phrase.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** phrase.h 2 Dec 2005 10:41:56 -0000 1.1 --- phrase.h 9 Oct 2007 16:48:38 -0000 1.2 *************** *** 1,2 **** --- 1,8 ---- + #ifndef NAVIT_PHRASE_H + #define NAVIT_PHRASE_H + void phrase_route_calc(void *speech); void phrase_route_calculated(void *speech, void *route); + + #endif + Index: map-share.h =================================================================== RCS file: /cvsroot/navit/navit/src/map-share.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** map-share.h 2 Dec 2005 10:41:56 -0000 1.1 --- map-share.h 9 Oct 2007 16:48:36 -0000 1.2 *************** *** 1,2 **** --- 1,8 ---- + #ifndef NAVIT_MAP_SHARE_H + #define NAVIT_MAP_SHARE_H + void map_srv_start_poa(CORBA_ORB orb, CORBA_Environment * ev); CORBA_Object map_srv_start_object(CORBA_Environment * ev, struct container *co); + + #endif + Index: statusbar.h =================================================================== RCS file: /cvsroot/navit/navit/src/statusbar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** statusbar.h 4 Jul 2007 22:44:32 -0000 1.2 --- statusbar.h 9 Oct 2007 16:48:42 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_STATUSBAR_H + #define NAVIT_STATUSBAR_H + struct route; struct statusbar_priv; *************** *** 17,18 **** --- 20,24 ---- /* prototypes */ + + #endif + Index: route.h =================================================================== RCS file: /cvsroot/navit/navit/src/route.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** route.h 9 Jul 2007 22:18:29 -0000 1.8 --- route.h 9 Oct 2007 16:48:41 -0000 1.9 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_ROUTE_H + #define NAVIT_ROUTE_H + struct route_crossing { long segid; *************** *** 12,16 **** #define route_item_last type_ferry - /* prototypes */ enum item_type; --- 15,18 ---- *************** *** 18,21 **** --- 20,34 ---- struct displaylist; struct item; + + #ifndef STREETDATA + #define STREETDATA + struct street_data { + struct item item; + int count; + int limit; + struct coord c[0]; + }; + #endif + struct map_selection; struct mapset; *************** *** 61,62 **** --- 74,78 ---- void route_draw(struct route *this, struct transformation *t, struct displaylist *dsp); /* end of prototypes */ + + #endif + Index: plugin.h =================================================================== RCS file: /cvsroot/navit/navit/src/plugin.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** plugin.h 8 Jul 2007 17:46:27 -0000 1.4 --- plugin.h 9 Oct 2007 16:48:39 -0000 1.5 *************** *** 126,127 **** --- 126,129 ---- } #endif + + Index: speech.h =================================================================== RCS file: /cvsroot/navit/navit/src/speech.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** speech.h 8 Jul 2007 20:41:35 -0000 1.3 --- speech.h 9 Oct 2007 16:48:42 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_SPEECH_H + #define NAVIT_SPEECH_H + struct speech_priv; *************** *** 12,13 **** --- 15,19 ---- void speech_destroy(struct speech *this_); /* end of prototypes */ + + #endif + Index: types.h =================================================================== RCS file: /cvsroot/navit/navit/src/types.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** types.h 26 Sep 2006 09:08:55 -0000 1.2 --- types.h 9 Oct 2007 16:48:43 -0000 1.3 *************** *** 1,4 **** ! #ifndef _TYPES_H_ ! #define _TYPES_H_ #include <stdint.h> --- 1,4 ---- ! #ifndef NAVIT_TYPES_H ! #define NAVIT_TYPES_H #include <stdint.h> Index: map.h =================================================================== RCS file: /cvsroot/navit/navit/src/map.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** map.h 28 Aug 2007 17:31:09 -0000 1.5 --- map.h 9 Oct 2007 16:48:36 -0000 1.6 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_MAP_H + #define NAVIT_MAP_H + struct map_priv; struct attr; *************** *** 49,50 **** --- 52,55 ---- void map_search_destroy(struct map_search *this); /* end of prototypes */ + + #endif Index: main.h =================================================================== RCS file: /cvsroot/navit/navit/src/main.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.h 8 Jul 2007 18:37:45 -0000 1.3 --- main.h 9 Oct 2007 16:48:35 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_MAIN_H + #define NAVIT_MAIN_H + /* prototypes */ struct navit; *************** *** 5,6 **** --- 8,12 ---- int main(int argc, char **argv); /* end of prototypes */ + + #endif + Index: vehicle.h =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** vehicle.h 4 Oct 2007 17:49:46 -0000 1.14 --- vehicle.h 9 Oct 2007 16:48:44 -0000 1.15 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_VEHICLE_H + #define NAVIT_VEHICLE_H + #ifdef __cplusplus extern "C" { *************** *** 27,28 **** --- 30,33 ---- #endif + #endif + Index: layer.h =================================================================== RCS file: /cvsroot/navit/navit/src/layer.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** layer.h 4 Jul 2007 22:44:24 -0000 1.2 --- layer.h 9 Oct 2007 16:48:34 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_LAYER_H + #define NAVIT_LAYER_H + enum layer_type { layer_town=0, *************** *** 5,6 **** --- 8,12 ---- layer_end, }; + + #endif + Index: param.h =================================================================== RCS file: /cvsroot/navit/navit/src/param.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** param.h 2 Dec 2005 10:41:56 -0000 1.1 --- param.h 9 Oct 2007 16:48:38 -0000 1.2 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_PARAM_H + #define NAVIT_PARAM_H + struct param_list { char *name; *************** *** 8,9 **** --- 11,15 ---- void param_add_hex(char *name, unsigned long value, struct param_list **param, int *count); void param_add_hex_sig(char *name, long value, struct param_list **param, int *count); + + #endif + Index: search.h =================================================================== RCS file: /cvsroot/navit/navit/src/search.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** search.h 4 Jul 2007 22:44:32 -0000 1.2 --- search.h 9 Oct 2007 16:48:41 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_SEARCH_H + #define NAVIT_SEARCH_H + #ifdef __cplusplus extern "C" { *************** *** 44,45 **** --- 47,51 ---- } #endif + + #endif + Index: maptype.h =================================================================== RCS file: /cvsroot/navit/navit/src/maptype.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** maptype.h 5 Jul 2007 21:01:54 -0000 1.3 --- maptype.h 9 Oct 2007 16:48:37 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_MAPTYPE_H + #define NAVIT_MAPTYPE_H + struct map_methods; *************** *** 14,15 **** --- 17,21 ---- void maptype_register(char *name, struct map_priv *(*map_new)(struct map_methods *meth, char *data, char **charset, enum projection *pro)); struct maptype *maptype_get(const char *name); + + #endif + Index: projection.h =================================================================== RCS file: /cvsroot/navit/navit/src/projection.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** projection.h 4 Jul 2007 22:44:31 -0000 1.2 --- projection.h 9 Oct 2007 16:48:40 -0000 1.3 *************** *** 1,3 **** --- 1,9 ---- + #ifndef NAVIT_PROJECTION_H + #define NAVIT_PROJECTION_H + enum projection { projection_none, projection_mg, projection_garmin }; + + #endif + Index: item.h =================================================================== RCS file: /cvsroot/navit/navit/src/item.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** item.h 28 Aug 2007 17:31:09 -0000 1.5 --- item.h 9 Oct 2007 16:48:34 -0000 1.6 *************** *** 1,2 **** --- 1,4 ---- + #ifndef NAVIT_ITEM_H + #define NAVIT_ITEM_H *************** *** 52,53 **** --- 54,58 ---- void item_hash_destroy(struct item_hash *h); /* end of prototypes */ + + #endif + Index: navit.h =================================================================== RCS file: /cvsroot/navit/navit/src/navit.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** navit.h 7 Sep 2007 12:04:57 -0000 1.16 --- navit.h 9 Oct 2007 16:48:38 -0000 1.17 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_NAVIT_H + #define NAVIT_NAVIT_H + #ifdef __cplusplus extern "C" { *************** *** 82,83 **** --- 85,89 ---- } #endif + + #endif + Index: log.h =================================================================== RCS file: /cvsroot/navit/navit/src/log.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** log.h 2 Dec 2005 10:41:56 -0000 1.1 --- log.h 9 Oct 2007 16:48:35 -0000 1.2 *************** *** 1,2 **** --- 1,8 ---- + #ifndef NAVIT_LOG_H + #define NAVIT_LOG_H + void log_write(char *message, struct file *file, void *data, int size); void log_apply(struct map_data *map, int files); + + #endif + Index: map_data.h =================================================================== RCS file: /cvsroot/navit/navit/src/map_data.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** map_data.h 2 Dec 2005 10:41:56 -0000 1.1 --- map_data.h 9 Oct 2007 16:48:35 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + #ifndef NAVIT_MAP_DATA_H + #define NAVIT_MAP_DATA_H enum file_index { *************** *** 29,30 **** --- 31,35 ---- void map_data_foreach(struct map_data *mdata, int file, struct transformation *t, int limit, void(*func)(struct block_info *, unsigned char *, unsigned char *, void *), void *data); + + #endif + |
From: KaZeR <ka...@us...> - 2007-10-09 16:44:31
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21655 Modified Files: callback.h color.h compass.h coord.h country.h cursor.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h file.h graphics.h gtkext.h gui.h Log Message: Added include checks Index: gtkext.h =================================================================== RCS file: /cvsroot/navit/navit/src/gtkext.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gtkext.h 2 Dec 2005 10:41:56 -0000 1.1 --- gtkext.h 9 Oct 2007 16:44:10 -0000 1.2 *************** *** 1 **** --- 1,6 ---- + #ifndef NAVIT_GTKEXT_H + #define NAVIT_GTKEXT_H + void gdk_gc_set_fill_rule(GdkGC *gc, GdkFillRule fill_rule); + + #endif Index: coord.h =================================================================== RCS file: /cvsroot/navit/navit/src/coord.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** coord.h 4 Jul 2007 22:44:21 -0000 1.4 --- coord.h 9 Oct 2007 16:44:05 -0000 1.5 *************** *** 1,4 **** ! #ifndef COORD_H ! #define COORD_H /*! A integer mercator coordinate */ --- 1,4 ---- ! #ifndef NAVIT_COORD_H ! #define NAVIT_COORD_H /*! A integer mercator coordinate */ Index: compass.h =================================================================== RCS file: /cvsroot/navit/navit/src/compass.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compass.h 2 Dec 2005 10:41:56 -0000 1.1 --- compass.h 9 Oct 2007 16:44:04 -0000 1.2 *************** *** 1,2 **** --- 1,7 ---- + #ifndef NAVIT_COMPASS_H + #define NAVIT_COMPASS_H + struct compass * compass_new(struct container *co); void compass_draw(struct compass *comp, struct container *co); + + #endif Index: debug.h =================================================================== RCS file: /cvsroot/navit/navit/src/debug.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** debug.h 3 Oct 2007 20:36:54 -0000 1.9 --- debug.h 9 Oct 2007 16:44:08 -0000 1.10 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_DEBUG_H + #define NAVIT_DEBUG_H + #ifdef __cplusplus extern "C" { *************** *** 18,19 **** --- 21,25 ---- } #endif + + #endif + Index: file.h =================================================================== RCS file: /cvsroot/navit/navit/src/file.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** file.h 5 Jul 2007 20:43:59 -0000 1.5 --- file.h 9 Oct 2007 16:44:09 -0000 1.6 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_FILE_H + #define NAVIT_FILE_H + #include "param.h" *************** *** 32,33 **** --- 35,39 ---- int file_get_param(struct file *file, struct param_list *param, int count); /* end of prototypes */ + + #endif + Index: data.h =================================================================== RCS file: /cvsroot/navit/navit/src/data.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** data.h 4 Jul 2007 22:44:21 -0000 1.5 --- data.h 9 Oct 2007 16:44:06 -0000 1.6 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_DATA_H + #define NAVIT_DATA_H + static inline unsigned char get_u8(unsigned char **p) *************** *** 60,61 **** --- 63,66 ---- #define L(x) ({ unsigned char *t=(unsigned char *)&(x); t[0] | (t[1] << 8) | (t[2] << 16) | (t[3] << 24); }) + #endif + Index: data_window_int.h =================================================================== RCS file: /cvsroot/navit/navit/src/data_window_int.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** data_window_int.h 28 Dec 2005 17:15:46 -0000 1.2 --- data_window_int.h 9 Oct 2007 16:44:07 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + #ifndef NAVIT_DATA_WINDOW_INT_H + #define NAVIT_DATA_WINDOW_INT_H struct data_window { *************** *** 6,7 **** --- 8,12 ---- void(*callback)(struct data_window *, char **cols); }; + + #endif + Index: country.h =================================================================== RCS file: /cvsroot/navit/navit/src/country.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** country.h 4 Jul 2007 22:44:21 -0000 1.2 --- country.h 9 Oct 2007 16:44:05 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_COUNTRY_H + #define NAVIT_COUNTRY_H + /* prototypes */ struct attr; *************** *** 6,7 **** --- 9,12 ---- struct item *country_search_get_item(struct country_search *this); void country_search_destroy(struct country_search *this); + + #endif Index: destination.h =================================================================== RCS file: /cvsroot/navit/navit/src/destination.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** destination.h 4 Jul 2007 22:44:22 -0000 1.2 --- destination.h 9 Oct 2007 16:44:08 -0000 1.3 *************** *** 1,4 **** --- 1,10 ---- + #ifndef NAVIT_DESTINATION_H + #define NAVIT_DESTINATION_H + /* prototypes */ struct navit; int destination_address(struct navit *nav); /* end of prototypes */ + + #endif + Index: gui.h =================================================================== RCS file: /cvsroot/navit/navit/src/gui.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gui.h 28 Aug 2007 17:31:08 -0000 1.5 --- gui.h 9 Oct 2007 16:44:10 -0000 1.6 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_GUI_H + #define NAVIT_GUI_H + struct navit; struct gui_priv; *************** *** 46,47 **** --- 49,53 ---- int gui_run_main_loop(struct gui *this_); /* end of prototypes */ + + #endif + Index: draw_info.h =================================================================== RCS file: /cvsroot/navit/navit/src/draw_info.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** draw_info.h 2 Dec 2005 10:41:56 -0000 1.1 --- draw_info.h 9 Oct 2007 16:44:08 -0000 1.2 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_DRAW_INFO_H + #define NAVIT_DRAW_INFO_H + struct draw_info { struct container *co; *************** *** 4,5 **** --- 7,11 ---- int limit; }; + + #endif + Index: callback.h =================================================================== RCS file: /cvsroot/navit/navit/src/callback.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** callback.h 22 Jul 2007 18:04:30 -0000 1.8 --- callback.h 9 Oct 2007 16:44:03 -0000 1.9 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_CALLBACK_H + #define NAVIT_CALLBACK_H + #ifdef __cplusplus extern "C" { *************** *** 73,74 **** --- 76,80 ---- } #endif + + #endif + Index: cursor.h =================================================================== RCS file: /cvsroot/navit/navit/src/cursor.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** cursor.h 11 Aug 2007 13:23:45 -0000 1.9 --- cursor.h 9 Oct 2007 16:44:06 -0000 1.10 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_CURSOR_H + #define NAVIT_CURSOR_H + /* prototypes */ struct callback; *************** *** 15,16 **** --- 18,21 ---- void cursor_add_callback(struct cursor *this, struct callback *cb); /* end of prototypes */ + + #endif Index: graphics.h =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** graphics.h 3 Sep 2007 07:43:14 -0000 1.8 --- graphics.h 9 Oct 2007 16:44:09 -0000 1.9 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_GRAPHICS_H + #define NAVIT_GRAPHICS_H + #ifdef __cplusplus extern "C" { *************** *** 129,130 **** --- 132,136 ---- } #endif + + #endif + Index: data_window.h =================================================================== RCS file: /cvsroot/navit/navit/src/data_window.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** data_window.h 12 Jul 2007 14:20:58 -0000 1.2 --- data_window.h 9 Oct 2007 16:44:07 -0000 1.3 *************** *** 1,2 **** --- 1,5 ---- + #ifndef NAVIT_DATA_WINDOW_H + #define NAVIT_DATA_WINDOW_H + struct datawindow; struct param_list; *************** *** 18,19 **** --- 21,25 ---- void datawindow_add(struct datawindow *win, struct param_list *param, int count); void datawindow_mode(struct datawindow *win, int start); + + #endif + Index: color.h =================================================================== RCS file: /cvsroot/navit/navit/src/color.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** color.h 4 Jul 2007 22:44:20 -0000 1.2 --- color.h 9 Oct 2007 16:44:03 -0000 1.3 *************** *** 1,3 **** --- 1,8 ---- + #ifndef NAVIT_COLOR_H + #define NAVIT_COLOR_H + struct color { int r,g,b; }; + + #endif |
From: KaZeR <ka...@us...> - 2007-10-09 12:40:55
|
Update of /cvsroot/navit/navit/src/gui/sdl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12823 Modified Files: gui_sdl_window.cpp Log Message: Fixed UTF-8 in graphics rendering Index: gui_sdl_window.cpp =================================================================== RCS file: /cvsroot/navit/navit/src/gui/sdl/gui_sdl_window.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** gui_sdl_window.cpp 4 Oct 2007 17:51:16 -0000 1.19 --- gui_sdl_window.cpp 9 Oct 2007 12:40:55 -0000 1.20 *************** *** 546,549 **** --- 546,550 ---- + // FIXME This should maybe move to navit.xml static char *datafiles_path[]={ "./gui/sdl/datafiles", *************** *** 565,568 **** --- 566,570 ---- if(*filename==NULL){ + // FIXME Elaborate the possible solutions printf("Can't find the datafiles directory for CEGUI files. Navit will probably crash :)\n"); } else { *************** *** 677,696 **** exit(1); } - - char * fontname="/usr/share/fonts/corefonts/verdana.ttf"; - - // printf("Gui initialized. Building fonts\n"); - - - int ctx = 0; - int font = 0; - ctx = glcGenContext(); - glcContext(ctx); - font = glcNewFontFromFamily(glcGenFontID(), "Arial"); - glcFont(font); - // glcFontFace(font, "Italic"); - - // printf("Fonts built. Ready to rock!\n"); - } --- 679,682 ---- |
From: KaZeR <ka...@us...> - 2007-10-09 12:40:13
|
Update of /cvsroot/navit/navit/src/graphics/opengl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12572 Modified Files: graphics_opengl.c Log Message: Fixed UTF-8 in graphics rendering Index: graphics_opengl.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/opengl/graphics_opengl.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** graphics_opengl.c 28 Aug 2007 17:31:19 -0000 1.4 --- graphics_opengl.c 9 Oct 2007 12:40:11 -0000 1.5 *************** *** 15,29 **** struct graphics_priv { - #if 0 - GdkEventButton button_event; - #endif int button_timeout; - #if 0 - GtkWidget *widget; - GdkDrawable *drawable; - GdkDrawable *background; - GdkColormap *colormap; - FT_Library library; - #endif struct point p; int width; --- 15,19 ---- *************** *** 59,65 **** struct graphics_image_priv { - #if 0 - GdkPixbuf *pixbuf; - #endif int w; int h; --- 49,52 ---- *************** *** 71,74 **** --- 58,64 ---- } + + // http://quesoglc.sourceforge.net/tutorial.php + /* static char *fontlist[]={ "/usr/X11R6/lib/X11/fonts/msttcorefonts/arial.ttf", *************** *** 79,95 **** NULL, }; ! ! #if 0 ! static char *fontlist_bd[]={ ! "/usr/X11R6/lib/X11/fonts/msttcorefonts/arialbd.ttf", ! "/usr/X11R6/lib/X11/fonts/truetype/arialbd.ttf", ! "/usr/share/fonts/truetype/msttcorefonts/arialbd.ttf", ! "/usr/share/fonts/ttf/arialbd.ttf", ! "/usr/share/fonts/corefonts/arialbd.ttf", ! NULL, ! }; ! #endif ! ! static void font_destroy(struct graphics_font_priv *font) --- 69,73 ---- NULL, }; ! */ static void font_destroy(struct graphics_font_priv *font) *************** *** 154,157 **** --- 132,136 ---- } + static void gc_set_foreground(struct graphics_gc_priv *gc, struct color *c) *************** *** 517,520 **** --- 496,502 ---- glRotatef(angle,0,0,1); glScalef(14, 14, 0.); + // dbg(1,"rendering label : %s\n",label); + // char *utf8; + // utf8=g_locale_to_utf8(label,-1,NULL,NULL,NULL); glcRenderString(label); glPopMatrix(); *************** *** 904,907 **** --- 886,899 ---- this->DLid = glGenLists(1); + // Initialize the fonts + int ctx = 0; + int font = 0; + ctx = glcGenContext(); + glcContext(ctx); + font = glcNewFontFromFamily(glcGenFontID(), "Verdana"); + glcFont(font); + glcStringType(GLC_UTF8_QSO); + // glcFontFace(font, "Italic"); + /* |
From: KaZeR <ka...@us...> - 2007-10-05 17:15:24
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16497 Modified Files: vehicle.c Log Message: Worked on demo vehicle Index: vehicle.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** vehicle.c 4 Oct 2007 17:49:46 -0000 1.21 --- vehicle.c 5 Oct 2007 17:15:23 -0000 1.22 *************** *** 503,506 **** --- 503,558 ---- static int + vehicle_demo_timer (struct vehicle *this) + { + // dbg(0,"Entering simulation loop\n"); + if(!this->navit){ + dbg(0,"vehicle->navit is not set. Can't simulate\n"); + return 1; + } + + // <cp15> Then check whether the route is set, if not return TRUE + struct route * vehicle_route=navit_get_route(this->navit); + if(vehicle_route){ + // dbg(0,"navit_get_route OK\n"); + } else { + dbg(0,"navit_get_route NOK\n"); + return 1; + } + + + //<cp15> Then check whether a position is set. If not, there are two possibilities + //<cp15> - return TRUE, waiting for the user to set a position + //<cp15> - Use the map center as position... Don't know what makes more sense + + // <cp15> Then query the second point of the route_inf and move your position a bit towards this point + // <cp15> and return TRUE + + // <cp15> Don't know whether it works in every case, since route_inf might contain only one point if you are exactly on a node + + + // <cp15> Usually you use route_info_open to query the points at the first (pos!=NULL) or last (dst!=NULL) route segment + struct route_info_handle *h; + struct route_info *pos; + h=route_info_open(NULL, pos, 0); + + if (! h) { + dbg(0,"route_info_handle is null\n"); + return 1; + } + + struct coord *c; + while ((c=route_info_get(h))) { + dbg(0,"c=%lx,%lx\n", c->x,c->y); + } + + + // <cp15> But you have one problem here: If the first and the last route segment are the same (you are close to your destination), this will give no sensible results, since the last point will always be at the end of a segment + // <cp15> So try route_info_open(pos,dst) first: If it works, you are close to the destination, and the result will be as expected + // <cp15> If it doesn't work (segments are different) use route_info_open(pos, NULL) + dbg(0,"end of loop\n"); + return 1; + } + + static int vehicle_open(struct vehicle *this) { *************** *** 567,570 **** --- 619,623 ---- } else if (! strncmp(this->url,"demo://",7)) { dbg(0,"Creating a demo vehicle\n"); + g_timeout_add(1000, vehicle_demo_timer, this); } this->iochan=g_io_channel_unix_new(fd); |
From: Martin S. <mar...@us...> - 2007-10-04 17:51:19
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15385/src Modified Files: attr_def.h navigation.c navigation.h navit.c Log Message: Changed api for navigation_list Index: navigation.h =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** navigation.h 12 Jul 2007 14:21:03 -0000 1.7 --- navigation.h 4 Oct 2007 17:51:15 -0000 1.8 *************** *** 2,16 **** extern "C" { #endif - enum navigation_mode { - navigation_mode_long, - navigation_mode_long_exact, - navigation_mode_short, - navigation_mode_speech, - }; - /* prototypes */ enum item_type; - enum navigation_mode; struct callback; struct mapset; struct navigation; --- 2,10 ---- extern "C" { #endif /* prototypes */ + enum attr_type; enum item_type; struct callback; + struct item; struct mapset; struct navigation; *************** *** 21,30 **** int navigation_set_announce(struct navigation *this_, enum item_type type, int *level); struct navigation_list *navigation_list_new(struct navigation *this_); ! char *navigation_list_get(struct navigation_list *this_, enum navigation_mode mode); void navigation_list_destroy(struct navigation_list *this_); void navigation_update(struct navigation *this_, struct route *route); void navigation_destroy(struct navigation *this_); ! int navigation_register_callback(struct navigation *this_, enum navigation_mode mode, struct callback *cb); ! void navigation_unregister_callback(struct navigation *this_, enum navigation_mode mode, struct callback *cb); /* end of prototypes */ #ifdef __cplusplus --- 15,24 ---- int navigation_set_announce(struct navigation *this_, enum item_type type, int *level); struct navigation_list *navigation_list_new(struct navigation *this_); ! struct item *navigation_list_get_item(struct navigation_list *this_); void navigation_list_destroy(struct navigation_list *this_); void navigation_update(struct navigation *this_, struct route *route); void navigation_destroy(struct navigation *this_); ! int navigation_register_callback(struct navigation *this_, enum attr_type type, struct callback *cb); ! void navigation_unregister_callback(struct navigation *this_, enum attr_type type, struct callback *cb); /* end of prototypes */ #ifdef __cplusplus Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** navigation.c 28 Aug 2007 17:31:11 -0000 1.22 --- navigation.c 4 Oct 2007 17:51:15 -0000 1.23 *************** *** 47,52 **** --- 47,57 ---- struct navigation *nav; struct navigation_command *cmd; + struct navigation_command *cmd_next; struct navigation_itm *itm; + struct navigation_itm *itm_next; + struct item item; + #if 0 char *str; + #endif }; *************** *** 170,176 **** static char * ! get_distance(int dist, enum navigation_mode mode, int is_length) { ! if (mode == navigation_mode_long) { if (is_length) return g_strdup_printf(_("%d m"), dist); --- 175,181 ---- static char * ! get_distance(int dist, enum attr_type type, int is_length) { ! if (type == attr_navigation_long) { if (is_length) return g_strdup_printf(_("%d m"), dist); *************** *** 420,424 **** static char * ! show_maneuver(struct navigation *nav, struct navigation_itm *itm, struct navigation_command *cmd, enum navigation_mode mode) { char *dir=_("right"),*strength=""; --- 425,429 ---- static char * ! show_maneuver(struct navigation *nav, struct navigation_itm *itm, struct navigation_command *cmd, enum attr_type type) { char *dir=_("right"),*strength=""; *************** *** 443,449 **** strength=_("unknown "); } ! if (mode != navigation_mode_long_exact) distance=round_distance(distance); ! if (mode == navigation_mode_speech) { if (nav->turn_around) return g_strdup(_("When possible, please turn around")); --- 448,454 ---- strength=_("unknown "); } ! if (type != attr_navigation_long_exact) distance=round_distance(distance); ! if (type == attr_navigation_speech) { if (nav->turn_around) return g_strdup(_("When possible, please turn around")); *************** *** 453,457 **** switch(level) { case 3: ! d=get_distance(distance, mode, 1); ret=g_strdup_printf(_("Follow the road for the next %s"), d); g_free(d); --- 458,462 ---- switch(level) { case 3: ! d=get_distance(distance, type, 1); ret=g_strdup_printf(_("Follow the road for the next %s"), d); g_free(d); *************** *** 461,465 **** break; case 1: ! d=get_distance(distance, mode, 0); break; case 0: --- 466,470 ---- break; case 1: ! d=get_distance(distance, type, 0); break; case 0: *************** *** 494,497 **** --- 499,527 ---- } + static int + navigation_list_item_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) + { + struct navigation_list *this_=priv_data; + switch(attr_type) { + case attr_navigation_short: + case attr_navigation_long: + case attr_navigation_long_exact: + case attr_navigation_speech: + attr->u.str=show_maneuver(this_->nav, this_->itm, this_->cmd, attr_type); + return 1; + default: + return 0; + } + } + + struct item_methods navigation_list_item_methods = { + NULL, + NULL, + NULL, + navigation_list_item_attr_get, + }; + + + struct navigation_list * navigation_list_new(struct navigation *this_) *************** *** 499,518 **** struct navigation_list *ret=g_new0(struct navigation_list, 1); ret->nav=this_; ! ret->cmd=this_->cmd_first; ! ret->itm=this_->first; return ret; } ! char * ! navigation_list_get(struct navigation_list *this_, enum navigation_mode mode) { ! if (!this_->cmd) return NULL; ! g_free(this_->str); this_->str=show_maneuver(this_->nav, this_->itm, this_->cmd, mode); ! this_->itm=this_->cmd->itm; ! this_->cmd=this_->cmd->next; ! return this_->str; } --- 529,553 ---- struct navigation_list *ret=g_new0(struct navigation_list, 1); ret->nav=this_; ! ret->cmd_next=this_->cmd_first; ! ret->itm_next=this_->first; ! ret->item.meth=&navigation_list_item_methods; ! ret->item.priv_data=ret; return ret; } ! struct item * ! navigation_list_get_item(struct navigation_list *this_) { ! if (!this_->cmd_next) return NULL; ! this_->cmd=this_->cmd_next; ! this_->itm=this_->itm_next; ! #if 0 this_->str=show_maneuver(this_->nav, this_->itm, this_->cmd, mode); ! #endif ! this_->itm_next=this_->cmd->itm; ! this_->cmd_next=this_->cmd->next; ! return &this_->item; } *************** *** 521,525 **** navigation_list_destroy(struct navigation_list *this_) { - g_free(this_->str); g_free(this_); } --- 556,559 ---- *************** *** 643,649 **** int ! navigation_register_callback(struct navigation *this_, enum navigation_mode mode, struct callback *cb) { ! if (mode == navigation_mode_speech) callback_list_add(this_->callback_speech, cb); else --- 677,683 ---- int ! navigation_register_callback(struct navigation *this_, enum attr_type type, struct callback *cb) { ! if (type == attr_navigation_speech) callback_list_add(this_->callback_speech, cb); else *************** *** 653,659 **** void ! navigation_unregister_callback(struct navigation *this_, enum navigation_mode mode, struct callback *cb) { ! if (mode == navigation_mode_speech) callback_list_remove_destroy(this_->callback_speech, cb); else --- 687,693 ---- void ! navigation_unregister_callback(struct navigation *this_, enum attr_type type, struct callback *cb) { ! if (type == attr_navigation_speech) callback_list_remove_destroy(this_->callback_speech, cb); else Index: attr_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr_def.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** attr_def.h 3 Oct 2007 13:47:31 -0000 1.7 --- attr_def.h 4 Oct 2007 17:51:15 -0000 1.8 *************** *** 48,50 **** --- 48,55 ---- ATTR(info_html) ATTR(price_html) + /* navigation */ + ATTR(navigation_short) + ATTR(navigation_long) + ATTR(navigation_long_exact) + ATTR(navigation_speech) ATTR2(type_string_end,0x0003ffff) Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** navit.c 4 Oct 2007 17:49:46 -0000 1.31 --- navit.c 4 Oct 2007 17:51:15 -0000 1.32 *************** *** 558,566 **** struct navigation *nav=this_->navigation; struct navigation_list *list; ! char *text; list=navigation_list_new(nav); ! text=navigation_list_get(list, navigation_mode_speech); ! speech_say(this_->speech, text); navigation_list_destroy(list); } --- 558,568 ---- struct navigation *nav=this_->navigation; struct navigation_list *list; ! struct item *item; ! struct attr attr; list=navigation_list_new(nav); ! item=navigation_list_get_item(list); ! if (item_attr_get(item, attr_navigation_speech, &attr)) ! speech_say(this_->speech, attr.u.str); navigation_list_destroy(list); } *************** *** 571,575 **** struct navigation *nav=this_->navigation; struct navigation_list *list; ! char *str; struct param_list param[1]; --- 573,578 ---- struct navigation *nav=this_->navigation; struct navigation_list *list; ! struct item *item; ! struct attr attr; struct param_list param[1]; *************** *** 577,584 **** datawindow_mode(this_->roadbook_window, 1); list=navigation_list_new(nav); ! while ((str=navigation_list_get(list, navigation_mode_long_exact))) { ! dbg(2, "Command='%s'\n", str); param[0].name="Command"; ! param[0].value=str; datawindow_add(this_->roadbook_window, param, 1); } --- 580,589 ---- datawindow_mode(this_->roadbook_window, 1); list=navigation_list_new(nav); ! while ((item=navigation_list_get_item(list))) { ! attr.u.str=NULL; ! item_attr_get(item, attr_navigation_long, &attr); ! dbg(2, "Command='%s'\n", attr.u.str); param[0].name="Command"; ! param[0].value=attr.u.str; datawindow_add(this_->roadbook_window, param, 1); } *************** *** 591,595 **** { dbg(0, "enter\n"); ! navigation_unregister_callback(this_->navigation, navigation_mode_long, this_->roadbook_callback); this_->roadbook_window=NULL; this_->roadbook_callback=NULL; --- 596,600 ---- { dbg(0, "enter\n"); ! navigation_unregister_callback(this_->navigation, attr_navigation_long, this_->roadbook_callback); this_->roadbook_window=NULL; this_->roadbook_callback=NULL; *************** *** 599,603 **** { this_->roadbook_callback=callback_new_1(callback_cast(navit_window_roadbook_update), this_); ! navigation_register_callback(this_->navigation, navigation_mode_long, this_->roadbook_callback); this_->roadbook_window=gui_datawindow_new(this_->gui, "Roadbook", NULL, callback_new_1(callback_cast(navit_window_roadbook_destroy), this_)); navit_window_roadbook_update(this_); --- 604,608 ---- { this_->roadbook_callback=callback_new_1(callback_cast(navit_window_roadbook_update), this_); ! navigation_register_callback(this_->navigation, attr_navigation_long, this_->roadbook_callback); this_->roadbook_window=gui_datawindow_new(this_->gui, "Roadbook", NULL, callback_new_1(callback_cast(navit_window_roadbook_destroy), this_)); navit_window_roadbook_update(this_); *************** *** 833,837 **** if (this_->navigation && this_->speech) { this_->nav_speech_cb=callback_new_1(callback_cast(navit_speak), this_); ! navigation_register_callback(this_->navigation, navigation_mode_speech, this_->nav_speech_cb); #if 0 #endif --- 838,842 ---- if (this_->navigation && this_->speech) { this_->nav_speech_cb=callback_new_1(callback_cast(navit_speak), this_); ! navigation_register_callback(this_->navigation, attr_navigation_speech, this_->nav_speech_cb); #if 0 #endif |
From: Martin S. <mar...@us...> - 2007-10-04 17:51:16
|
Update of /cvsroot/navit/navit/src/gui/sdl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15385/src/gui/sdl Modified Files: gui_sdl_window.cpp Log Message: Changed api for navigation_list Index: gui_sdl_window.cpp =================================================================== RCS file: /cvsroot/navit/navit/src/gui/sdl/gui_sdl_window.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** gui_sdl_window.cpp 6 Sep 2007 16:21:57 -0000 1.18 --- gui_sdl_window.cpp 4 Oct 2007 17:51:16 -0000 1.19 *************** *** 103,107 **** try { ! WindowManager::getSingleton().getWindow("Navit/Routing/Tips")->setText(navigation_list_get(list, navigation_mode_speech)); } catch (CEGUI::Exception& e) --- 103,109 ---- try { ! struct attr attr; ! item_attr_get(navigation_list_get_item(list), attr_navigation_speech, &attr); ! WindowManager::getSingleton().getWindow("Navit/Routing/Tips")->setText(attr.u.str); } catch (CEGUI::Exception& e) *************** *** 123,135 **** mcl->resetList(); ! char *str; list=navigation_list_new(nav); ! while ((str=navigation_list_get(list, navigation_mode_short))) { // printf("SDL : %s\n", str); mcl->addRow(); ! ! ListboxTextItem* itemListbox = new ListboxTextItem(str); itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush"); mcl->setItem(itemListbox, 0, mcl->getRowCount()-1); --- 125,138 ---- mcl->resetList(); ! item *item; ! struct attr attr; list=navigation_list_new(nav); ! while ((item=navigation_list_get_item(list))) { // printf("SDL : %s\n", str); mcl->addRow(); ! item_attr_get(item, attr_navigation_short, &attr); ! ListboxTextItem* itemListbox = new ListboxTextItem(attr.u.str); itemListbox->setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush"); mcl->setItem(itemListbox, 0, mcl->getRowCount()-1); *************** *** 192,196 **** navigation_register_callback(navig, ! navigation_mode_long, callback_new_0((void (*)())sdl_update_roadbook) ); --- 195,199 ---- navigation_register_callback(navig, ! attr_navigation_long, callback_new_0((void (*)())sdl_update_roadbook) ); |
From: KaZeR <ka...@us...> - 2007-10-04 17:49:44
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15245 Modified Files: vehicle.c vehicle.h navit.c Log Message: Worked on demo vehicle Index: vehicle.c =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** vehicle.c 6 Sep 2007 16:21:08 -0000 1.20 --- vehicle.c 4 Oct 2007 17:49:46 -0000 1.21 *************** *** 22,29 **** --- 22,31 ---- #include "projection.h" #include "statusbar.h" + #include "navit.h" #include "vehicle.h" int vfd; + static void disable_watch(struct vehicle *this); static void enable_watch(struct vehicle *this); *************** *** 72,77 **** --- 74,82 ---- int interval; struct sockaddr_in rem; + + struct navit *navit; }; + // FIXME : this is an ugly hack (dixit cp15 ;) ) struct vehicle *vehicle_last; *************** *** 168,171 **** --- 173,183 ---- } + // FIXME Should this function be static ? + void + vehicle_set_navit(struct vehicle *this_,struct navit *nav) { + dbg(0,"vehicle_set_navit called\n"); + this_->navit=nav; + } + static void vehicle_parse_gps(struct vehicle *this, char *buffer) *************** *** 553,556 **** --- 565,570 ---- vehicle_udp_open(this); fd=this->fd; + } else if (! strncmp(this->url,"demo://",7)) { + dbg(0,"Creating a demo vehicle\n"); } this->iochan=g_io_channel_unix_new(fd); *************** *** 567,571 **** gsize size; ! dbg(1,"enter condition=%d\n", condition); if (condition == G_IO_IN) { #ifdef HAVE_LIBGPS --- 581,585 ---- gsize size; ! dbg(0,"enter condition=%d\n", condition); if (condition == G_IO_IN) { #ifdef HAVE_LIBGPS Index: vehicle.h =================================================================== RCS file: /cvsroot/navit/navit/src/vehicle.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** vehicle.h 6 Sep 2007 16:21:09 -0000 1.13 --- vehicle.h 4 Oct 2007 17:49:46 -0000 1.14 *************** *** 17,20 **** --- 17,21 ---- double *vehicle_pdop_get(struct vehicle *this_); void vehicle_set_position(struct vehicle *this_, struct coord *pos); + void vehicle_set_navit(struct vehicle *this_,struct navit *nav); struct vehicle *vehicle_new(const char *url); void vehicle_callback_add(struct vehicle *this_, struct callback *cb); Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** navit.c 4 Oct 2007 17:14:26 -0000 1.30 --- navit.c 4 Oct 2007 17:49:46 -0000 1.31 *************** *** 799,806 **** --- 799,808 ---- l=this_->vehicles; while (l) { + dbg(0,"parsed one vehicle\n"); nv=l->data; nv->cursor=cursor_new(this_->gra, nv->vehicle, &nv->c, this_->trans); nv->update_cb=callback_new_1(callback_cast(navit_cursor_update), this_); cursor_add_callback(nv->cursor, nv->update_cb); + vehicle_set_navit(nv->vehicle, this_); l=g_list_next(l); } |
From: KaZeR <ka...@us...> - 2007-10-04 17:14:29
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9678 Modified Files: navit.c Log Message: Added some explanations about the 'failed to connect graphics to gui' error message Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** navit.c 4 Oct 2007 16:37:18 -0000 1.29 --- navit.c 4 Oct 2007 17:14:26 -0000 1.30 *************** *** 385,390 **** if (this_->route) { route_set_destination(this_->route, c); - if (this_->navigation) - navigation_update(this_->navigation, this_->route); navit_draw(this_); } --- 385,388 ---- *************** *** 781,784 **** --- 779,796 ---- if (!this_->gui || !this_->gra || gui_set_graphics(this_->gui, this_->gra)) { g_warning("failed to connect graphics to gui\n"); + g_warning("It can be one of the following : \n"); + g_warning("- You choosed a gui which doesn't exist or doesn't work"); + g_warning(" -> Check the <plugin path> section of your navit.xml"); + g_warning("- You choosed a graphics which doesn't exist or doesn't work"); + g_warning(" -> Check the <plugin path> section of your navit.xml"); + g_warning("- The graphics driver is not compatible with the gui"); + g_warning(" -> Currently you can use :"); + g_warning(" gtk_drawing_area graphic driver with gtk"); + g_warning(" opengl graphic driver with sdl"); + g_warning(" null graphic driver with both (but do you want that? :) )"); + g_warning(""); + g_warning(" The most common reason is that something went wrong when you compiled navit, and either :"); + g_warning(" - the gui or graphics driver you want to use wasn't compiled, maybe because of a missing dependency"); + g_warning(" - make install didn't install the library where it should have."); navit_destroy(this_); return; |