navit  0.5.3-trunk
tile.c File Reference
#include <stdlib.h>
#include <glib.h>
#include <assert.h>
#include <string.h>
#include <signal.h>
#include <stdio.h>
#include <math.h>
#include <getopt.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <zlib.h>
#include "file.h"
#include "item.h"
#include "map.h"
#include "zipfile.h"
#include "main.h"
#include "config.h"
#include "linguistics.h"
#include "plugin.h"
#include "maptool.h"

Macros

#define _FILE_OFFSET_BITS   64
 
#define _LARGEFILE_SOURCE
 
#define _LARGEFILE64_SOURCE
 

Functions

static char * string_hash_lookup (const char *key)
 
static char ** th_get_subtile (const struct tile_head *th, int idx)
 
int tile (struct rect *r, char *suffix, char *ret, int max, int overlap, struct rect *tr)
 
void tile_bbox (char *tile, struct rect *r, int overlap)
 
int tile_len (char *tile)
 
static void tile_extend (char *tile, struct item_bin *ib, GList **tiles_list)
 
static int tile_data_size (char *tile)
 
static int merge_tile (char *base, char *sub)
 
static gint get_tiles_list_cmp (gconstpointer s1, gconstpointer s2)
 
static void get_tiles_list_func (char *key, struct tile_head *th, GList **list)
 
static GListget_tiles_list (void)
 
static void write_item (char *tile, struct item_bin *ib, FILE *reference)
 
void tile_write_item_to_tile (struct tile_info *info, struct item_bin *ib, FILE *reference, char *name)
 
void tile_write_item_minmax (struct tile_info *info, struct item_bin *ib, FILE *reference, int min, int max)
 
int add_aux_tile (struct zip_info *zip_info, char *name, char *filename, int size)
 
int write_aux_tiles (struct zip_info *zip_info)
 
static int add_tile_hash (struct tile_head *th)
 
int create_tile_hash (void)
 
static void create_tile_hash_list (GList *list)
 
void load_tilesdir (FILE *in)
 
void write_tilesdir (struct tile_info *info, struct zip_info *zip_info, FILE *out)
 
void merge_tiles (struct tile_info *info)
 
void index_init (struct zip_info *info, int version)
 
void index_submap_add (struct tile_info *info, struct tile_head *th)
 

Variables

GListaux_tile_list
 
struct tile_headtile_head_root
 
GHashTable * strings_hash
 
GHashTable * tile_hash
 
GHashTable * tile_hash2
 
struct attr map_information_attrs [32]
 

Macro Definition Documentation

◆ _FILE_OFFSET_BITS

#define _FILE_OFFSET_BITS   64

◆ _LARGEFILE64_SOURCE

#define _LARGEFILE64_SOURCE

◆ _LARGEFILE_SOURCE

#define _LARGEFILE_SOURCE

Function Documentation

◆ add_aux_tile()

int add_aux_tile ( struct zip_info zip_info,
char *  name,
char *  filename,
int  size 
)

◆ add_tile_hash()

static int add_tile_hash ( struct tile_head th)
static

◆ create_tile_hash()

int create_tile_hash ( void  )

◆ create_tile_hash_list()

static void create_tile_hash_list ( GList list)
static

References add_tile_hash(), next, tile_hash, and tile_hash2.

Referenced by write_tilesdir().

◆ get_tiles_list()

static GList* get_tiles_list ( void  )
static

◆ get_tiles_list_cmp()

static gint get_tiles_list_cmp ( gconstpointer  s1,
gconstpointer  s2 
)
static

References s1.

Referenced by get_tiles_list().

◆ get_tiles_list_func()

static void get_tiles_list_func ( char *  key,
struct tile_head th,
GList **  list 
)
static

References key.

Referenced by get_tiles_list().

◆ index_init()

void index_init ( struct zip_info info,
int  version 
)

◆ index_submap_add()

◆ load_tilesdir()

◆ merge_tile()

static int merge_tile ( char *  base,
char *  sub 
)
static

◆ merge_tiles()

void merge_tiles ( struct tile_info info)

Referenced by ch_generate_tiles(), and phase34().

◆ string_hash_lookup()

static char* string_hash_lookup ( const char *  key)
static

References key, and strings_hash.

Referenced by load_tilesdir(), merge_tile(), and tile_extend().

◆ th_get_subtile()

static char** th_get_subtile ( const struct tile_head th,
int  idx 
)
static

◆ tile()

int tile ( struct rect r,
char *  suffix,
char *  ret,
int  max,
int  overlap,
struct rect tr 
)

◆ tile_bbox()

void tile_bbox ( char *  tile,
struct rect r,
int  overlap 
)

◆ tile_data_size()

static int tile_data_size ( char *  tile)
static

References tile_hash, and tile_head::total_size.

◆ tile_extend()

◆ tile_len()

int tile_len ( char *  tile)

◆ tile_write_item_minmax()

void tile_write_item_minmax ( struct tile_info info,
struct item_bin ib,
FILE *  reference,
int  min,
int  max 
)

◆ tile_write_item_to_tile()

void tile_write_item_to_tile ( struct tile_info info,
struct item_bin ib,
FILE *  reference,
char *  name 
)

◆ write_aux_tiles()

◆ write_item()

◆ write_tilesdir()

Variable Documentation

◆ aux_tile_list

GList* aux_tile_list

Referenced by add_aux_tile(), and write_aux_tiles().

◆ map_information_attrs

struct attr map_information_attrs[32]

Referenced by index_init(), and maptool_assemble_map().

◆ strings_hash

GHashTable* strings_hash

Referenced by string_hash_lookup().

◆ tile_hash

◆ tile_hash2

◆ tile_head_root

struct tile_head* tile_head_root