navit  0.5.3-trunk
street.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "debug.h"
#include "mg.h"

Data Structures

struct  street_name_index
 

Functions

static void street_name_get (struct street_name *name, unsigned char **p)
 
static int street_name_eod (struct street_name *name)
 
static void street_name_numbers_get (struct street_name_numbers *name_numbers, unsigned char **p)
 
static int street_name_numbers_eod (struct street_name_numbers *name_numbers)
 
static void street_name_number_get (struct street_name_number *name_number, unsigned char **p)
 
static void street_name_get_by_id (struct street_name *name, struct file *file, unsigned long id)
 
static int street_get_bytes (struct coord_rect *r)
 
static int street_get_coord (unsigned char **pos, int bytes, struct coord_rect *ref, struct coord *f)
 
static void street_coord_get_begin (unsigned char **p)
 
static void street_coord_rewind (void *priv_data)
 
static int street_coord_get_helper (struct street_priv *street, struct coord *c)
 
static int street_coord_get (void *priv_data, struct coord *c, int count)
 
static void street_attr_rewind (void *priv_data)
 
static int street_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr)
 
static void street_get_data (struct street_priv *street, unsigned char **p)
 
int street_get (struct map_rect_priv *mr, struct street_priv *street, struct item *item)
 
int street_get_byid (struct map_rect_priv *mr, struct street_priv *street, int id_hi, int id_lo, struct item *item)
 
struct street_name_index __attribute__ ((packed))
 
static unsigned char latin1_tolower (unsigned char c)
 
static unsigned char latin1_tolower_ascii (unsigned char c)
 
static int strncasecmp_latin1 (char *str1, char *str2, int len)
 
static int strncasecmp_latin1_ascii (char *str1, char *str2, int len)
 
static int street_search_compare_do (struct map_rect_priv *mr, int country, int town_assoc, char *name)
 
static int street_search_compare (unsigned char **p, struct map_rect_priv *mr)
 
static void street_name_coord_rewind (void *priv_data)
 
static void street_name_attr_rewind (void *priv_data)
 
static int street_name_coord_get (void *priv_data, struct coord *c, int count)
 
static int street_name_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr)
 
int street_name_get_byid (struct map_rect_priv *mr, struct street_priv *street, int id_hi, int id_lo, struct item *item)
 
static struct itemstreet_search_get_item_street_name (struct map_rect_priv *mr)
 
struct itemstreet_search_get_item (struct map_rect_priv *mr)
 
static int street_name_numbers_next (struct map_rect_priv *mr)
 
static int street_name_number_next (struct map_rect_priv *mr)
 
static void housenumber_coord_rewind (void *priv_data)
 
static void housenumber_attr_rewind (void *priv_data)
 
static int housenumber_coord_get (void *priv_data, struct coord *c, int count)
 
static int housenumber_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr)
 
int housenumber_search_setup (struct map_rect_priv *mr)
 
static int house_number_next (char *number, char *first, char *last, int interpolation, int *percentage)
 
struct itemhousenumber_search_get_item (struct map_rect_priv *mr)
 

Variables

int coord_debug
 
static struct item_methods street_meth
 
static unsigned char limit [] = {0,0,1,1,1,2,2,4,6,6,12,13,14,20,20,20,20,20,20}
 
int block
 
unsigned short country
 
int town_assoc
 
char name [0]
 
static struct item_methods street_name_meth
 
static struct item_methods housenumber_meth
 

Function Documentation

◆ __attribute__()

struct street_name_index __attribute__ ( (packed)  )

◆ house_number_next()

static int house_number_next ( char *  number,
char *  first,
char *  last,
int  interpolation,
int *  percentage 
)
static

◆ housenumber_attr_get()

◆ housenumber_attr_rewind()

static void housenumber_attr_rewind ( void *  priv_data)
static

◆ housenumber_coord_get()

static int housenumber_coord_get ( void *  priv_data,
struct coord c,
int  count 
)
static

◆ housenumber_coord_rewind()

static void housenumber_coord_rewind ( void *  priv_data)
static

◆ housenumber_search_get_item()

◆ housenumber_search_setup()

◆ latin1_tolower()

static unsigned char latin1_tolower ( unsigned char  c)
static

References c.

Referenced by latin1_tolower_ascii(), and strncasecmp_latin1().

