Diff of /trunk/src/osm.c

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

revision 53 by harbaum, Wed Jan 21 20:01:18 2009 UTC revision 54 by harbaum, Fri Feb 6 12:06:30 2009 UTC
# Line 2605  tag_t *osm_tags_copy(tag_t *src_tag, gbo Line 2605  tag_t *osm_tags_copy(tag_t *src_tag, gbo
2605    
2606    return new_tags;    return new_tags;
2607  }  }
2608    
2609    /* return plain text of type */
2610    char *osm_type_string(type_t type) {
2611      const struct { type_t type; char *name; } types[] = {
2612        { ILLEGAL,     "illegal" },
2613        { NODE,        "node" },
2614        { WAY,         "way" },
2615        { RELATION,    "relation" },
2616        { NODE_ID,     "node id" },
2617        { WAY_ID,      "way id" },
2618        { RELATION_ID, "relation id" },
2619        { 0, NULL }
2620      };
2621    
2622      int i;
2623      for(i=0;types[i].name;i++)
2624        if(type == types[i].type)
2625          return types[i].name;
2626    
2627      return NULL;
2628    }
2629    
2630    
2631  // vim:et:ts=8:sw=2:sts=2:ai  // vim:et:ts=8:sw=2:sts=2:ai

Legend:
Removed from v.53  
changed lines
  Added in v.54