navit  0.5.3-trunk
osm_o5m.c File Reference
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "maptool.h"

Data Structures

struct  o5m
 
struct  string_table
 

Macros

#define buffer_end(o, x)   ((o)->buffer_start+(x) > (o)->buffer_end && !fill_buffer((o), (x)))
 

Functions

static int fill_buffer (struct o5m *o, int min)
 
static unsigned long long get_uval (unsigned char **p)
 
static long long get_sval (unsigned char **p)
 
static void get_strings (struct string_table *st, unsigned char **p, char **s1, char **s2)
 
static void get_strings_ref (struct string_table *st, int ref, char **s1, char **s2)
 
static void print_escaped (char *s)
 
static void o5m_reset (struct o5m *o)
 
static void o5m_print_start (struct o5m *o, int c)
 
static void o5m_print_version (struct o5m *o, int tags)
 
static void o5m_print_end (char c)
 
int map_collect_data_osm_o5m (FILE *in, struct maptool_osm *osm)
 

Variables

static int print
 
static char * types [] = {"node","way","relation"}
 
static struct string_table st
 
static double latlon_scale =10000000.0
 

Macro Definition Documentation

◆ buffer_end

#define buffer_end (   o,
 
)    ((o)->buffer_start+(x) > (o)->buffer_end && !fill_buffer((o), (x)))

Function Documentation

◆ fill_buffer()

static int fill_buffer ( struct o5m o,
int  min 
)
static

◆ get_strings()

static void get_strings ( struct string_table st,
unsigned char **  p,
char **  s1,
char **  s2 
)
static

◆ get_strings_ref()

static void get_strings_ref ( struct string_table st,
int  ref,
char **  s1,
char **  s2 
)
static

◆ get_sval()

static long long get_sval ( unsigned char **  p)
static

References get_uval(), and p.

Referenced by map_collect_data_osm_o5m().

◆ get_uval()

static unsigned long long get_uval ( unsigned char **  p)
static

References c, and shift.

Referenced by get_sval(), and map_collect_data_osm_o5m().

◆ map_collect_data_osm_o5m()

◆ o5m_print_end()

static void o5m_print_end ( char  c)
static

References c, and types.

Referenced by map_collect_data_osm_o5m().

◆ o5m_print_start()

static void o5m_print_start ( struct o5m o,
int  c 
)
static

References c, o5m::id, LONGLONG_FMT, and types.

Referenced by map_collect_data_osm_o5m().

◆ o5m_print_version()

static void o5m_print_version ( struct o5m o,
int  tags 
)
static

◆ o5m_reset()

static void o5m_reset ( struct o5m o)
static

◆ print_escaped()

static void print_escaped ( char *  s)
static

Variable Documentation

◆ latlon_scale

double latlon_scale =10000000.0
static

◆ print

int print
static

◆ st

◆ types

char* types[] = {"node","way","relation"}
static