diff options
Diffstat (limited to 'navit')
-rw-r--r-- | navit/attr.c | 9 | ||||
-rw-r--r-- | navit/item.c | 21 | ||||
-rw-r--r-- | navit/route.c | 2 |
3 files changed, 31 insertions, 1 deletions
diff --git a/navit/attr.c b/navit/attr.c index 903bcc8f1..1c13c3fbf 100644 --- a/navit/attr.c +++ b/navit/attr.c @@ -401,6 +401,15 @@ attr_to_text_ext(struct attr *attr, char *sep, enum attr_format fmt, enum attr_f return g_strdup_printf("(no text[%s])", attr_to_name(type)); } +/** + * @brief Converts an attribute to a string that can be displayed + * + * This function is just a wrapper around {@code attr_to_text_ext()}. + * + * @param attr The attribute to convert + * @param map + * @param pretty Not used + */ char * attr_to_text(struct attr *attr, struct map *map, int pretty) { diff --git a/navit/item.c b/navit/item.c index 4150dc03e..6e72c5a0f 100644 --- a/navit/item.c +++ b/navit/item.c @@ -130,12 +130,33 @@ item_cleanup(void) g_hash_table_destroy(default_flags_hash); } +/** + * @brief Resets the "coordinate pointer" of an item + * + * This function resets the "coordinate pointer" of an item to point to the first coordinate pair, + * so that at the next call to {@code item_coord_get()} the first coordinates will be returned. + */ void item_coord_rewind(struct item *it) { it->meth->item_coord_rewind(it->priv_data); } +/** + * @brief Gets the next coordinates from an item + * + * This function returns a list of coordinates from an item and advances the "coordinate pointer" + * by the number of coordinates returned, so that at the next call the next coordinates will be returned. + * + * @param it The item + * @param c Points to a buffer that will receive the coordinates. + * The buffer must be at least {@code count * sizeof(struct coord)} bytes in size. + * @param count The number of coordinates to retrieve. Attempts to read past the + * end are handled gracefully and only the available number of coordinates is + * returned. + * + * @return The number of coordinates actually retrieved and stored in {@code c} + */ int item_coord_get(struct item *it, struct coord *c, int count) { diff --git a/navit/route.c b/navit/route.c index cf9aff80e..825f26f34 100644 --- a/navit/route.c +++ b/navit/route.c @@ -2135,7 +2135,7 @@ route_process_traffic_distortion(struct route_graph *this, struct item *item) } /** - * @brief Adds a route distortion item to the route graph + * @brief Adds a turn restriction item to the route graph * * @param this The route graph to add to * @param item The item to add |