X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Frelationsx.c;fp=src%2Frelationsx.c;h=1822f9de94d8075b11079013553bec12aafb71f1;hb=5a44d59fac1aa6104956f4d5dbeef567169c32c0;hp=7b69049b98189bacca9a168329769d95d9af136c;hpb=a5b34ad069a52ff6cf981f01667d102292988811;p=routino diff --git a/src/relationsx.c b/src/relationsx.c index 7b69049..1822f9d 100644 --- a/src/relationsx.c +++ b/src/relationsx.c @@ -1,5 +1,5 @@ /*************************************** - $Header: /home/amb/routino/src/RCS/relationsx.c,v 1.8 2010/10/09 18:20:18 amb Exp $ + $Header: /home/amb/routino/src/RCS/relationsx.c,v 1.10 2010/11/13 14:57:30 amb Exp $ Extended Relation data type functions. @@ -32,6 +32,7 @@ #include "relationsx.h" #include "files.h" +#include "logging.h" #include "functions.h" @@ -182,7 +183,6 @@ void ProcessRouteRelations(RelationsX *relationsx,WaysX *waysx) { RouteRelX *unmatched=NULL,*lastunmatched=NULL; int nunmatched=0,lastnunmatched=0,iteration=0; - int i,j; if(waysx->number==0) return; @@ -206,12 +206,14 @@ void ProcessRouteRelations(RelationsX *relationsx,WaysX *waysx) do { + int ways=0,relations=0; + int i; + SeekFile(relationsx->rfd,0); /* Print the start message */ - printf("Processing Route Relations: Iteration=%d Relations=0",iteration); - fflush(stdout); + printf_first("Processing Route Relations: Iteration=%d Relations=0 Modified Ways=0",iteration); for(i=0;irxnumber;i++) { @@ -229,18 +231,25 @@ void ProcessRouteRelations(RelationsX *relationsx,WaysX *waysx) /* Decide what type of route it is */ if(iteration==0) + { + relations++; routes=relationx.routes; + } else { - if((lastunmatched[j].routes|relationx.routes)==relationx.routes) - routes=0; /* Nothing new to add */ - else - for(j=0;jrxnumber); - fflush(stdout); + printf_last("Processed Route Relations: Iteration=%d Relations=%d Modified Ways=%d",iteration,relations,ways); } while(lastnunmatched && ++iteration<5);