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: Martin S. <mar...@us...> - 2007-11-01 22:39:24
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29950/src Modified Files: osm2navit.c Log Message: Updated osm2navit for routing Index: osm2navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/osm2navit.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** osm2navit.c 1 Nov 2007 15:16:40 -0000 1.1 --- osm2navit.c 1 Nov 2007 22:39:21 -0000 1.2 *************** *** 135,143 **** char debug_attr_buffer[1024]; static void pad_text_attr(struct attr_bin *a, char *buffer) { int l; ! l=strlen(buffer); while (l % 4) buffer[l++]='\0'; --- 135,148 ---- char debug_attr_buffer[1024]; + struct attr_bin limit_attr = { + 0, attr_limit + }; + int limit_attr_value; + static void pad_text_attr(struct attr_bin *a, char *buffer) { int l; ! l=strlen(buffer)+1; while (l % 4) buffer[l++]='\0'; *************** *** 169,172 **** --- 174,188 ---- return 1; } + if (! strcmp(k,"oneway")) { + if (! strcmp(v,"true") || !strcmp(v,"yes")) { + limit_attr_value=1; + limit_attr.len=2; + } + if (! strcmp(v,"-1")) { + limit_attr_value=2; + limit_attr.len=2; + } + + } value_hash=g_hash_table_lookup(key_hash, k); if (! value_hash) *************** *** 315,318 **** --- 331,335 ---- label_attr.len=0; debug_attr.len=0; + limit_attr.len=0; c=sscanf(p, "<way id=\"%d\"", &wayid); if (c != 1) *************** *** 324,328 **** static void ! write_attr(FILE *out, struct attr_bin *attr, char *buffer) { if (attr->len) { --- 341,345 ---- static void ! write_attr(FILE *out, struct attr_bin *attr, void *buffer) { if (attr->len) { *************** *** 341,344 **** --- 358,363 ---- if (debug_attr.len) alen+=debug_attr.len+1; + if (limit_attr.len) + alen+=limit_attr.len+1; item.clen=coord_count*2; item.len=item.clen+2+alen; *************** *** 347,350 **** --- 366,370 ---- write_attr(out, &label_attr, label_attr_buffer); write_attr(out, &debug_attr, debug_attr_buffer); + write_attr(out, &limit_attr, &limit_attr_value); } *************** *** 357,367 **** if (c != 1) return 0; - #if 0 - node_ref_way(ndref); - #endif ni=node_item_get(ndref); ! if (ni) coord_buffer[coord_count++]=ni->c; ! else { len=strlen(p); if (len > 0 && p[len-1]=='\n') --- 377,390 ---- if (c != 1) return 0; ni=node_item_get(ndref); ! if (ni) { ! #if 0 coord_buffer[coord_count++]=ni->c; ! #else ! coord_buffer[coord_count].y=0; ! coord_buffer[coord_count++].x=ndref; ! #endif ! ni->ref_way++; ! } else { len=strlen(p); if (len > 0 && p[len-1]=='\n') *************** *** 376,379 **** --- 399,427 ---- } + static void + save_buffer(char *filename, struct buffer *b) + { + FILE *f; + f=fopen(filename,"w+"); + fwrite(b->base, b->size, 1, f); + fclose(f); + } + + static void + load_buffer(char *filename, struct buffer *b) + { + FILE *f; + if (b->base) + free(b->base); + b->malloced=0; + f=fopen(filename,"r"); + fseek(f, 0, SEEK_END); + b->size=b->malloced=ftell(f); + fprintf(stderr,"reading %d bytes from %s\n", b->size, filename); + fseek(f, 0, SEEK_SET); + b->base=malloc(b->size); + fread(b->base, b->size, 1, f); + fclose(f); + } static int *************** *** 666,671 **** } static int ! phase2(FILE *in) { struct item_bin *ib; --- 714,771 ---- } + static void + write_item_part(FILE *out, struct item_bin *orig, int first, int last) + { + struct item_bin new; + struct coord *c=(struct coord *)(orig+1); + char *attr=(char *)(c+orig->clen/2); + int attr_len=orig->len-orig->clen-2; + processed_ways++; + new.type=orig->type; + new.clen=(last-first+1)*2; + new.len=new.clen+attr_len+2; + #if 0 + fprintf(stderr,"first %d last %d type 0x%x len %d clen %d attr_len %d\n", first, last, new.type, new.len, new.clen, attr_len); + #endif + fwrite(&new, sizeof(new), 1, out); + fwrite(c+first, new.clen*4, 1, out); + fwrite(attr, attr_len*4, 1, out); + } + static int ! phase2(FILE *in, FILE *out) ! { ! struct coord *c; ! int i,ccount,last,ndref; ! struct item_bin *ib; ! struct node_item *ni; ! ! processed_nodes=processed_ways=processed_relations=processed_tiles=0; ! sig_alrm(0); ! while ((ib=read_item(in))) { ! #if 0 ! fprintf(stderr,"type 0x%x len %d clen %d\n", ib->type, ib->len, ib->clen); ! #endif ! ccount=ib->clen/2; ! c=(struct coord *)(ib+1); ! last=0; ! for (i = 0 ; i < ccount ; i++) { ! ndref=c[i].x; ! ni=node_item_get(ndref); ! c[i]=ni->c; ! if (ni->ref_way > 1 && i != 0 && i != ccount-1 && ib->type >= type_street_nopass && ib->type <= type_ferry) { ! write_item_part(out, ib, last, i); ! last=i; ! } ! } ! write_item_part(out, ib, last, ccount-1); ! } ! sig_alrm(0); ! alarm(0); ! return 0; ! } ! ! static int ! phase3(FILE *in) { struct item_bin *ib; *************** *** 904,908 **** static int ! phase3(FILE *out) { struct zip_eoc eoc = { --- 1004,1008 ---- static int ! phase4(FILE *out) { struct zip_eoc eoc = { *************** *** 963,983 **** int main(int argc, char **argv) { ! FILE *tmp; char *map=g_strdup(attrmap); build_attrmap(map); ! tmp=fopen("tmpfile","w+"); fprintf(stderr,"PROGRESS: Phase 1: collecting data\n"); ! phase1(stdin,tmp); ! fclose(tmp); free(node_buffer.base); node_buffer.base=NULL; node_buffer.malloced=0; node_buffer.size=0; ! fprintf(stderr,"PROGRESS: Phase 2: generating tiles\n"); ! tmp=fopen("tmpfile","r"); ! phase2(tmp); ! fclose(tmp); ! fprintf(stderr,"PROGRESS: Phase 3: assembling map\n"); ! phase3(stdout); return 0; } --- 1063,1096 ---- int main(int argc, char **argv) { ! FILE *tmp1,*tmp2; char *map=g_strdup(attrmap); build_attrmap(map); ! #if 1 ! tmp1=fopen("tmpfile1","w+"); fprintf(stderr,"PROGRESS: Phase 1: collecting data\n"); ! phase1(stdin,tmp1); ! fclose(tmp1); ! #if 0 ! save_buffer("coords",&node_buffer); ! #endif ! #else ! load_buffer("coords",&node_buffer); ! #endif ! tmp1=fopen("tmpfile1","r"); ! tmp2=fopen("tmpfile2","w+"); ! fprintf(stderr,"PROGRESS: Phase 2: finding intersections\n"); ! phase2(tmp1,tmp2); ! fclose(tmp2); ! fclose(tmp1); free(node_buffer.base); node_buffer.base=NULL; node_buffer.malloced=0; node_buffer.size=0; ! fprintf(stderr,"PROGRESS: Phase 3: generating tiles\n"); ! tmp2=fopen("tmpfile2","r"); ! phase3(tmp2); ! fclose(tmp2); ! fprintf(stderr,"PROGRESS: Phase 4: assembling map\n"); ! phase4(stdout); return 0; } |
From: Martin S. <mar...@us...> - 2007-11-01 18:57:52
|
Update of /cvsroot/navit/navit/src/data/binfile In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2695 Modified Files: binfile.c Log Message: Fixed handling of single tiles Index: binfile.c =================================================================== RCS file: /cvsroot/navit/navit/src/data/binfile/binfile.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** binfile.c 1 Nov 2007 15:16:40 -0000 1.2 --- binfile.c 1 Nov 2007 18:57:50 -0000 1.3 *************** *** 179,182 **** --- 179,183 ---- { struct map_rect_priv *mr; + struct tile *t; dbg(1,"map_rect_new_binfile\n"); *************** *** 186,190 **** mr->item.id_hi=0; mr->item.id_lo=0; ! push_zipfile_tile(mr, map->eoc->zipecenn-1); mr->item.meth=&methods_binfile; mr->item.priv_data=mr; --- 187,198 ---- mr->item.id_hi=0; mr->item.id_lo=0; ! if (map->eoc) ! push_zipfile_tile(mr, map->eoc->zipecenn-1); ! else { ! t->start=(int *)(map->fi->begin); ! t->end=(int *)(map->fi->end); ! t->zipfile_num=0; ! push_tile(mr, t); ! } mr->item.meth=&methods_binfile; mr->item.priv_data=mr; *************** *** 255,259 **** r.rl.x=t->pos_coord[2]; r.rl.y=t->pos_coord[1]; ! if (!selection_contains(mr->sel, &r)) { continue; } --- 263,267 ---- r.rl.x=t->pos_coord[2]; r.rl.y=t->pos_coord[1]; ! if (!mr->m->eoc || !selection_contains(mr->sel, &r)) { continue; } *************** *** 271,275 **** { struct tile *t; ! push_zipfile_tile(mr, id_hi); t=mr->t; t->pos=t->start+id_lo; --- 279,284 ---- { struct tile *t; ! if (mr->m->eoc) ! push_zipfile_tile(mr, id_hi); t=mr->t; t->pos=t->start+id_lo; |
From: Martin S. <mar...@us...> - 2007-11-01 15:29:12
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21333 Modified Files: configure.in Log Message: Fixed configure working from another directory Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** configure.in 1 Nov 2007 15:16:38 -0000 1.45 --- configure.in 1 Nov 2007 15:29:09 -0000 1.46 *************** *** 362,365 **** --- 362,366 ---- src/data/textfile/Makefile src/data/binfile/Makefile + src/data/garmin/Makefile src/data/garmin_img/Makefile src/data/poi_geodownload/Makefile *************** *** 388,396 **** ]) - if test -d src/data/garmin; then - if test "x$use_libgarmin" = "xyes"; then - AC_CONFIG_FILES([src/data/garmin/Makefile]) - fi - fi AC_OUTPUT --- 389,392 ---- |
From: Martin S. <mar...@us...> - 2007-11-01 15:21:37
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18008 Modified Files: Makefile.am Log Message: new program osm2navit capable of processing planet.osm, improvements to binfile driver Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Makefile.am 1 Nov 2007 15:16:39 -0000 1.21 --- Makefile.am 1 Nov 2007 15:21:39 -0000 1.22 *************** *** 23,27 **** transform.h track.h util.h vehicle.h xmlconfig.h ! osm2navit_SOURCES = osm2navit.c item.c debug.c navit_LDADD = @NAVIT_LIBS@ @GPSD_LIBS@ -Lfib-1.1 -lfib --- 23,27 ---- transform.h track.h util.h vehicle.h xmlconfig.h ! osm2navit_SOURCES = osm2navit.c item.c debug.c zipfile.h navit_LDADD = @NAVIT_LIBS@ @GPSD_LIBS@ -Lfib-1.1 -lfib |
From: Martin S. <mar...@us...> - 2007-11-01 15:16:46
|
Update of /cvsroot/navit/navit/src/data/binfile In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15524/src/data/binfile Modified Files: binfile.c Log Message: new program osm2navit capable of processing planet.osm, improvements to binfile driver Index: binfile.c =================================================================== RCS file: /cvsroot/navit/navit/src/data/binfile/binfile.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** binfile.c 3 Oct 2007 20:15:57 -0000 1.1 --- binfile.c 1 Nov 2007 15:16:40 -0000 1.2 *************** *** 14,28 **** #include "transform.h" #include "file.h" static int map_id; ! struct map_priv { ! int id; ! char *filename; ! struct file *f; ! }; ! ! struct map_rect_priv { int *start; int *pos; int *pos_coord_start; --- 14,24 ---- #include "transform.h" #include "file.h" + #include "zipfile.h" static int map_id; ! struct tile { int *start; + int *end; int *pos; int *pos_coord_start; *************** *** 31,34 **** --- 27,44 ---- int *pos_attr; int *pos_next; + int zipfile_num; + }; + + struct map_priv { + int id; + char *filename; + struct file *fi; + struct zip_cd *index_cd; + int cde_size; + struct zip_eoc *eoc; + }; + + struct map_rect_priv { + int *start; int *end; enum attr_type attr_last; *************** *** 36,39 **** --- 46,52 ---- struct map_priv *m; struct item item; + int tile_depth; + struct tile tiles[8]; + struct tile *t; }; *************** *** 50,54 **** { struct map_rect_priv *mr=priv_data; ! mr->pos_coord=mr->pos_coord_start; } --- 63,68 ---- { struct map_rect_priv *mr=priv_data; ! struct tile *t=mr->t; ! t->pos_coord=t->pos_coord_start; } *************** *** 57,68 **** { struct map_rect_priv *mr=priv_data; int ret=0; dbg(1,"binfile_coord_get %d\n",count); while (count--) { ! dbg(1,"%p vs %p\n", mr->pos_coord, mr->pos_attr_start); ! if (mr->pos_coord >= mr->pos_attr_start) break; ! c->x=*(mr->pos_coord++); ! c->y=*(mr->pos_coord++); c++; ret++; --- 71,83 ---- { struct map_rect_priv *mr=priv_data; + struct tile *t=mr->t; int ret=0; dbg(1,"binfile_coord_get %d\n",count); while (count--) { ! dbg(1,"%p vs %p\n", t->pos_coord, t->pos_attr_start); ! if (t->pos_coord >= t->pos_attr_start) break; ! c->x=*(t->pos_coord++); ! c->y=*(t->pos_coord++); c++; ret++; *************** *** 75,79 **** { struct map_rect_priv *mr=priv_data; ! mr->pos_attr=mr->pos_attr_start; } --- 90,95 ---- { struct map_rect_priv *mr=priv_data; ! struct tile *t=mr->t; ! t->pos_attr=t->pos_attr_start; } *************** *** 83,106 **** { struct map_rect_priv *mr=priv_data; enum attr_type type; int size; if (attr_type != mr->attr_last) { ! mr->pos_attr=mr->pos_attr_start; mr->attr_last=attr_type; } ! while (mr->pos_attr < mr->pos_next) { ! size=*(mr->pos_attr++); ! type=mr->pos_attr[0]; if (type == attr_type || attr_type == attr_any) { if (attr_type == attr_any) { ! dbg(0,"pos %p attr %s size %d\n", mr->pos_attr-1, attr_to_name(type), size); } attr->type=type; ! attr_data_set(attr, mr->pos_attr+1); ! mr->pos_attr+=size; return 1; } else { ! mr->pos_attr+=size; } } --- 99,123 ---- { struct map_rect_priv *mr=priv_data; + struct tile *t=mr->t; enum attr_type type; int size; if (attr_type != mr->attr_last) { ! t->pos_attr=t->pos_attr_start; mr->attr_last=attr_type; } ! while (t->pos_attr < t->pos_next) { ! size=*(t->pos_attr++); ! type=t->pos_attr[0]; if (type == attr_type || attr_type == attr_any) { if (attr_type == attr_any) { ! dbg(0,"pos %p attr %s size %d\n", t->pos_attr-1, attr_to_name(type), size); } attr->type=type; ! attr_data_set(attr, t->pos_attr+1); ! t->pos_attr+=size; return 1; } else { ! t->pos_attr+=size; } } *************** *** 115,118 **** --- 132,178 ---- }; + static void + push_tile(struct map_rect_priv *mr, struct tile *t) + { + mr->t=&mr->tiles[mr->tile_depth++]; + *(mr->t)=*t; + mr->t->pos=mr->t->pos_next=mr->t->start; + } + + static int + pop_tile(struct map_rect_priv *mr) + { + if (mr->tile_depth <= 1) + return 0; + mr->t=&mr->tiles[--mr->tile_depth-1]; + return 1; + } + + + static void + zipfile_to_tile(struct file *f, struct zip_cd *cd, struct tile *t) + { + char buffer[1024]; + struct zip_lfh *lfh; + lfh=(struct zip_lfh *)(f->begin+cd->zipofst); + strncpy(buffer, lfh->zipname, lfh->zipfnln); + buffer[lfh->zipfnln]='\0'; + dbg(0,"0x%x '%s' %d\n", lfh->ziplocsig, buffer, sizeof(*cd)+cd->zipcfnl); + t->start=(int *)(f->begin+cd->zipofst+sizeof(struct zip_lfh)+lfh->zipfnln); + t->end=t->start+lfh->zipuncmp/4; + } + + static void + push_zipfile_tile(struct map_rect_priv *mr, int zipfile) + { + struct map_priv *m=mr->m; + struct file *f=m->fi; + struct tile t; + struct zip_cd *cd=(struct zip_cd *)(f->begin + m->eoc->zipeofst + zipfile*m->cde_size); + t.zipfile_num=zipfile; + zipfile_to_tile(f, cd, &t); + push_tile(mr, &t); + } + static struct map_rect_priv * map_rect_new_binfile(struct map_priv *map, struct map_selection *sel) *************** *** 124,131 **** mr->m=map; mr->sel=sel; - mr->start=mr->pos=mr->pos_next=map->f->begin; - mr->end=map->f->end; mr->item.id_hi=0; mr->item.id_lo=0; mr->item.meth=&methods_binfile; mr->item.priv_data=mr; --- 184,190 ---- mr->m=map; mr->sel=sel; mr->item.id_hi=0; mr->item.id_lo=0; + push_zipfile_tile(mr, map->eoc->zipecenn-1); mr->item.meth=&methods_binfile; mr->item.priv_data=mr; *************** *** 144,153 **** { int size,coord_size; ! size=*(mr->pos++); ! mr->pos_next=mr->pos+size; ! mr->item.type=*(mr->pos++); ! coord_size=*(mr->pos++); ! mr->pos_coord_start=mr->pos_coord=mr->pos; ! mr->pos_attr_start=mr->pos_attr=mr->pos_coord+coord_size; } --- 203,233 ---- { int size,coord_size; ! struct tile *t=mr->t; ! size=*(t->pos++); ! if (size > 1024*1024 || size < 0) { ! fprintf(stderr,"size=0x%x\n", size); ! #if 0 ! fprintf(stderr,"offset=%d\n", (unsigned char *)(mr->pos)-mr->m->f->begin); ! #endif ! g_error("size error"); ! } ! t->pos_next=t->pos+size; ! mr->item.type=*(t->pos++); ! coord_size=*(t->pos++); ! t->pos_coord_start=t->pos_coord=t->pos; ! t->pos_attr_start=t->pos_attr=t->pos_coord+coord_size; ! } ! ! static int ! selection_contains(struct map_selection *sel, struct coord_rect *r) ! { ! if (! sel) ! return 1; ! while (sel) { ! if (coord_rect_overlap(r, &sel->rect)) ! return 1; ! sel=sel->next; ! } ! return 0; } *************** *** 157,167 **** map_rect_get_item_binfile(struct map_rect_priv *mr) { ! mr->pos=mr->pos_next; ! if (mr->pos >= mr->end) ! return NULL; ! mr->item.id_hi=0; ! mr->item.id_lo=mr->pos-mr->start; ! setup_pos(mr); ! return &mr->item; } --- 237,268 ---- map_rect_get_item_binfile(struct map_rect_priv *mr) { ! struct tile *t; ! for (;;) { ! t=mr->t; ! t->pos=t->pos_next; ! if (t->pos >= t->end) { ! if (pop_tile(mr)) ! continue; ! return NULL; ! } ! mr->item.id_hi=t->zipfile_num; ! mr->item.id_lo=t->pos-t->start; ! setup_pos(mr); ! if (mr->item.type == type_submap) { ! struct coord_rect r; ! r.lu.x=t->pos_coord[0]; ! r.lu.y=t->pos_coord[3]; ! r.rl.x=t->pos_coord[2]; ! r.rl.y=t->pos_coord[1]; ! if (!selection_contains(mr->sel, &r)) { ! continue; ! } ! dbg(1,"0x%x\n", t->pos_attr[5]); ! push_zipfile_tile(mr, t->pos_attr[5]); ! continue; ! ! } ! return &mr->item; ! } } *************** *** 169,173 **** map_rect_get_item_byid_binfile(struct map_rect_priv *mr, int id_hi, int id_lo) { ! mr->pos=mr->start+id_lo; mr->item.id_hi=id_hi; mr->item.id_lo=id_lo; --- 270,277 ---- map_rect_get_item_byid_binfile(struct map_rect_priv *mr, int id_hi, int id_lo) { ! struct tile *t; ! push_zipfile_tile(mr, id_hi); ! t=mr->t; ! t->pos=t->start+id_lo; mr->item.id_hi=id_hi; mr->item.id_lo=id_lo; *************** *** 193,196 **** --- 297,301 ---- struct file_wordexp *wexp; char **wexp_data; + int *magic,cde_index_size; if (! data) return NULL; *************** *** 205,210 **** m->filename=g_strdup(wexp_data[0]); dbg(0,"file_create %s\n", m->filename); ! m->f=file_create(m->filename); file_wordexp_destroy(wexp); return m; } --- 310,328 ---- m->filename=g_strdup(wexp_data[0]); dbg(0,"file_create %s\n", m->filename); ! m->fi=file_create(m->filename); file_wordexp_destroy(wexp); + magic=(int *)(m->fi->begin); + if (*magic == 0x04034b50) { + cde_index_size=sizeof(struct zip_cd)+sizeof("index")-1; + m->eoc=(struct zip_eoc *)(m->fi->end-sizeof(struct zip_eoc)); + m->index_cd=(struct zip_cd *)((char *)m->eoc-cde_index_size); + printf("length %d\n", m->eoc->zipecsz); + printf("entries %d\n", m->eoc->zipecenn); + m->cde_size=(m->eoc->zipecsz-cde_index_size)/(m->eoc->zipecenn-1); + printf("cde_size %d\n", m->cde_size); + printf("length %d\n",m->cde_size*(m->eoc->zipecenn-1)+cde_index_size); + printf("0x%x\n", m->eoc->zipesig); + printf("0x%x\n", m->index_cd->zipcensig); + } return m; } |
From: Martin S. <mar...@us...> - 2007-11-01 15:16:41
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15524/src Modified Files: Makefile.am attr_def.h item_def.h Added Files: osm2navit.c zipfile.h Log Message: new program osm2navit capable of processing planet.osm, improvements to binfile driver Index: item_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/item_def.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** item_def.h 25 Oct 2007 09:34:15 -0000 1.9 --- item_def.h 1 Nov 2007 15:16:39 -0000 1.10 *************** *** 261,262 **** --- 261,264 ---- ITEM(plantation) ITEM(tundra) + ITEM(tile) + ITEM(submap) --- NEW FILE: osm2navit.c --- #include <glib.h> #include <malloc.h> #include <string.h> #include <signal.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <zlib.h> #include "item.h" #include "zipfile.h" static char *attrmap={ "amenity\n" "building\n" "highway cycleway street_nopass\n" "highway footway street_nopass\n" "highway steps street_nopass\n" "highway cyclepath street_nopass\n" "highway track street_nopass\n" "highway service street_nopass\n" "highway pedestrian street_nopass\n" "highway residential street_1_city\n" "highway unclassified street_1_city\n" "highway tertiary street_2_city\n" "highway secondary street_3_city\n" "highway primary street_4_city\n" "highway trunk street_4_city\n" "highway trunk_link ramp\n" "highway motorway highway_city\n" "highway motorway_link ramp\n" "landuse allotments wood\n" "landuse cemetery cemetery_poly\n" "landuse forest wood\n" "leisure park park_poly\n" "natural wood wood\n" "natural water water_poly\n" "place suburb town_poly\n" "railway rail rail\n" "railway subway rail\n" "railway tram rail\n" "waterway canal water_line\n" "waterway river water_line\n" "waterway weir water_line\n" "waterway stream water_line\n" "waterway drain water_line\n" }; GHashTable *key_hash; static void build_attrmap_line(char *line) { char *k=NULL,*v=NULL,*i=NULL,*p; gpointer *data; GHashTable *value_hash; k=line; p=index(k,'\t'); if (p) { while (*p == '\t') *p++='\0'; v=p; p=index(v,'\t'); } if (p) { while (*p == '\t') *p++='\0'; i=p; } if (! i) i="street_unkn"; if (! key_hash) key_hash=g_hash_table_new(g_str_hash, g_str_equal); value_hash=g_hash_table_lookup(key_hash, k); if (! value_hash) { value_hash=g_hash_table_new(g_str_hash, g_str_equal); g_hash_table_insert(key_hash, g_strdup(k), value_hash); } if (v) { data=(gpointer)item_from_name(i); g_hash_table_insert(value_hash, g_strdup(v), data); } #if 0 fprintf(stderr,"'%s' '%s' '%s'\n", k, v, i); #endif } static void build_attrmap(char *map) { char *p; while (map) { p=index(map,'\n'); if (p) *p++='\0'; if (strlen(map)) build_attrmap_line(map); map=p; } } static int processed_nodes, processed_ways, processed_relations, processed_tiles; static int in_way, in_node, in_relation; static void sig_alrm(int sig) { signal(SIGALRM, sig_alrm); alarm(30); fprintf(stderr,"PROGRESS: Processed %d nodes %d ways %d relations %d tiles\n", processed_nodes, processed_ways, processed_relations, processed_tiles); } struct item_bin { int len; enum item_type type; int clen; } item; struct attr_bin { int len; enum attr_type type; }; struct attr_bin label_attr = { 0, attr_label }; char label_attr_buffer[1024]; struct attr_bin debug_attr = { 0, attr_debug }; char debug_attr_buffer[1024]; static void pad_text_attr(struct attr_bin *a, char *buffer) { int l; l=strlen(buffer); while (l % 4) buffer[l++]='\0'; a->len=l/4+1; } static int parse_tag(char *p) { char *q, *k, *v; GHashTable *value_hash; q=index(p, '"'); if (! q) return 0; k=q+1; q=index(k, '"'); if (! q) return 0; *q++='\0'; q=index(q, '"'); if (! q) return 0; v=q+1; q=index(v, '"'); if (! q) return 0; *q++='\0'; if (! strcmp(k,"name")) { strcpy(label_attr_buffer, v); pad_text_attr(&label_attr, label_attr_buffer); return 1; } value_hash=g_hash_table_lookup(key_hash, k); if (! value_hash) return 1; item.type=(enum item_type) g_hash_table_lookup(value_hash, v); if (! item.type) { item.type=type_street_unkn; g_hash_table_insert(value_hash, v, (gpointer)item.type); } return 1; } struct buffer { int malloced_step; int malloced; unsigned char *base; int size; }; struct tile_head { int size; int total_size; char *name; struct tile_head *next; char data[0]; }; struct coord { int x; int y; } coord_buffer[65536]; struct rect { struct coord l,h; }; int coord_count; struct node_item { int id; char ref_node; char ref_way; char ref_ref; char dummy; struct coord c; }; struct buffer node_buffer = { 64*1024*1024, }; struct buffer zipdir_buffer = { 1024*1024, }; static void extend_buffer(struct buffer *b) { b->malloced+=b->malloced_step; b->base=realloc(b->base, b->malloced); } static int parse_node(char *p) { int c; double lat, lon; struct node_item *ni; if (node_buffer.size + sizeof(struct node_item) > node_buffer.malloced) extend_buffer(&node_buffer); ni=(struct node_item *)(node_buffer.base+node_buffer.size); c=sscanf(p, "<node id=\"%d\" lat=\"%lf\" lon=\"%lf\"",&ni->id,&lat,&lon); if (c != 3) return 0; ni->ref_node=0; ni->ref_way=0; ni->ref_ref=0; ni->dummy=0; ni->c.x=lon*6371000.0*M_PI/180; ni->c.y=log(tan(M_PI_4+lat*M_PI/360))*6371000.0; node_buffer.size+=sizeof(struct node_item); return 1; } static struct node_item * node_item_get(int id) { struct node_item *ni=(struct node_item *)(node_buffer.base); int count=node_buffer.size/sizeof(struct node_item); int interval=count/4; int p=count/2; while (ni[p].id != id) { #if 0 fprintf(stderr,"p=%d count=%d interval=%d id=%d ni[p].id=%d\n", p, count, interval, id, ni[p].id); #endif if (ni[p].id < id) { p+=interval; if (interval == 1) { if (p >= count) return NULL; if (ni[p].id > id) return NULL; } else { if (p >= count) p=count-1; } } else { p-=interval; if (interval == 1) { if (p < 0) return NULL; if (ni[p].id < id) return NULL; } else { if (p < 0) p=0; } } if (interval > 1) interval/=2; } return &ni[p]; } static void node_ref_way(int id) { struct node_item *ni=node_item_get(id); if (! ni) { fprintf(stderr,"WARNING: node id %d not found\n", id); return; } ni->ref_way++; } int wayid; static int parse_way(char *p) { int c; item.type=type_street_unkn; label_attr.len=0; debug_attr.len=0; c=sscanf(p, "<way id=\"%d\"", &wayid); if (c != 1) return 0; coord_count=0; sprintf(debug_attr_buffer,"way_id=%d", wayid); return 1; } static void write_attr(FILE *out, struct attr_bin *attr, char *buffer) { if (attr->len) { fwrite(attr, sizeof(*attr), 1, out); fwrite(buffer, (attr->len-1)*4, 1, out); } } static void end_way(FILE *out) { int alen=0; pad_text_attr(&debug_attr, debug_attr_buffer); if (label_attr.len) alen+=label_attr.len+1; if (debug_attr.len) alen+=debug_attr.len+1; item.clen=coord_count*2; item.len=item.clen+2+alen; fwrite(&item, sizeof(item), 1, out); fwrite(coord_buffer, coord_count*sizeof(struct coord), 1, out); write_attr(out, &label_attr, label_attr_buffer); write_attr(out, &debug_attr, debug_attr_buffer); } static int parse_nd(char *p) { int c,ndref,len; struct node_item *ni; c=sscanf(p, "<nd ref=\"%d\"", &ndref); if (c != 1) return 0; #if 0 node_ref_way(ndref); #endif ni=node_item_get(ndref); if (ni) coord_buffer[coord_count++]=ni->c; else { len=strlen(p); if (len > 0 && p[len-1]=='\n') p[len-1]='\0'; fprintf(stderr,"WARNING: way %d: node %d not found (%s)\n",wayid,ndref,p); } if (coord_count > 65536) { fprintf(stderr,"ERROR: Overflow\n"); exit(1); } return 1; } static int phase1(FILE *in, FILE *out) { int size=4096; char buffer[size]; char *p; sig_alrm(0); while (fgets(buffer, size, in)) { p=index(buffer,'<'); if (! p) { fprintf(stderr,"WARNING: wrong line %s\n", buffer); continue; } if (!strncmp(p, "<?xml ",6)) { } else if (!strncmp(p, "<osm ",5)) { } else if (!strncmp(p, "<bound ",7)) { } else if (!strncmp(p, "<node ",6)) { if (!parse_node(p)) fprintf(stderr,"WARNING: failed to parse %s\n", buffer); in_node=1; processed_nodes++; } else if (!strncmp(p, "<tag ",5)) { if (!parse_tag(p)) fprintf(stderr,"WARNING: failed to parse %s\n", buffer); } else if (!strncmp(p, "<way ",5)) { in_way=1; if (!parse_way(p)) fprintf(stderr,"WARNING: failed to parse %s\n", buffer); processed_ways++; } else if (!strncmp(p, "<nd ",4)) { if (!parse_nd(p)) fprintf(stderr,"WARNING: failed to parse %s\n", buffer); } else if (!strncmp(p, "<relation ",10)) { in_relation=1; processed_relations++; } else if (!strncmp(p, "<member ",8)) { } else if (!strncmp(p, "</node>",7)) { in_node=0; } else if (!strncmp(p, "</way>",6)) { in_way=0; end_way(out); } else if (!strncmp(p, "</relation>",11)) { in_relation=0; } else if (!strncmp(p, "</osm>",6)) { } else { fprintf(stderr,"WARNING: unknown tag in %s\n", buffer); } } sig_alrm(0); alarm(0); return 1; } static char buffer[65536]; int bytes_read=0; static struct item_bin * read_item(FILE *in) { struct item_bin *ib=(struct item_bin *) buffer; int r,s; r=fread(ib, sizeof(*ib), 1, in); if (r != 1) return NULL; bytes_read+=r; s=(ib->len+1)*4-sizeof(*ib); r=fread(ib+1, s, 1, in); if (r != 1) return NULL; bytes_read+=r; return ib; } static void bbox(struct coord *c, int count, struct rect *r) { if (! count) return; r->l=*c; r->h=*c; c++; while (--count) { if (c->x < r->l.x) r->l.x=c->x; if (c->y < r->l.y) r->l.y=c->y; if (c->x > r->h.x) r->h.x=c->x; if (c->y > r->h.y) r->h.y=c->y; } } static int contains_bbox(int xl, int yl, int xh, int yh, struct rect *r) { if (r->h.x < xl || r->h.x > xh) { return 0; } if (r->l.x > xh || r->l.x < xl) { return 0; } if (r->h.y < yl || r->h.y > yh) { return 0; } if (r->l.y > yh || r->l.y < yl) { return 0; } return 1; } struct rect world_bbox = { { -20000000, -20000000}, { 20000000, 20000000}, }; static void tile(struct rect *r, char *ret) { int x0,x1,x2,x3,x4; int y0,y1,y2,y3,y4; int i; x0=world_bbox.l.x; y0=world_bbox.l.y; x4=world_bbox.h.x; y4=world_bbox.h.y; for (i = 0 ; i < 14 ; i++) { x2=(x0+x4)/2; y2=(y0+y4)/2; x1=(x0+x2)/2; y1=(y0+y2)/2; x3=(x2+x4)/2; y3=(y2+y4)/2; if ( contains_bbox(x0,y0,x2,y2,r)) { strcat(ret,"d"); x4=x2; y4=y2; } else if (contains_bbox(x2,y0,x4,y2,r)) { strcat(ret,"c"); x0=x2; y4=y2; } else if (contains_bbox(x0,y2,x2,y4,r)) { strcat(ret,"b"); x4=x2; y0=y2; } else if (contains_bbox(x2,y2,x4,y4,r)) { strcat(ret,"a"); x0=x2; y0=y2; } else return; } } static void tile_bbox(char *tile, struct rect *r) { *r=world_bbox; struct coord c; while (*tile) { c.x=(r->l.x+r->h.x)/2; c.y=(r->l.y+r->h.y)/2; switch (*tile) { case 'a': r->l.x=c.x; r->l.y=c.y; break; case 'b': r->h.x=c.x; r->l.y=c.y; break; case 'c': r->l.x=c.x; r->h.y=c.y; break; case 'd': r->h.x=c.x; r->h.y=c.y; break; } tile++; } } GHashTable *tile_hash; static void tile_data_append(char *tile, void *data, int len) { struct tile_head *th; th=g_hash_table_lookup(tile_hash, tile); if (! th) { th=malloc(sizeof(*th)+len); th->size=0; th->total_size=0; th->name=g_strdup(tile); th->next=NULL; processed_tiles++; #if 0 fprintf(stderr,"new %s\n", tile); #endif } else { th=realloc(th, sizeof(*th)+len+th->size); } memcpy(th->data+th->size, data, len); th->size+=len; th->total_size+=len; g_hash_table_insert(tile_hash, th->name, th); } static int tile_data_size(char *tile) { struct tile_head *th; th=g_hash_table_lookup(tile_hash, tile); if (! th) return 0; return th->total_size; } static void merge_tiles(char *base, char *sub) { struct tile_head *thb, *ths; thb=g_hash_table_lookup(tile_hash, base); ths=g_hash_table_lookup(tile_hash, sub); if (! ths) return; #if 0 fprintf(stderr,"merging %s with %s\n", base, sub); #endif if (! thb) { thb=ths; thb->name=g_strdup(base); g_hash_table_insert(tile_hash, thb->name, thb); } else { #if 0 thb=realloc(thb, sizeof(*thb)+ths->size+thb->size); memcpy(thb->data+thb->size, ths->data, ths->size); thb->size+=ths->size; thb->total_size+=ths->total_size; g_hash_table_insert(tile_hash, thb->name, thb); #if 0 tiles_list=g_list_remove(tiles_list,ths->name); #endif free(ths); #endif thb->total_size+=ths->total_size; while (thb->next) thb=thb->next; thb->next=ths; } g_hash_table_remove(tile_hash, sub); } static void get_tiles_list_func(char *key, struct tile_head *th, GList **list) { *list=g_list_prepend(*list, key); } static GList * get_tiles_list(void) { GList *ret=NULL; g_hash_table_foreach(tile_hash, (GHFunc)get_tiles_list_func, &ret); return ret; } static void write_tile(char *key, struct tile_head *th, gpointer dummy) { FILE *f; char buffer[1024]; fprintf(stderr,"DEBUG: Writing %s\n", key); strcpy(buffer,"tiles/"); strcat(buffer,key); #if 0 strcat(buffer,".bin"); #endif f=fopen(buffer, "w+"); while (th) { fwrite(th->data, th->size, 1, f); th=th->next; } fclose(f); } static int phase2(FILE *in) { struct item_bin *ib; struct tile_head *th; struct rect r; char buffer[1024]; char basetile[1024]; char subtile[1024]; GList *tiles_list_sorted,*last; int i,i_min,len,size[5],size_all,size_min,work_done; processed_nodes=processed_ways=processed_relations=processed_tiles=0; sig_alrm(0); tile_hash=g_hash_table_new(g_str_hash, g_str_equal); while ((ib=read_item(in))) { processed_ways++; bbox((struct coord *)(ib+1), ib->clen/2, &r); buffer[0]='\0'; tile(&r, buffer); #if 0 fprintf(stderr,"%s\n", buffer); #endif tile_data_append(buffer, ib, ib->len*4+4); } fprintf(stderr,"read %d bytes\n", bytes_read); do { tiles_list_sorted=get_tiles_list(); fprintf(stderr,"PROGRESS: sorting %d tiles\n", g_list_length(tiles_list_sorted)); tiles_list_sorted=g_list_sort(tiles_list_sorted, (GCompareFunc)strcmp); fprintf(stderr,"PROGRESS: sorting %d tiles done\n", g_list_length(tiles_list_sorted)); last=g_list_last(tiles_list_sorted); size_all=0; while (last) { th=g_hash_table_lookup(tile_hash, last->data); size_all+=th->total_size; last=g_list_previous(last); } fprintf(stderr,"DEBUG: size=%d\n", size_all); last=g_list_last(tiles_list_sorted); work_done=0; while (last) { processed_tiles++; len=strlen(last->data); if (len >= 1) { strcpy(basetile,last->data); basetile[len-1]='\0'; strcpy(subtile,last->data); for (i = 0 ; i < 4 ; i++) { subtile[len-1]='a'+i; size[i]=tile_data_size(subtile); } size[4]=tile_data_size(basetile); size_all=size[0]+size[1]+size[2]+size[3]+size[4]; if (size_all < 65536 && size_all > 0 && size_all != size[4]) { for (i = 0 ; i < 4 ; i++) { subtile[len-1]='a'+i; merge_tiles(basetile, subtile); } work_done++; } else { for (;;) { size_min=size_all; i_min=-1; for (i = 0 ; i < 4 ; i++) { if (size[i] && size[i] < size_min) { size_min=size[i]; i_min=i; } } if (i_min == -1) break; if (size[4]+size_min >= 65536) break; subtile[len-1]='a'+i_min; merge_tiles(basetile, subtile); size[4]+=size[i_min]; size[i_min]=0; } } } last=g_list_previous(last); } g_list_free(tiles_list_sorted); fprintf(stderr,"PROGRESS: merged %d tiles\n", work_done); } while (work_done); sig_alrm(0); alarm(0); #if 0 g_hash_table_foreach(tile_hash, write_tile, NULL); #endif return 0; } int dir_entries; static void add_zipdirentry(char *name, struct zip_cd *cd) { int cd_size=sizeof(struct zip_cd)+strlen(name); struct zip_cd *cdn; if (zipdir_buffer.size + cd_size > zipdir_buffer.malloced) extend_buffer(&zipdir_buffer); cdn=(struct zip_cd *)(zipdir_buffer.base+zipdir_buffer.size); *cdn=*cd; strcpy((char *)(cdn+1), name); zipdir_buffer.size += cd_size; dir_entries++; } int zipoffset; static void write_zipmember(FILE *out, char *name, int filelen, struct tile_head *th) { struct tile_head *thc; struct zip_lfh lfh = { 0x04034b50, 0x0a, 0x0, 0x0, 0xbe2a, 0x5d37, 0x0, 0x0, 0x0, filelen, 0x0, }; struct zip_cd cd = { 0x02014b50, 0x17, 0x00, 0x0a, 0x00, 0x0000, 0x0000, 0xbe2a, 0x5d37, 0x0, 0x0, 0x0, filelen, 0x0000, 0x0000, 0x0000, 0x0000, 0x0, zipoffset, }; char filename[filelen+1]; int size=0,crc,len; crc=crc32(0, NULL, 0); thc=th; while (thc) { size+=thc->size; crc=crc32(crc, (unsigned char *)(thc->data), thc->size); thc=thc->next; } if (size != th->total_size) { fprintf(stderr,"ERROR: size error %d vs %d\n", size, th->total_size); } lfh.zipcrc=crc; lfh.zipsize=size; lfh.zipuncmp=size; cd.zipccrc=crc; cd.zipcsiz=size; cd.zipcunc=size; strcpy(filename, name); len=strlen(filename); while (len < filelen) { filename[len++]='_'; } filename[filelen]='\0'; add_zipdirentry(filename, &cd); fwrite(&lfh, sizeof(lfh), 1, out); fwrite(filename, filelen, 1, out); thc=th; while (thc) { fwrite(thc->data, thc->size, 1, out); thc=thc->next; } zipoffset+=sizeof(lfh)+filelen+size; } struct index_item { struct item_bin item; struct rect r; struct attr_bin attr_order_limit; short min; short max; struct attr_bin attr_zipfile_ref; int zipfile_ref; }; static void index_submap_add(char *tile) { struct index_item ii; int len=strlen(tile); char index_tile[len+1]; strcpy(index_tile, tile); if (len > 6) len=6; else len=0; index_tile[len]=0; tile_bbox(tile, &ii.r); ii.item.len=sizeof(ii)/4-1; ii.item.type=type_submap; ii.item.clen=4; ii.attr_order_limit.len=2; ii.attr_order_limit.type=attr_order_limit; ii.min=0; ii.max=0; ii.attr_zipfile_ref.len=2; ii.attr_zipfile_ref.type=attr_zipfile_ref; ii.zipfile_ref=dir_entries; tile_data_append(index_tile, &ii, sizeof(ii)); #if 0 unsigned int *c=(unsigned int *)ⅈ int i; for (i = 0 ; i < sizeof(ii)/4 ; i++) { fprintf(stderr,"%08x ", c[i]); } fprintf(stderr,"\n"); #endif } static int phase3(FILE *out) { struct zip_eoc eoc = { 0x06054b50, 0x0000, 0x0000, 0x0000, 0x0000, 0x0, 0x0, 0x0, }; struct tile_head *th; GList *tiles_list,*next; int size=0,len,maxlen=0; processed_nodes=processed_ways=processed_relations=processed_tiles=0; sig_alrm(0); tiles_list=get_tiles_list(); next=g_list_first(tiles_list); while (next) { if (strlen(next->data) > maxlen) maxlen=strlen(next->data); next=g_list_next(next); } len=maxlen; while (len > 0) { fprintf(stderr,"PROGRESS: collecting tiles with len=%d\n", len); next=g_list_first(tiles_list); while (next) { if (strlen(next->data) == len) { index_submap_add(next->data); th=g_hash_table_lookup(tile_hash, next->data); write_zipmember(out, next->data, maxlen, th); processed_tiles++; size+=th->total_size; } next=g_list_next(next); } len--; } th=g_hash_table_lookup(tile_hash, ""); write_zipmember(out, "index", 5, th); size+=th->total_size; fprintf(stderr, "DEBUG: wrote %d bytes\n", size); fwrite(zipdir_buffer.base, zipdir_buffer.size, 1, out); eoc.zipenum=dir_entries; eoc.zipecenn=dir_entries; eoc.zipecsz=zipdir_buffer.size; eoc.zipeofst=zipoffset; fwrite(&eoc, sizeof(eoc), 1, out); sig_alrm(0); alarm(0); return 0; } int main(int argc, char **argv) { FILE *tmp; char *map=g_strdup(attrmap); build_attrmap(map); tmp=fopen("tmpfile","w+"); fprintf(stderr,"PROGRESS: Phase 1: collecting data\n"); phase1(stdin,tmp); fclose(tmp); free(node_buffer.base); node_buffer.base=NULL; node_buffer.malloced=0; node_buffer.size=0; fprintf(stderr,"PROGRESS: Phase 2: generating tiles\n"); tmp=fopen("tmpfile","r"); phase2(tmp); fclose(tmp); fprintf(stderr,"PROGRESS: Phase 3: assembling map\n"); phase3(stdout); return 0; } --- NEW FILE: zipfile.h --- struct zip_lfh { int ziplocsig; short zipver; short zipgenfld; short zipmthd; short ziptime; short zipdate; int zipcrc; int zipsize; int zipuncmp; short zipfnln; short zipxtraln; char zipname[0]; } __attribute__ ((packed)); struct zip_cd { int zipcensig; char zipcver; char zipcos; char zipcvxt; char zipcexos; short zipcflg; short zipcmthd; short ziptim; short zipdat; int zipccrc; int zipcsiz; int zipcunc; short zipcfnl; short zipcxtl; short zipccml; short zipdsk; short zipint; int zipext; int zipofst; char zipcfn[0]; } __attribute__ ((packed)); struct zip_eoc { int zipesig; short zipedsk; short zipecen; short zipenum; short zipecenn; int zipecsz; int zipeofst; short zipecoml; char zipecom[0]; } __attribute__ ((packed)); Index: attr_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr_def.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** attr_def.h 28 Oct 2007 11:00:53 -0000 1.11 --- attr_def.h 1 Nov 2007 15:16:39 -0000 1.12 *************** *** 23,26 **** --- 23,27 ---- ATTR(flush_size) ATTR(flush_time) + ATTR(zipfile_ref) /* boolean */ ATTR(overwrite) *************** *** 60,61 **** --- 61,63 ---- ATTR(navigation_speech) ATTR2(0x0003ffff,type_string_end) + ATTR(order_limit) Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Makefile.am 31 Oct 2007 11:57:25 -0000 1.20 --- Makefile.am 1 Nov 2007 15:16:39 -0000 1.21 *************** *** 6,10 **** AM_CPPFLAGS = -I$(top_srcdir)/src/fib-1.1 @NAVIT_CFLAGS@ -DPREFIX=\"@prefix@\" -DMODULE=\"navit\" ! bin_PROGRAMS = navit pkgdata_DATA = navit.xml --- 6,10 ---- AM_CPPFLAGS = -I$(top_srcdir)/src/fib-1.1 @NAVIT_CFLAGS@ -DPREFIX=\"@prefix@\" -DMODULE=\"navit\" ! bin_PROGRAMS = navit osm2navit pkgdata_DATA = navit.xml *************** *** 23,28 **** --- 23,32 ---- transform.h track.h util.h vehicle.h xmlconfig.h + osm2navit_SOURCES = osm2navit.c item.c debug.c + navit_LDADD = @NAVIT_LIBS@ @GPSD_LIBS@ -Lfib-1.1 -lfib + osm2navit_LDADD = @NAVIT_LIBS@ @ZLIB_LIBS@ + samplemap: maps/$(SAMPLE_MAP).txt |
From: Martin S. <mar...@us...> - 2007-11-01 15:16:37
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15524 Modified Files: configure.in Log Message: new program osm2navit capable of processing planet.osm, improvements to binfile driver Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** configure.in 31 Oct 2007 18:14:43 -0000 1.44 --- configure.in 1 Nov 2007 15:16:38 -0000 1.45 *************** *** 41,44 **** --- 41,56 ---- AC_SUBST(NAVIT_LIBS) + AC_CHECK_HEADER( + zlib.h, + AC_DEFINE( + [HAVE_ZLIB], + [], + Define to 1 if you have the <zlib.h> header file. + ) + ZLIB_LIBS="-lz", + AC_MSG_WARN([*** no zlib.h\ -- reduced functionality of osm2navit]) + ) + AC_SUBST(ZLIB_LIBS) + AC_ARG_ENABLE(gui-gtk, [ --disable-gui-gtk don't create gui gtk ], MODULE_GUI_GTK=$enableval, MODULE_GUI_GTK=yes) if test "x$MODULE_GUI_GTK" = "xyes"; then |
From: KaZeR <ka...@us...> - 2007-10-31 18:14:40
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29825 Modified Files: configure.in Log Message: Removed exit 1 on cegui libraries check errors Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** configure.in 31 Oct 2007 17:19:40 -0000 1.43 --- configure.in 31 Oct 2007 18:14:43 -0000 1.44 *************** *** 160,164 **** [ echo "Error! Something is wrong with CEGUIBase." ! exit -1 ]) AC_CHECK_LIB(CEGUIOpenGLRenderer, main, --- 160,164 ---- [ echo "Error! Something is wrong with CEGUIBase." ! #exit -1 ]) AC_CHECK_LIB(CEGUIOpenGLRenderer, main, *************** *** 172,176 **** [ echo "Error! Something is wrong with CEGUIFalagardWRBase." ! exit -1 ], $OPENGL_LIBS) CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase" --- 172,176 ---- [ echo "Error! Something is wrong with CEGUIFalagardWRBase." ! #exit -1 ], $OPENGL_LIBS) CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase" |
From: KaZeR <ka...@us...> - 2007-10-31 17:19:39
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv477 Modified Files: configure.in Log Message: Added a check for glut.h, needed for opengl polygons Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** configure.in 30 Oct 2007 20:45:03 -0000 1.42 --- configure.in 31 Oct 2007 17:19:40 -0000 1.43 *************** *** 119,122 **** --- 119,134 ---- AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled]) ) + + AC_CHECK_HEADER( + GL/glut.h, + AC_DEFINE( + [HAVE_GLUT], + [], + Define to 1 if you have the <GL/glut.h> header file. + ) + glut=yes, + AC_MSG_WARN([*** no GL/glut.h -- opengl and SDL support disabled]) + ) + AC_SUBST(OPENGL_CFLAGS) AC_SUBST(OPENGL_LIBS) *************** *** 210,214 **** AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ]) ! AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$opengl" = "xyes" -a "x$glc" = "xyes" ]) if test x"${USE_LIBGPS}" = xyes --- 222,226 ---- AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ]) ! AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$glut" = "xyes"]) if test x"${USE_LIBGPS}" = xyes |
From: KaZeR <ka...@us...> - 2007-10-31 16:43:39
|
Update of /cvsroot/navit/navit/src/gui/sdl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17470/gui/sdl Modified Files: gui_sdl_window.cpp Log Message: Reenabled grass background Index: gui_sdl_window.cpp =================================================================== RCS file: /cvsroot/navit/navit/src/gui/sdl/gui_sdl_window.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** gui_sdl_window.cpp 26 Oct 2007 16:34:25 -0000 1.23 --- gui_sdl_window.cpp 31 Oct 2007 16:43:35 -0000 1.24 *************** *** 214,218 **** } ! /* // FIXME This is to draw a ground. This is ugly and need to be fixed. Without it, we see the color of sky under the roads. glColor4f(0.0f,0.7f,0.35f,1.0f); --- 214,218 ---- } ! // FIXME This is to draw a ground. This is ugly and need to be fixed. Without it, we see the color of sky under the roads. glColor4f(0.0f,0.7f,0.35f,1.0f); *************** *** 223,227 **** glVertex3f( 1600,-600*3, 0.0f); glEnd(); ! */ if(enable_timer) --- 223,227 ---- glVertex3f( 1600,-600*3, 0.0f); glEnd(); ! if(enable_timer) |
From: KaZeR <ka...@us...> - 2007-10-31 16:43:02
|
Update of /cvsroot/navit/navit/src/graphics/opengl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17321/graphics/opengl Modified Files: graphics_opengl.c Log Message: Some more cleanup Index: graphics_opengl.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/opengl/graphics_opengl.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** graphics_opengl.c 31 Oct 2007 16:33:26 -0000 1.11 --- graphics_opengl.c 31 Oct 2007 16:43:04 -0000 1.12 *************** *** 425,433 **** ! void SDL_print(char * label,int x, int y, double angle){ ! ! ! ! glPushMatrix(); glcRenderStyle(GLC_TEXTURE); --- 425,430 ---- ! void SDL_print(char * label,int x, int y, double angle) ! { glPushMatrix(); glcRenderStyle(GLC_TEXTURE); *************** *** 435,439 **** glTranslatef(x, y, 1); glRotatef(180,1,0,0); - //dbg(0,"angle : %d\n",angle); glRotatef(angle,0,0,1); --- 432,435 ---- *************** *** 443,516 **** glPopMatrix(); - /* - - - // glLoadIdentity(); - frame++; - if(frame>400){ - frame=0; - } - glPushMatrix(); - // glLoadIdentity(); - glcRenderStyle(GLC_BITMAP); - glColor4f(1,0,0,1); - int xc=frame; - int yc=frame; - glTranslatef(x, y, -frame/10); - // glTranslatef(frame/20, 1500, 0); - dbg(0,"Frame : %i\n",frame); - glRotatef(frame,1,0,0); - // glRotatef(angle,0,0,1); - - // glRotatef(frame,0,1,0); - - float cursor_size=5.0f; - glColor4f(0.0f,0.0f,1.0f,0.75f); - glBegin(GL_TRIANGLES); - glVertex3f( 1, 1-cursor_size, 0.0f); - glVertex3f(1-cursor_size,1+cursor_size, 0.0f); - glVertex3f( 1+cursor_size,1+cursor_size, 0.0f); - glEnd(); - - - glScalef(20, 20, 20); - // dbg(1,"rendering label : %s\n",label); - // char *utf8; - // utf8=g_locale_to_utf8(label,-1,NULL,NULL,NULL); - // FIXME : add some error checking : glcGetError() - glcRenderString("label"); - - - glPopMatrix(); - - #ifndef NAVIT__H - #define NAVIT__H - - - // glFlush(); - /* - - glPushMatrix(); - glTranslatef(cx,cy,1); - // glColor4f( 0,0,0,1); - // glRasterPos2f( 1,1 ); - glRotatef(angle,0.0,0.0,1.0); - - glColor4f( gc->fr, gc->fg, gc->fb, gc->fa); - - int linewidth=gc->linewidth; - - glBegin( GL_POLYGON ); - glVertex2f( -w/2,-linewidth/2 ); - glVertex2f( -w/2-4,0 ); - glVertex2f( -w/2,+linewidth/2 ); - glVertex2f( +w/2,+linewidth/2 ); - glVertex2f( +w/2+4,0 ); - glVertex2f( +w/2,-linewidth/2 ); - glVertex2f( -w/2,+linewidth/2 ); - glEnd(); - */ - - } --- 439,442 ---- *************** *** 521,542 **** SDL_print(text,p->x,p->y,(180*atan2(dx,dy)/3.14)-90); - #if 0 - struct text_render *t; - - if (! font) - return; - if (bg) { - gdk_gc_set_function(fg->gc, GDK_AND_INVERT); - gdk_gc_set_function(bg->gc, GDK_OR); - } - - t=display_text_render(text, font, dx, dy, p->x, p->y); - display_text_draw(t, gr, fg, bg); - display_text_free(t); - if (bg) { - gdk_gc_set_function(fg->gc, GDK_COPY); - gdk_gc_set_function(bg->gc, GDK_COPY); - } - #endif } --- 447,450 ---- |
From: KaZeR <ka...@us...> - 2007-10-31 16:33:23
|
Update of /cvsroot/navit/navit/src/graphics/opengl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13126/graphics/opengl Modified Files: graphics_opengl.c Log Message: Some cleanup Index: graphics_opengl.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/opengl/graphics_opengl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** graphics_opengl.c 31 Oct 2007 16:31:43 -0000 1.10 --- graphics_opengl.c 31 Oct 2007 16:33:26 -0000 1.11 *************** *** 326,330 **** glBegin(which); - // DEBUG // dbg(1,"glBegin( %s );\n",getPrimitiveType(which)); } --- 326,329 ---- *************** *** 336,340 **** glEnd(); - // DEBUG // dbg(1,"glEnd();\n"); } --- 335,338 ---- *************** *** 349,353 **** glVertex3dv(ptr); - // DEBUG // dbg(1," glVertex3d();\n"); } --- 347,350 ---- *************** *** 357,393 **** draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count) { - #if 0 - if (gr->mode == draw_mode_begin || gr->mode == draw_mode_end) - gdk_draw_polygon(gr->drawable, gc->gc, TRUE, (GdkPoint *)p, count); - if (gr->mode == draw_mode_end || gr->mode == draw_mode_cursor) - gdk_draw_polygon(gr->widget->window, gc->gc, TRUE, (GdkPoint *)p, count); - #endif int i; ! /* ! // OLD polygon code ! glColor4f( gc->fr, gc->fg, gc->fb, gc->fa); ! glBegin( GL_TRIANGLE_FAN ); ! glVertex2i(p[0].x, p[0].y); ! for (i = 0 ; i < count ; i++) { ! glVertex2i(p[i].x, p[i].y); ! } ! glEnd(); ! ! */ ! GLuint id = glGenLists(1); // create a display list ! if(!id) return id; // failed to create a list, return 0 ! GLUtesselator *tess = gluNewTess(); // create a tessellator ! if(!tess) return 0; // failed to create tessellation object, return 0 ! // define concave quad data (vertices only) ! // 0 2 ! // \ \/ / ! // \3 / ! // \/ ! // 1 ! // GLdouble quad1[4][3] = { {-1,3,0}, {0,0,0}, {1,3,0}, {0,2,0} }; ! GLdouble quad1[count][3]; for (i = 0 ; i < count ; i++) { quad1[i][0]=(GLdouble)(p[i].x); --- 354,366 ---- draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count) { int i; ! GLuint id = glGenLists(1); // create a display list ! if(!id) return id; // failed to create a list, return 0 ! GLUtesselator *tess = gluNewTess(); // create a tessellator ! if(!tess) return 0; // failed to create tessellation object, return 0 ! GLdouble quad1[count][3]; for (i = 0 ; i < count ; i++) { quad1[i][0]=(GLdouble)(p[i].x); *************** *** 397,430 **** ! // register callback functions ! gluTessCallback(tess, GLU_TESS_BEGIN, (void (*)(void))tessBeginCB); ! gluTessCallback(tess, GLU_TESS_END, (void (*)(void))tessEndCB); ! // gluTessCallback(tess, GLU_TESS_ERROR, (void (*)(void))tessErrorCB); ! gluTessCallback(tess, GLU_TESS_VERTEX, (void (*)(void))tessVertexCB); ! ! // tessellate and compile a concave quad into display list ! // gluTessVertex() takes 3 params: tess object, pointer to vertex coords, ! // and pointer to vertex data to be passed to vertex callback. ! // The second param is used only to perform tessellation, and the third ! // param is the actual vertex data to draw. It is usually same as the second ! // param, but It can be more than vertex coord, for example, color, normal ! // and UV coords which are needed for actual drawing. ! // Here, we are looking at only vertex coods, so the 2nd and 3rd params are ! // pointing same address. ! glNewList(id, GL_COMPILE); ! glColor4f( gc->fr, gc->fg, gc->fb, gc->fa); ! gluTessBeginPolygon(tess, 0); // with NULL data ! gluTessBeginContour(tess); ! for (i = 0 ; i < count ; i++) { ! gluTessVertex(tess, quad1[i], quad1[i]); ! } ! gluTessEndContour(tess); ! gluTessEndPolygon(tess); ! glEndList(); ! ! gluDeleteTess(tess); // delete after tessellation ! ! glCallList(id); ! } --- 370,404 ---- ! // register callback functions ! gluTessCallback(tess, GLU_TESS_BEGIN, (void (*)(void))tessBeginCB); ! gluTessCallback(tess, GLU_TESS_END, (void (*)(void))tessEndCB); ! // gluTessCallback(tess, GLU_TESS_ERROR, (void (*)(void))tessErrorCB); ! gluTessCallback(tess, GLU_TESS_VERTEX, (void (*)(void))tessVertexCB); ! ! // tessellate and compile a concave quad into display list ! // gluTessVertex() takes 3 params: tess object, pointer to vertex coords, ! // and pointer to vertex data to be passed to vertex callback. ! // The second param is used only to perform tessellation, and the third ! // param is the actual vertex data to draw. It is usually same as the second ! // param, but It can be more than vertex coord, for example, color, normal ! // and UV coords which are needed for actual drawing. ! // Here, we are looking at only vertex coods, so the 2nd and 3rd params are ! // pointing same address. ! glNewList(id, GL_COMPILE); ! glColor4f( gc->fr, gc->fg, gc->fb, gc->fa); ! gluTessBeginPolygon(tess, 0); // with NULL data ! gluTessBeginContour(tess); ! for (i = 0 ; i < count ; i++) { ! gluTessVertex(tess, quad1[i], quad1[i]); ! } ! gluTessEndContour(tess); ! gluTessEndPolygon(tess); ! glEndList(); ! ! gluDeleteTess(tess); // delete after tessellation ! ! // Actually display the polygon. ! // FIXME It would maybe be better to display them before calling swap_buffers ! glCallList(id); } |
From: KaZeR <ka...@us...> - 2007-10-31 16:31:46
|
Update of /cvsroot/navit/navit/src/graphics/opengl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12304/graphics/opengl Modified Files: graphics_opengl.c Log Message: Fixed polygons rendering Index: graphics_opengl.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/opengl/graphics_opengl.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** graphics_opengl.c 31 Oct 2007 10:18:06 -0000 1.9 --- graphics_opengl.c 31 Oct 2007 16:31:43 -0000 1.10 *************** *** 14,17 **** --- 14,29 ---- #include "debug.h" + #include <GL/glut.h> + + + void CALLBACK tessBeginCB(GLenum which); + void CALLBACK tessEndCB(); + void CALLBACK tessErrorCB(GLenum errorCode); + void CALLBACK tessVertexCB(const GLvoid *data); + void CALLBACK tessVertexCB2(const GLvoid *data); + void CALLBACK tessCombineCB(const GLdouble newVertex[3], const GLdouble *neighborVertex[4], + const GLfloat neighborWeight[4], GLdouble **outData); + + struct graphics_priv { int button_timeout; *************** *** 272,275 **** --- 284,357 ---- } + + const char* getPrimitiveType(GLenum type) + { + switch(type) + { + case 0x0000: + return "GL_POINTS"; + break; + case 0x0001: + return "GL_LINES"; + break; + case 0x0002: + return "GL_LINE_LOOP"; + break; + case 0x0003: + return "GL_LINE_STRIP"; + break; + case 0x0004: + return "GL_TRIANGLES"; + break; + case 0x0005: + return "GL_TRIANGLE_STRIP"; + break; + case 0x0006: + return "GL_TRIANGLE_FAN"; + break; + case 0x0007: + return "GL_QUADS"; + break; + case 0x0008: + return "GL_QUAD_STRIP"; + break; + case 0x0009: + return "GL_POLYGON"; + break; + } + } + + void CALLBACK tessBeginCB(GLenum which) + { + glBegin(which); + + // DEBUG // + dbg(1,"glBegin( %s );\n",getPrimitiveType(which)); + } + + + + void CALLBACK tessEndCB() + { + glEnd(); + + // DEBUG // + dbg(1,"glEnd();\n"); + } + + + + void CALLBACK tessVertexCB(const GLvoid *data) + { + // cast back to double type + const GLdouble *ptr = (const GLdouble*)data; + + glVertex3dv(ptr); + + // DEBUG // + dbg(1," glVertex3d();\n"); + } + + static void draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count) *************** *** 282,293 **** #endif int i; glColor4f( gc->fr, gc->fg, gc->fb, gc->fa); ! glBegin( GL_POLYGON ); for (i = 0 ; i < count ; i++) { glVertex2i(p[i].x, p[i].y); } - glVertex2i(p[0].x, p[0].y); glEnd(); } --- 364,431 ---- #endif int i; + + /* + // OLD polygon code glColor4f( gc->fr, gc->fg, gc->fb, gc->fa); ! glBegin( GL_TRIANGLE_FAN ); ! glVertex2i(p[0].x, p[0].y); for (i = 0 ; i < count ; i++) { glVertex2i(p[i].x, p[i].y); } glEnd(); + */ + GLuint id = glGenLists(1); // create a display list + if(!id) return id; // failed to create a list, return 0 + + GLUtesselator *tess = gluNewTess(); // create a tessellator + if(!tess) return 0; // failed to create tessellation object, return 0 + + // define concave quad data (vertices only) + // 0 2 + // \ \/ / + // \3 / + // \/ + // 1 + // GLdouble quad1[4][3] = { {-1,3,0}, {0,0,0}, {1,3,0}, {0,2,0} }; + GLdouble quad1[count][3]; + for (i = 0 ; i < count ; i++) { + quad1[i][0]=(GLdouble)(p[i].x); + quad1[i][1]=(GLdouble)(p[i].y); + quad1[i][2]=0; + } + + + // register callback functions + gluTessCallback(tess, GLU_TESS_BEGIN, (void (*)(void))tessBeginCB); + gluTessCallback(tess, GLU_TESS_END, (void (*)(void))tessEndCB); + // gluTessCallback(tess, GLU_TESS_ERROR, (void (*)(void))tessErrorCB); + gluTessCallback(tess, GLU_TESS_VERTEX, (void (*)(void))tessVertexCB); + + // tessellate and compile a concave quad into display list + // gluTessVertex() takes 3 params: tess object, pointer to vertex coords, + // and pointer to vertex data to be passed to vertex callback. + // The second param is used only to perform tessellation, and the third + // param is the actual vertex data to draw. It is usually same as the second + // param, but It can be more than vertex coord, for example, color, normal + // and UV coords which are needed for actual drawing. + // Here, we are looking at only vertex coods, so the 2nd and 3rd params are + // pointing same address. + glNewList(id, GL_COMPILE); + glColor4f( gc->fr, gc->fg, gc->fb, gc->fa); + gluTessBeginPolygon(tess, 0); // with NULL data + gluTessBeginContour(tess); + for (i = 0 ; i < count ; i++) { + gluTessVertex(tess, quad1[i], quad1[i]); + } + gluTessEndContour(tess); + gluTessEndPolygon(tess); + glEndList(); + + gluDeleteTess(tess); // delete after tessellation + + glCallList(id); + + } |
From: KaZeR <ka...@us...> - 2007-10-31 13:32:21
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23228/navit/src Modified Files: navit.xml Log Message: Added a sample mapset for garmin Index: navit.xml =================================================================== RCS file: /cvsroot/navit/navit/src/navit.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** navit.xml 3 Oct 2007 13:47:33 -0000 1.12 --- navit.xml 31 Oct 2007 13:32:22 -0000 1.13 *************** *** 58,61 **** --- 58,66 ---- <map type="textfile" enabled="yes" data="$NAVIT_SHAREDIR/maps/osm_bbox_11.3,47.9,11.7,48.2.txt" charset="utf-8"/> </mapset> + <!-- Sample mapset for garmin maps --> + <mapset enabled="no"> + <map type="garmin" enabled="yes" data="/path/to/img"/> + </mapset> + <layout name="Tag"> <layer name="sea" details="0"> |
From: Alexander A. <za...@us...> - 2007-10-31 11:57:24
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2988/src Modified Files: Makefile.am Log Message: Move sample map to separate target - samplemap and don't put the map into the distribution Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Makefile.am 3 Oct 2007 20:15:57 -0000 1.19 --- Makefile.am 31 Oct 2007 11:57:25 -0000 1.20 *************** *** 6,16 **** AM_CPPFLAGS = -I$(top_srcdir)/src/fib-1.1 @NAVIT_CFLAGS@ -DPREFIX=\"@prefix@\" -DMODULE=\"navit\" - bin_PROGRAMS = navit pkgdata_DATA = navit.xml - maps_DATA=maps/$(SAMPLE_MAP).txt ! EXTRA_DIST = navit.xml maps/$(SAMPLE_MAP).txt navit_SOURCES = attr.c callback.c compass.c coord.c country.c cursor.c data_window.c debug.c \ --- 6,14 ---- AM_CPPFLAGS = -I$(top_srcdir)/src/fib-1.1 @NAVIT_CFLAGS@ -DPREFIX=\"@prefix@\" -DMODULE=\"navit\" bin_PROGRAMS = navit pkgdata_DATA = navit.xml ! EXTRA_DIST = navit.xml navit_SOURCES = attr.c callback.c compass.c coord.c country.c cursor.c data_window.c debug.c \ *************** *** 27,30 **** --- 25,30 ---- navit_LDADD = @NAVIT_LIBS@ @GPSD_LIBS@ -Lfib-1.1 -lfib + samplemap: maps/$(SAMPLE_MAP).txt + maps/$(SAMPLE_MAP).osm: echo "Downloading osm sample map" *************** *** 39,41 **** distclean-local: ! rm -f maps/$(SAMPLE_MAP).osm --- 39,41 ---- distclean-local: ! rm -f maps/$(SAMPLE_MAP).osm maps/$(SAMPLE_MAP).txt |
From: Alexander A. <za...@us...> - 2007-10-31 11:57:24
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2988 Modified Files: Makefile.am Log Message: Move sample map to separate target - samplemap and don't put the map into the distribution Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 10 Jul 2007 12:13:27 -0000 1.4 --- Makefile.am 31 Oct 2007 11:57:25 -0000 1.5 *************** *** 4,5 **** --- 4,14 ---- EXTRA_DIST = README + all-local: + @echo ------------------------ + @echo Navit build complete + @echo To build the sample map: + @echo make samplemap + @echo ------------------------ + + samplemap: + make -C src samplemap |
From: KaZeR <ka...@us...> - 2007-10-31 10:18:07
|
Update of /cvsroot/navit/navit/src/graphics/opengl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19742/graphics/opengl Modified Files: graphics_opengl.c Log Message: Fixes road name rotation Index: graphics_opengl.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/opengl/graphics_opengl.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** graphics_opengl.c 11 Oct 2007 16:56:17 -0000 1.8 --- graphics_opengl.c 31 Oct 2007 10:18:06 -0000 1.9 *************** *** 313,317 **** ! void SDL_print(char * label,int x, int y, int angle){ --- 313,317 ---- ! void SDL_print(char * label,int x, int y, double angle){ *************** *** 323,327 **** glTranslatef(x, y, 1); glRotatef(180,1,0,0); ! // glRotatef(angle,0,0,1); glScalef(14, 14, 14); --- 323,328 ---- glTranslatef(x, y, 1); glRotatef(180,1,0,0); ! //dbg(0,"angle : %d\n",angle); ! glRotatef(angle,0,0,1); glScalef(14, 14, 14); *************** *** 405,410 **** draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) { ! dbg(2,"%s\n",text); ! SDL_print(text,p->x,p->y,0); #if 0 --- 406,411 ---- draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) { ! // dbg(0,"%s : %i,%i, %f\n",text,dx,dy,(180*atan2(dx,dy)/3.14)); ! SDL_print(text,p->x,p->y,(180*atan2(dx,dy)/3.14)-90); #if 0 |
From: KaZeR <ka...@us...> - 2007-10-30 21:07:03
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5372/po Modified Files: no.po Log Message: Commit of burner's updated NO translation Index: no.po =================================================================== RCS file: /cvsroot/navit/navit/po/no.po,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** no.po 28 Sep 2007 23:55:04 -0000 1.7 --- no.po 30 Oct 2007 21:07:04 -0000 1.8 *************** *** 8,13 **** "Project-Id-Version: Navit 0.0.2\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-09-29 01:53+0200\n" ! "PO-Revision-Date: 2007-07-16 15:56+0100\n" "Last-Translator: Bendik Brenne <be...@xp...>\n" "Language-Team: Bendik Brenne <be...@xp...>\n" --- 8,13 ---- "Project-Id-Version: Navit 0.0.2\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2007-10-30 15:35+0100\n" ! "PO-Revision-Date: 2007-10-30 16:26+0100\n" "Last-Translator: Bendik Brenne <be...@xp...>\n" "Language-Team: Bendik Brenne <be...@xp...>\n" *************** *** 16,180 **** "Content-Transfer-Encoding: 8bit\n" ! #: ../src/main.c:89 #, c-format msgid "Running from source directory\n" msgstr "" ! #: ../src/main.c:114 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Feil ved parsing av '%s': %s\n" ! #: ../src/main.c:116 #, c-format msgid "Using '%s'\n" msgstr "Bruker '%s'\n" ! #: ../src/main.c:119 #, c-format msgid "No instance has been created, exiting\n" msgstr "Ingen instans er blitt opprettet, avslutter\n" ! #: ../src/navigation.c:176 #, fuzzy, c-format msgid "%d m" msgstr "%d meter" ! #: ../src/navigation.c:178 #, fuzzy, c-format msgid "in %d m" msgstr "om %d meter" ! #: ../src/navigation.c:182 #, c-format msgid "%d meters" msgstr "%d meter" ! #: ../src/navigation.c:184 #, c-format msgid "in %d meters" msgstr "om %d meter" ! #: ../src/navigation.c:190 #, c-format msgid "%d.%d kilometer" msgstr "%d,%d kilometer" ! #: ../src/navigation.c:192 #, c-format msgid "in %d.%d kilometers" msgstr "om %d,%d kilometer" ! #: ../src/navigation.c:198 msgid "one kilometer" msgstr "èn kilometer" ! #: ../src/navigation.c:200 msgid "in one kilometer" msgstr "om èn kilometer" ! #: ../src/navigation.c:203 msgid "two kilometers" msgstr "to kilometer" ! #: ../src/navigation.c:205 msgid "in two kilometers" msgstr "om to Kilometer" ! #: ../src/navigation.c:208 msgid "three kilometers" msgstr "tre kilometer" ! #: ../src/navigation.c:210 msgid "in three kilometers" msgstr "om tre kilometer" ! #: ../src/navigation.c:213 msgid "four kilometers" msgstr "fire kilometer" ! #: ../src/navigation.c:215 msgid "in four kilometers" msgstr "om fire kilometer" ! #: ../src/navigation.c:218 #, c-format msgid "%d kilometers" msgstr "%d kilometer" ! #: ../src/navigation.c:220 #, c-format msgid "in %d kilometers" ! msgstr "Om %d kilometer" ! #: ../src/navigation.c:424 msgid "right" msgstr "høyre" ! #: ../src/navigation.c:432 msgid "left" msgstr "venstre" ! #: ../src/navigation.c:436 msgid "easily " msgstr "slakk " ! #: ../src/navigation.c:440 msgid "strongly " msgstr "skarp " ! #: ../src/navigation.c:443 msgid "unknown " msgstr "ukjent " ! #: ../src/navigation.c:449 #, fuzzy msgid "When possible, please turn around" msgstr "Når mulig, vennligst sving" ! #: ../src/navigation.c:456 #, c-format msgid "Follow the road for the next %s" msgstr "Følg veien de neste %s" ! #: ../src/navigation.c:460 msgid "soon" ! msgstr "Snart" ! #: ../src/navigation.c:466 msgid "now" ! msgstr "Nå" ! #: ../src/navigation.c:469 msgid "error" msgstr "feil" ! #: ../src/navigation.c:474 msgid "strength_pos" msgstr "2" ! #: ../src/navigation.c:476 msgid "direction_pos" msgstr "3" ! #: ../src/navigation.c:478 msgid "distance_pos" msgstr "1" ! #: ../src/navigation.c:488 #, c-format msgid "Turn %s%s %s" msgstr "Sving %s%s %s" ! #: ../src/navigation.c:491 #, c-format msgid "You have reached your destination %s" msgstr "Du har nådd ditt reisemål %s" ! #: ../src/navit.c:440 ../src/gui/gtk/gui_gtk_action.c:180 msgid "Layout" msgstr "Layout" ! #: ../src/navit.c:453 msgid "Projection" msgstr "Projeksjon" --- 16,189 ---- "Content-Transfer-Encoding: 8bit\n" ! #: ../src/main.c:94 #, c-format msgid "Running from source directory\n" msgstr "" ! #: ../src/main.c:110 ! #, fuzzy, c-format ! msgid "setting '%s' to '%s'\n" ! msgstr "Bruker '%s'\n" ! ! #: ../src/main.c:170 ! msgid "No config file navit.xml or navit.xml.local found\n" ! msgstr "" ! ! #: ../src/main.c:172 #, c-format msgid "Error parsing '%s': %s\n" msgstr "Feil ved parsing av '%s': %s\n" ! #: ../src/main.c:174 #, c-format msgid "Using '%s'\n" msgstr "Bruker '%s'\n" ! #: ../src/main.c:177 #, c-format msgid "No instance has been created, exiting\n" msgstr "Ingen instans er blitt opprettet, avslutter\n" ! #: ../src/navigation.c:173 #, fuzzy, c-format msgid "%d m" msgstr "%d meter" ! #: ../src/navigation.c:175 #, fuzzy, c-format msgid "in %d m" msgstr "om %d meter" ! #: ../src/navigation.c:179 #, c-format msgid "%d meters" msgstr "%d meter" ! #: ../src/navigation.c:181 #, c-format msgid "in %d meters" msgstr "om %d meter" ! #: ../src/navigation.c:187 #, c-format msgid "%d.%d kilometer" msgstr "%d,%d kilometer" ! #: ../src/navigation.c:189 #, c-format msgid "in %d.%d kilometers" msgstr "om %d,%d kilometer" ! #: ../src/navigation.c:195 msgid "one kilometer" msgstr "èn kilometer" ! #: ../src/navigation.c:197 msgid "in one kilometer" msgstr "om èn kilometer" ! #: ../src/navigation.c:200 msgid "two kilometers" msgstr "to kilometer" ! #: ../src/navigation.c:202 msgid "in two kilometers" msgstr "om to Kilometer" ! #: ../src/navigation.c:205 msgid "three kilometers" msgstr "tre kilometer" ! #: ../src/navigation.c:207 msgid "in three kilometers" msgstr "om tre kilometer" ! #: ../src/navigation.c:210 msgid "four kilometers" msgstr "fire kilometer" ! #: ../src/navigation.c:212 msgid "in four kilometers" msgstr "om fire kilometer" ! #: ../src/navigation.c:215 #, c-format msgid "%d kilometers" msgstr "%d kilometer" ! #: ../src/navigation.c:217 #, c-format msgid "in %d kilometers" ! msgstr "om %d kilometer" ! #: ../src/navigation.c:421 msgid "right" msgstr "høyre" ! #: ../src/navigation.c:429 msgid "left" msgstr "venstre" ! #: ../src/navigation.c:433 msgid "easily " msgstr "slakk " ! #: ../src/navigation.c:437 msgid "strongly " msgstr "skarp " ! #: ../src/navigation.c:440 msgid "unknown " msgstr "ukjent " ! #: ../src/navigation.c:446 #, fuzzy msgid "When possible, please turn around" msgstr "Når mulig, vennligst sving" ! #: ../src/navigation.c:453 #, c-format msgid "Follow the road for the next %s" msgstr "Følg veien de neste %s" ! #: ../src/navigation.c:457 msgid "soon" ! msgstr "snart" ! #: ../src/navigation.c:463 msgid "now" ! msgstr "nå" ! #: ../src/navigation.c:466 msgid "error" msgstr "feil" ! #: ../src/navigation.c:471 msgid "strength_pos" msgstr "2" ! #: ../src/navigation.c:473 msgid "direction_pos" msgstr "3" ! #: ../src/navigation.c:475 msgid "distance_pos" msgstr "1" ! #: ../src/navigation.c:485 #, c-format msgid "Turn %s%s %s" msgstr "Sving %s%s %s" ! #: ../src/navigation.c:488 #, c-format msgid "You have reached your destination %s" msgstr "Du har nådd ditt reisemål %s" ! #: ../src/navit.c:439 ../src/gui/gtk/gui_gtk_action.c:180 msgid "Layout" msgstr "Layout" ! #: ../src/navit.c:452 msgid "Projection" msgstr "Projeksjon" *************** *** 479,483 **** #: ../src/gui/gtk/gui_gtk_action.c:184 msgid "Roadbook" ! msgstr "" #: ../src/gui/gtk/gui_gtk_action.c:185 --- 488,492 ---- #: ../src/gui/gtk/gui_gtk_action.c:184 msgid "Roadbook" ! msgstr "Kjørebok" #: ../src/gui/gtk/gui_gtk_action.c:185 *************** *** 491,495 **** #: ../src/gui/gtk/gui_gtk_action.c:187 msgid "Clear" ! msgstr "" #: ../src/gui/gtk/gui_gtk_action.c:188 --- 500,504 ---- #: ../src/gui/gtk/gui_gtk_action.c:187 msgid "Clear" ! msgstr "Fjern" #: ../src/gui/gtk/gui_gtk_action.c:188 *************** *** 507,511 **** #: ../src/gui/gtk/gui_gtk_action.c:197 msgid "Tracking" ! msgstr "" #: ../src/gui/gtk/gui_gtk_action.c:198 --- 516,520 ---- #: ../src/gui/gtk/gui_gtk_action.c:197 msgid "Tracking" ! msgstr "Sporing" #: ../src/gui/gtk/gui_gtk_action.c:198 *************** *** 515,519 **** #: ../src/gui/gtk/gui_gtk_action.c:199 msgid "Fullscreen" ! msgstr "" #: ../src/gui/gtk/gui_gtk_action.c:206 --- 524,528 ---- #: ../src/gui/gtk/gui_gtk_action.c:199 msgid "Fullscreen" ! msgstr "Fullskjerm" #: ../src/gui/gtk/gui_gtk_action.c:206 |
From: KaZeR <ka...@us...> - 2007-10-30 20:58:17
|
Update of /cvsroot/navit/navit/src/gui/sdl/datafiles/layouts In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv859/src/gui/sdl/datafiles/layouts Modified Files: Mineque.layout Log Message: Quick fix to make Mineque's gui to be able to switch to nghost Index: Mineque.layout =================================================================== RCS file: /cvsroot/navit/navit/src/gui/sdl/datafiles/layouts/Mineque.layout,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Mineque.layout 7 Sep 2007 12:05:19 -0000 1.6 --- Mineque.layout 30 Oct 2007 20:58:11 -0000 1.7 *************** *** 109,113 **** ! <Window Type="NavitGrey/SpeakerButton" Name="SpeakerButton" > <Property Name="ZOrderChangeEnabled" value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,632},{0,9},{0,660},{0,45}}" /> --- 109,113 ---- ! <Window Type="NavitGrey/SpeakerButton" Name="OSD/nGhostButton" > <Property Name="ZOrderChangeEnabled" value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,632},{0,9},{0,660},{0,45}}" /> |
From: KaZeR <ka...@us...> - 2007-10-30 20:45:06
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27088 Modified Files: configure.in Log Message: Added configure check for CEGUITinyXMLParser Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** configure.in 30 Oct 2007 18:22:53 -0000 1.41 --- configure.in 30 Oct 2007 20:45:03 -0000 1.42 *************** *** 184,187 **** --- 184,193 ---- ) + AC_CHECK_LIB(CEGUITinyXMLParser, main, + [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITinyXMLParser"], + [echo "CEGUITinyXMLParser not found/not working, disabled."], + $OPENGL_LIBS + ) + AC_CHECK_LIB(CEGUIDevILImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"], |
From: KaZeR <ka...@us...> - 2007-10-30 18:22:58
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24050 Modified Files: configure.in Log Message: Fixed libceguisilly detection & added xerces parser detection Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** configure.in 30 Oct 2007 17:59:35 -0000 1.40 --- configure.in 30 Oct 2007 18:22:53 -0000 1.41 *************** *** 165,171 **** # The following are optionnal, but we need to link against them if cegui was built with them ! AC_CHECK_LIB(CEGUISILLYImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"], [echo "CEGUISILLYImageCodec not found/not working, disabled."], $OPENGL_LIBS ) --- 165,178 ---- # The following are optionnal, but we need to link against them if cegui was built with them ! libssilly="$OPENGL_LIBS -lpng" ! AC_CHECK_LIB(CEGUISILLYImageCodec, createImageCodec, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"], [echo "CEGUISILLYImageCodec not found/not working, disabled."], + $libssilly + ) + + AC_CHECK_LIB(CEGUIXercesParser, main, + [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIXercesParser"], + [echo "CEGUIXercesParser not found/not working, disabled."], $OPENGL_LIBS ) |
From: Alexander A. <za...@us...> - 2007-10-30 17:59:34
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12817 Modified Files: configure.in Log Message: Check for X and CEGUI libs more proper Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** configure.in 30 Oct 2007 16:54:49 -0000 1.39 --- configure.in 30 Oct 2007 17:59:35 -0000 1.40 *************** *** 29,33 **** AC_ARG_ENABLE(libgps, [ --disable-libgps don't use libgps], USE_LIBGPS=$enableval, USE_LIBGPS=yes) ! PKG_CHECK_MODULES(NAVIT, [glib-2.0 gmodule-2.0]) --- 29,39 ---- AC_ARG_ENABLE(libgps, [ --disable-libgps don't use libgps], USE_LIBGPS=$enableval, USE_LIBGPS=yes) ! AC_PATH_X ! if test x"$have_x" != xyes; then ! echo "Can not find X" ! exit -1 ! fi ! X_CFLAGS="-I$x_includes" ! X_LIBS="-L$ac_x_libraries" PKG_CHECK_MODULES(NAVIT, [glib-2.0 gmodule-2.0]) *************** *** 102,111 **** ) if test x"$sdl" = xyes then # For CEGUI, we have to check the presence of some libraries. # The following are mandatory (used by navit) # If the user installed NavIt without, issue a warning and disable CEGUI ! AC_CHECK_LIB(CEGUIBase,main [], [ --- 108,148 ---- ) + AC_CHECK_HEADER( + GL/gl.h, + AC_DEFINE( + [HAVE_OPENGL], + [], + Define to 1 if you have the <GL/gl.h> header file. + ) + OPENGL_LIBS="$X_LIBS -lGL -lGLU" + opengl=yes, + AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled]) + ) + AC_SUBST(OPENGL_CFLAGS) + AC_SUBST(OPENGL_LIBS) + + AC_CHECK_HEADER( + GL/glc.h, + AC_DEFINE( + [HAVE_GLC], + [], + Define to 1 if you have the <GL/glc.h> header file. + ) + GLC_LIBS="-lGLC" + glc=yes, + AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled]) + ) + AC_SUBST(GLC_CFLAGS) + AC_SUBST(GLC_LIBS) + if test x"$sdl" = xyes then + # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS + # and we want just to check and use CEGUI_LIBS + libstemp="$LIBS" # For CEGUI, we have to check the presence of some libraries. # The following are mandatory (used by navit) # If the user installed NavIt without, issue a warning and disable CEGUI ! AC_CHECK_LIB(CEGUIBase, main, [], [ *************** *** 113,145 **** exit -1 ]) ! AC_CHECK_LIB(CEGUIOpenGLRenderer, OpenGLRendererdoRender, [], [ echo "Error! Something is wrong with CEGUIOpenGLRenderer." #exit -1 ! ]) ! #AC_CHECK_LIB(CEGUIFalagardWRBase,registerFactory, ! AC_CHECK_LIB(CEGUIFalagardWRBase,main, [], [ echo "Error! Something is wrong with CEGUIFalagardWRBase." exit -1 ! ]) CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase" # The following are optionnal, but we need to link against them if cegui was built with them ! AC_SEARCH_LIBS(createImageCodec, CEGUISILLYImageCodec, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"], ! [echo "CEGUISILLYImageCodec not found/not working, disabled."] ) ! AC_SEARCH_LIBS(createParser,CEGUIExpatParser, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"], ! [echo "CEGUIExpatParser not found/not working, disabled."] ) ! AC_SEARCH_LIBS(CEGUIDevILImageCodec, createImageCodec, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"], ! [echo "CEGUIDevILImageCodec not found/not working, disabled."] ) --- 150,190 ---- exit -1 ]) ! AC_CHECK_LIB(CEGUIOpenGLRenderer, main, [], [ echo "Error! Something is wrong with CEGUIOpenGLRenderer." #exit -1 ! ], $OPENGL_LIBS ) ! AC_CHECK_LIB(CEGUIFalagardWRBase, main, [], [ echo "Error! Something is wrong with CEGUIFalagardWRBase." exit -1 ! ], $OPENGL_LIBS) CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase" # The following are optionnal, but we need to link against them if cegui was built with them ! AC_CHECK_LIB(CEGUISILLYImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"], ! [echo "CEGUISILLYImageCodec not found/not working, disabled."], ! $OPENGL_LIBS ) ! AC_CHECK_LIB(CEGUIExpatParser, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"], ! [echo "CEGUIExpatParser not found/not working, disabled."], ! $OPENGL_LIBS ) ! AC_CHECK_LIB(CEGUIDevILImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"], ! [echo "CEGUIDevILImageCodec not found/not working, disabled."], ! $OPENGL_LIBS ! ) ! ! AC_CHECK_LIB(CEGUITGAImageCodec, main, ! [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITGAImageCodec"], ! [echo "GUITGAImageCodec not found/not working, disabled."], ! $OPENGL_LIBS ) *************** *** 151,182 **** AC_SUBST(CEGUI_LIBS) - AC_CHECK_HEADER( - GL/gl.h, - AC_DEFINE( - [HAVE_OPENGL], - [], - Define to 1 if you have the <GL/gl.h> header file. - ) - OPENGL_LIBS="-lGL -lGLU" - opengl=yes, - AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled]) - ) - AC_SUBST(OPENGL_CFLAGS) - AC_SUBST(OPENGL_LIBS) - - AC_CHECK_HEADER( - GL/glc.h, - AC_DEFINE( - [HAVE_GLC], - [], - Define to 1 if you have the <GL/glc.h> header file. - ) - GLC_LIBS="-lGLC" - glc=yes, - AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled]) - ) - AC_SUBST(GLC_CFLAGS) - AC_SUBST(GLC_LIBS) - AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ]) AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$opengl" = "xyes" -a "x$glc" = "xyes" ]) --- 196,199 ---- |
From: KaZeR <ka...@us...> - 2007-10-30 16:54:46
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16016 Modified Files: configure.in Log Message: Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** configure.in 30 Oct 2007 13:19:27 -0000 1.38 --- configure.in 30 Oct 2007 16:54:49 -0000 1.39 *************** *** 104,114 **** if test x"$sdl" = xyes then - # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS - # and we want just to check and use CEGUI_LIBS - libstemp="$LIBS" # For CEGUI, we have to check the presence of some libraries. # The following are mandatory (used by navit) # If the user installed NavIt without, issue a warning and disable CEGUI ! AC_CHECK_LIB(CEGUIBase, main, [], [ --- 104,111 ---- if test x"$sdl" = xyes then # For CEGUI, we have to check the presence of some libraries. # The following are mandatory (used by navit) # If the user installed NavIt without, issue a warning and disable CEGUI ! AC_CHECK_LIB(CEGUIBase,main [], [ *************** *** 122,126 **** #exit -1 ]) ! AC_CHECK_LIB(CEGUIFalagardWRBase, main, [], [ --- 119,124 ---- #exit -1 ]) ! #AC_CHECK_LIB(CEGUIFalagardWRBase,registerFactory, ! AC_CHECK_LIB(CEGUIFalagardWRBase,main, [], [ *************** *** 131,145 **** # The following are optionnal, but we need to link against them if cegui was built with them ! AC_CHECK_LIB(CEGUISILLYImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"], [echo "CEGUISILLYImageCodec not found/not working, disabled."] ) ! AC_CHECK_LIB(CEGUIExpatParser, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"], [echo "CEGUIExpatParser not found/not working, disabled."] ) ! AC_CHECK_LIB(CEGUIDevILImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"], [echo "CEGUIDevILImageCodec not found/not working, disabled."] --- 129,143 ---- # The following are optionnal, but we need to link against them if cegui was built with them ! AC_SEARCH_LIBS(createImageCodec, CEGUISILLYImageCodec, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"], [echo "CEGUISILLYImageCodec not found/not working, disabled."] ) ! AC_SEARCH_LIBS(createParser,CEGUIExpatParser, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"], [echo "CEGUIExpatParser not found/not working, disabled."] ) ! AC_SEARCH_LIBS(CEGUIDevILImageCodec, createImageCodec, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"], [echo "CEGUIDevILImageCodec not found/not working, disabled."] |
From: KaZeR <ka...@us...> - 2007-10-30 14:02:47
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31952 Modified Files: item.h Log Message: fixed missing extern C Index: item.h =================================================================== RCS file: /cvsroot/navit/navit/src/item.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** item.h 9 Oct 2007 16:48:34 -0000 1.6 --- item.h 29 Oct 2007 19:33:16 -0000 1.7 *************** *** 2,5 **** --- 2,8 ---- #define NAVIT_ITEM_H + #ifdef __cplusplus + extern "C" { + #endif enum item_type { *************** *** 57,58 **** --- 60,64 ---- #endif + #ifdef __cplusplus + } + #endif |
From: Alexander A. <za...@us...> - 2007-10-30 13:19:30
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3463 Modified Files: configure.in Log Message: Do not link CEGUI libs everywhere Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** configure.in 26 Oct 2007 21:35:22 -0000 1.37 --- configure.in 30 Oct 2007 13:19:27 -0000 1.38 *************** *** 104,108 **** if test x"$sdl" = xyes then ! # For CEGUI, we have to check the presence of some libraries. # The following are mandatory (used by navit) --- 104,110 ---- if test x"$sdl" = xyes then ! # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS ! # and we want just to check and use CEGUI_LIBS ! libstemp="$LIBS" # For CEGUI, we have to check the presence of some libraries. # The following are mandatory (used by navit) *************** *** 144,147 **** --- 146,150 ---- ) + LIBS="$libstemp" echo "LIBS : $CEGUI_LIBS" fi |