◆ latin1_tolower_ascii()

static unsigned char latin1_tolower_ascii ( unsigned char  c)
static

References dbg, latin1_tolower(), and lvl_debug.

Referenced by strncasecmp_latin1_ascii().

◆ street_attr_get()

◆ street_attr_rewind()

static void street_attr_rewind ( void *  priv_data)
static

◆ street_coord_get()

◆ street_coord_get_begin()

static void street_coord_get_begin ( unsigned char **  p)
static

References street_str_get_segid().

Referenced by street_get().

◆ street_coord_get_helper()

static int street_coord_get_helper ( struct street_priv street,
struct coord c 
)
static

◆ street_coord_rewind()

static void street_coord_rewind ( void *  priv_data)
static

◆ street_get()

◆ street_get_byid()

int street_get_byid ( struct map_rect_priv mr,
struct street_priv street,
int  id_hi,
int  id_lo,
struct item item 
)

◆ street_get_bytes()

static int street_get_bytes ( struct coord_rect r)
static

◆ street_get_coord()

static int street_get_coord ( unsigned char **  pos,
int  bytes,
struct coord_rect ref,
struct coord f 
)
static

◆ street_get_data()

◆ street_name_attr_get()

◆ street_name_attr_rewind()

static void street_name_attr_rewind ( void *  priv_data)
static

◆ street_name_coord_get()

◆ street_name_coord_rewind()

static void street_name_coord_rewind ( void *  priv_data)
static

◆ street_name_eod()

static int street_name_eod ( struct street_name name)
static

◆ street_name_get()

◆ street_name_get_by_id()

static void street_name_get_by_id ( struct street_name name,
struct file file,
unsigned long  id 
)
static

References file::begin, p, and street_name_get().

Referenced by street_attr_get().

◆ street_name_get_byid()

◆ street_name_number_get()

◆ street_name_number_next()

◆ street_name_numbers_eod()

static int street_name_numbers_eod ( struct street_name_numbers name_numbers)
static

◆ street_name_numbers_get()

◆ street_name_numbers_next()

◆ street_search_compare()

◆ street_search_compare_do()

static int street_search_compare_do ( struct map_rect_priv mr,
int  country,
int  town_assoc,
char *  name 
)
static

◆ street_search_get_item()

◆ street_search_get_item_street_name()

◆ strncasecmp_latin1()

static int strncasecmp_latin1 ( char *  str1,
char *  str2,
int  len 
)
static

References latin1_tolower().

Referenced by street_search_compare_do().

◆ strncasecmp_latin1_ascii()

static int strncasecmp_latin1_ascii ( char *  str1,
char *  str2,
int  len 
)
static

Variable Documentation

◆ block

int block

◆ coord_debug

int coord_debug

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

◆ country

unsigned short country

◆ housenumber_meth

struct item_methods housenumber_meth
static
Initial value:
= {
}
static int housenumber_coord_get(void *priv_data, struct coord *c, int count)
Definition: street.c:856
static int housenumber_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
Definition: street.c:860
static void housenumber_attr_rewind(void *priv_data)
Definition: street.c:851
static void housenumber_coord_rewind(void *priv_data)
Definition: street.c:846

Referenced by housenumber_search_setup().

◆ limit

unsigned char limit[] = {0,0,1,1,1,2,2,4,6,6,12,13,14,20,20,20,20,20,20}
static

◆ name

◆ street_meth

struct item_methods street_meth
static
Initial value:
= {
}
static void street_attr_rewind(void *priv_data)
Definition: street.c:267
static int street_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
Definition: street.c:272
static void street_coord_rewind(void *priv_data)
Definition: street.c:198
static int street_coord_get(void *priv_data, struct coord *c, int count)
Definition: street.c:222

Referenced by street_get().

◆ street_name_meth

struct item_methods street_name_meth
static
Initial value:
= {
}
static int street_name_coord_get(void *priv_data, struct coord *c, int count)
Definition: street.c:635
static void street_name_coord_rewind(void *priv_data)
Definition: street.c:625
static int street_name_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
Definition: street.c:692
static void street_name_attr_rewind(void *priv_data)
Definition: street.c:630

Referenced by street_name_get_byid(), and street_search_get_item_street_name().

◆ town_assoc

int town_assoc