navit 0.5.3-trunk
Loading...
Searching...
No Matches
textfile.c File Reference
#include "textfile.h"
#include "attr.h"
#include "config.h"
#include "debug.h"
#include "file.h"
#include "item.h"
#include "item_type_def.h"
#include "layer.h"
#include "map.h"
#include "plugin.h"
#include "projection.h"
#include <errno.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Functions

static void remove_comment_line (char *line)
 
static void get_line (struct map_rect_priv *mr)
 
static void map_destroy_textfile (struct map_priv *m)
 
static void textfile_coord_rewind (void *priv_data)
 
static int parse_line (struct map_rect_priv *mr, int attr)
 
static int textfile_coord_get (void *priv_data, struct coord *c, int count)
 
static void textfile_attr_rewind (void *priv_data)
 
static void textfile_encode_attr (char *attr_val, enum attr_type attr_type, struct attr *attr)
 
static int textfile_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr)
 
static struct map_rect_privmap_rect_new_textfile (struct map_priv *map, struct map_selection *sel)
 
static void map_rect_destroy_textfile (struct map_rect_priv *mr)
 
static struct itemmap_rect_get_item_textfile (struct map_rect_priv *mr)
 
static struct itemmap_rect_get_item_byid_textfile (struct map_rect_priv *mr, int id_hi, int id_lo)
 
static struct map_privmap_new_textfile (struct map_methods *meth, struct attr **attrs, struct callback_list *cbl)
 
void plugin_init (void)
 

Variables

static int map_id
 
static struct item_methods methods_textfile
 
static struct map_methods map_methods_textfile
 

Function Documentation

◆ get_line()

◆ map_destroy_textfile()

static void map_destroy_textfile ( struct map_priv m)
static

◆ map_new_textfile()

◆ map_rect_destroy_textfile()

static void map_rect_destroy_textfile ( struct map_rect_priv mr)
static

◆ map_rect_get_item_byid_textfile()

static struct item * map_rect_get_item_byid_textfile ( struct map_rect_priv mr,
int  id_hi,
int  id_lo 
)
static

◆ map_rect_get_item_textfile()

◆ map_rect_new_textfile()

◆ parse_line()

static int parse_line ( struct map_rect_priv mr,
int  attr 
)
static

◆ plugin_init()

void plugin_init ( void  )

References dbg, lvl_debug, and map_new_textfile().

◆ remove_comment_line()

static void remove_comment_line ( char *  line)
static

References TEXTFILE_COMMENT_CHAR.

Referenced by get_line().

◆ textfile_attr_get()

◆ textfile_attr_rewind()

static void textfile_attr_rewind ( void *  priv_data)
static

◆ textfile_coord_get()

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

◆ textfile_coord_rewind()

static void textfile_coord_rewind ( void *  priv_data)
static

◆ textfile_encode_attr()

static void textfile_encode_attr ( char *  attr_val,
enum attr_type  attr_type,
struct attr attr 
)
static

References attr::num, attr::str, and attr::u.

Referenced by textfile_attr_get().

Variable Documentation

◆ map_id

int map_id
static

Referenced by map_new_textfile().

◆ map_methods_textfile

struct map_methods map_methods_textfile
static
Initial value:
= {
"utf-8",
}
@ projection_mg
Definition projection.h:25
static struct item * map_rect_get_item_textfile(struct map_rect_priv *mr)
Definition textfile.c:227
static void map_destroy_textfile(struct map_priv *m)
Definition textfile.c:67
static struct item * map_rect_get_item_byid_textfile(struct map_rect_priv *mr, int id_hi, int id_lo)
Definition textfile.c:305
static void map_rect_destroy_textfile(struct map_rect_priv *mr)
Definition textfile.c:214
static struct map_rect_priv * map_rect_new_textfile(struct map_priv *map, struct map_selection *sel)
Definition textfile.c:162

Referenced by map_new_textfile().

◆ methods_textfile

struct item_methods methods_textfile
static
Initial value:
= {
}
static void textfile_attr_rewind(void *priv_data)
Definition textfile.c:111
static int textfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
Definition textfile.c:124
static int textfile_coord_get(void *priv_data, struct coord *c, int count)
Definition textfile.c:88
static void textfile_coord_rewind(void *priv_data)
Definition textfile.c:75

Referenced by map_rect_new_textfile().