Ticket #480: navit_remove_obsolete.patch

File navit_remove_obsolete.patch, 2.3 KB (added by sera, 12 years ago)

Removes obsolet structs and initialization thereof.

  • navit/navit.c

    diff -ur ../navit-r2614/navit/navit.c ./navit/navit.c
    old new  
    5050#include "speech.h"
    5151#include "track.h"
    5252#include "vehicle.h"
    53 #include "color.h"
    5453#include "layout.h"
    5554#include "log.h"
    5655#include "attr.h"
     
    7877        int dir;
    7978        int speed;
    8079        struct coord last; /*< Position of the last update of this vehicle */
    81         struct color c;
    82         struct color *c2;
    83         struct cursor *cursor;
    8480        struct vehicle *vehicle;
    8581        struct attr callback;
    8682        int animate_cursor;
     
    21662162navit_add_vehicle(struct navit *this_, struct vehicle *v)
    21672163{
    21682164        struct navit_vehicle *nv=g_new0(struct navit_vehicle, 1);
    2169         struct attr follow,color,active, color2, animate;
     2165        struct attr follow, active, animate;
    21702166        nv->vehicle=v;
    21712167        nv->follow=0;
    21722168        nv->last.x = 0;
     
    21742170        nv->animate_cursor=0;
    21752171        if ((vehicle_get_attr(v, attr_follow, &follow, NULL)))
    21762172                nv->follow=nv->follow=follow.u.num;
    2177         if ((vehicle_get_attr(v, attr_color, &color, NULL)))
    2178                 nv->c=*(color.u.color);
    2179         if ((vehicle_get_attr(v, attr_color2, &color2, NULL)))
    2180                 nv->c2=color2.u.color;
    2181         else
    2182                 nv->c2=NULL;
    21832173        nv->follow_curr=nv->follow;
    21842174        this_->vehicles=g_list_append(this_->vehicles, nv);
    21852175        if ((vehicle_get_attr(v, attr_active, &active, NULL)) && active.u.num)
  • navit/navit_shipped.xml

    diff -ur ../navit-r2614/navit/navit_shipped.xml ./navit/navit_shipped.xml
    old new  
    5757        <osd enabled="no" type="button" x="-96" y="-96" command="zoom_in()" src="zoom_in.xpm"/>
    5858        <osd enabled="no" type="button" x="0" y="-96" command="zoom_out()" src="zoom_out.xpm"/>
    5959
    60         <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="gpsd://localhost" gpsd_query="w+xj" color="#0000ff">
     60        <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="gpsd://localhost" gpsd_query="w+xj">
    6161            <!-- Navit can write a tracklog in several formats (gpx, nmea or textfile): -->
    6262            <!-- <log type="gpx" attr_types="position_time_iso8601,position_direction,position_speed,profilename,position_radius" data="track_%Y%m%d-%i.gpx" flush_size="1000" flush_time="30"/> -->
    6363            <cursor w="26" h="26">