navit
0.5.3-trunk
|
#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 GList * | get_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 | |
GList * | aux_tile_list |
struct tile_head * | tile_head_root |
GHashTable * | strings_hash |
GHashTable * | tile_hash |
GHashTable * | tile_hash2 |
struct attr | map_information_attrs [32] |
#define _FILE_OFFSET_BITS 64 |
#define _LARGEFILE64_SOURCE |
#define _LARGEFILE_SOURCE |
int add_aux_tile | ( | struct zip_info * | zip_info, |
char * | name, | ||
char * | filename, | ||
int | size | ||
) |
References aux_tile_list, filename, aux_tile::filename, name, aux_tile::name, size, aux_tile::size, and zip_add_member().
Referenced by add_aux_tiles(), and index_country_add().
|
static |
References data, debug_tile, tile_head::name, tile_head::num_subtiles, th_get_subtile(), and tile_hash2.
Referenced by create_tile_hash(), create_tile_hash_list(), and load_tilesdir().
int create_tile_hash | ( | void | ) |
References add_tile_hash(), tile_head::next, tile_hash2, and tile_head_root.
Referenced by ch_assemble_map(), load_tilesdir(), and phase5().
|
static |
References add_tile_hash(), next, tile_hash, and tile_hash2.
Referenced by write_tilesdir().
|
static |
References get_tiles_list_cmp(), get_tiles_list_func(), and tile_hash.
Referenced by write_tilesdir().
|
static |
References s1.
Referenced by get_tiles_list().
References key.
Referenced by get_tiles_list().
void index_init | ( | struct zip_info * | info, |
int | version | ||
) |
References info, init_item(), item_bin_add_attr(), item_bin_write(), map_information_attrs, attr::num, attr::type, type, attr::u, version(), and zip_get_index().
Referenced by maptool_assemble_map().
References info, init_item(), item_bin_add_attr_int(), item_bin_add_attr_range(), item_bin_add_coord_rect(), item_bin::len, tile_head::name, overlap, tile_bbox(), tile_len(), tile_write_item_to_tile(), and tile_head::zipnum.
Referenced by write_tilesdir().
void load_tilesdir | ( | FILE * | in | ) |
References add_tile_hash(), c, create_tile_hash(), tile_head::name, tile_head::next, tile_head::num_subtiles, size, string_hash_lookup(), th_get_subtile(), tile_hash, tile_head_root, tile_head::total_size, tile_head::total_size_used, tile_head::zip_data, and tile_head::zipnum.
Referenced by maptool_load_tilesdir().
|
static |
void merge_tiles | ( | struct tile_info * | info | ) |
Referenced by ch_generate_tiles(), and phase34().
|
static |
References key, and strings_hash.
Referenced by load_tilesdir(), merge_tile(), and tile_extend().
|
static |
Referenced by add_tile_hash(), load_tilesdir(), merge_tile(), tile_extend(), and write_tilesdir().
References contains_bbox(), rect::h, max, overlap, world_bbox, coord::x, and coord::y.
Referenced by item_bin_write_clipped(), item_bin_write_match(), process_turn_restrictions_finish(), tile_write_item_minmax(), and write_countrydir().
void tile_bbox | ( | char * | tile, |
struct rect * | r, | ||
int | overlap | ||
) |
References c, rect::h, overlap, world_bbox, coord::x, pcoord::x, coord::y, and pcoord::y.
Referenced by index_submap_add().
|
static |
References tile_hash, and tile_head::total_size.
References debug_tile, item_bin_get_id(), item_bin::len, LONGLONG_FMT, tile_head::name, tile_head::num_subtiles, processed_tiles, string_hash_lookup(), th_get_subtile(), tile_hash, tile_hash2, tile_head::total_size, tile_head::total_size_used, item_bin::type, tile_head::zip_data, and tile_head::zipnum.
Referenced by tile_write_item_to_tile().
int tile_len | ( | char * | tile | ) |
Referenced by index_submap_add(), itembin_nicer_slicer(), and tile_write_item_minmax().
void tile_write_item_minmax | ( | struct tile_info * | info, |
struct item_bin * | ib, | ||
FILE * | reference, | ||
int | min, | ||
int | max | ||
) |
References bbox(), item_bin::clen, info, itembin_nicer_slicer(), max, overlap, tile(), tile_len(), tile_write_item_to_tile(), and item_bin::type.
Referenced by ch_copy_to_tiles(), phase34_process_file(), and phase34_process_file_range().
void tile_write_item_to_tile | ( | struct tile_info * | info, |
struct item_bin * | ib, | ||
FILE * | reference, | ||
char * | name | ||
) |
References info, name, tile_extend(), and write_item().
Referenced by index_submap_add(), itembin_nicer_slicer(), itembin_write_slice_result(), and tile_write_item_minmax().
int write_aux_tiles | ( | struct zip_info * | zip_info | ) |
References aux_tile_list, dbg, aux_tile::filename, lvl_warning, aux_tile::name, aux_tile::size, write_zipmember(), zip_add_member(), and zip_get_maxnamelen().
Referenced by maptool_assemble_map().
|
static |
References dbg_assert, debug_itembin, debug_tile, dump_itembin(), exit, item_bin::len, tile_head::name, offset, tile_head::process, size, tile_hash, tile_hash2, tile_head::total_size, tile_head::total_size_used, item_bin::type, tile_head::zip_data, and tile_head::zipnum.
Referenced by tile_write_item_to_tile().
References create_tile_hash_list(), data, get_tiles_list(), index_submap_add(), info, init_item(), item_bin_add_attr_int(), item_bin_add_attr_range(), item_bin_add_coord_rect(), item_bin_write(), tile_head::name, next, tile_head::next, tile_head::num_subtiles, processed_tiles, th_get_subtile(), tile_hash, tile_head_root, tile_head::total_size, world_bbox, zip_add_member(), zip_get_index(), zip_get_zipnum(), and tile_head::zipnum.
Referenced by ch_assemble_map(), ch_generate_tiles(), and phase34().
GList* aux_tile_list |
Referenced by add_aux_tile(), and write_aux_tiles().
struct attr map_information_attrs[32] |
Referenced by index_init(), and maptool_assemble_map().
GHashTable* strings_hash |
Referenced by string_hash_lookup().
GHashTable * tile_hash |
GHashTable * tile_hash2 |
Referenced by add_tile_hash(), create_tile_hash(), create_tile_hash_list(), tile_extend(), and write_item().
struct tile_head* tile_head_root |
Referenced by create_tile_hash(), load_tilesdir(), and write_tilesdir().