Diff of /trunk/src/osm.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 158 by harbaum, Fri Apr 10 11:13:26 2009 UTC revision 195 by harbaum, Wed Jul 8 08:51:02 2009 UTC
# Line 29  Line 29 
29    
30  /* item_id_t needs to be signed as osm2go uses negative ids for items */  /* item_id_t needs to be signed as osm2go uses negative ids for items */
31  /* not yet registered with the main osm database */  /* not yet registered with the main osm database */
32  typedef glong item_id_t;  #if 1
33  #define G_TYPE_ITEM_ID_T G_TYPE_LONG  /* currently 31 bit is still sufficient since there are less than */
34    /* 2 billion nodes or changesets */
35    typedef gint32 item_id_t;
36    #define G_TYPE_ITEM_ID_T G_TYPE_INT
37    #define ITEM_ID_FORMAT  "%" G_GINT32_FORMAT
38    #else
39    /* the future may require us to switch to 64 bits */
40    typedef gint64 item_id_t;
41    #define G_TYPE_ITEM_ID_T G_TYPE_INT64
42    #define ITEM_ID_FORMAT  "%" G_GINT64_FORMAT
43    #endif
44    
45  #define ID_ILLEGAL  ((item_id_t)0)  #define ID_ILLEGAL  ((item_id_t)0)
46    
# Line 206  typedef struct osm_s { Line 216  typedef struct osm_s {
216  #include <libxml/parser.h>  #include <libxml/parser.h>
217  #include <libxml/tree.h>  #include <libxml/tree.h>
218    
219  osm_t *osm_parse(char *filename);  osm_t *osm_parse(char *path, char *filename);
220  gboolean osm_sanity_check(GtkWidget *parent, osm_t *osm);  gboolean osm_sanity_check(GtkWidget *parent, osm_t *osm);
221  tag_t *osm_parse_osm_tag(osm_t *osm, xmlDocPtr doc, xmlNode *a_node);  tag_t *osm_parse_osm_tag(osm_t *osm, xmlDocPtr doc, xmlNode *a_node);
222  node_chain_t *osm_parse_osm_way_nd(osm_t *osm, xmlDocPtr doc, xmlNode *a_node);  node_chain_t *osm_parse_osm_way_nd(osm_t *osm, xmlDocPtr doc, xmlNode *a_node);
# Line 255  relation_t *osm_get_relation_by_id(osm_t Line 265  relation_t *osm_get_relation_by_id(osm_t
265  guint osm_way_number_of_nodes(way_t *way);  guint osm_way_number_of_nodes(way_t *way);
266  relation_chain_t *osm_node_to_relation(osm_t *osm, node_t *node);  relation_chain_t *osm_node_to_relation(osm_t *osm, node_t *node);
267  relation_chain_t *osm_way_to_relation(osm_t *osm, way_t *way);  relation_chain_t *osm_way_to_relation(osm_t *osm, way_t *way);
268    relation_chain_t *osm_relation_to_relation(osm_t *osm, relation_t *relation);
269    relation_chain_t *osm_object_to_relation(osm_t *osm, object_t *object);
270    void osm_relation_chain_free(relation_chain_t *relation_chain);
271  way_chain_t *osm_node_to_way(osm_t *osm, node_t *node);  way_chain_t *osm_node_to_way(osm_t *osm, node_t *node);
272    
273  /* ----------- edit functions ----------- */  /* ----------- edit functions ----------- */
# Line 298  char *osm_object_id_string(object_t *obj Line 311  char *osm_object_id_string(object_t *obj
311  char *osm_object_string(object_t *object);  char *osm_object_string(object_t *object);
312  tag_t *osm_object_get_tags(object_t *object);  tag_t *osm_object_get_tags(object_t *object);
313  void osm_object_set_flags(object_t *map_item, int set, int clr);  void osm_object_set_flags(object_t *map_item, int set, int clr);
314    char *osm_object_get_name(object_t *object);
315    char *osm_object_get_speaking_name(object_t *object);
316    
317  #endif /* OSM_H */  #endif /* OSM_H */
318    

Legend:
Removed from v.158  
changed lines
  Added in v.195