Logo Search packages:      
Sourcecode: navit version File versions

int map_selection_contains_item_range ( struct map_selection sel,
int  follow,
struct item_range *  range,
int  count 

Checks if a selection contains a item range.

This function checks if a selection contains at least one of the items in range

sel The selection to be checked
follow Whether the next pointer of the selection should be followed
ranges The item ranges to be checked the number of elements in ranges
True if there is a match, false otherwise

Definition at line 582 of file map.c.

References map_selection::next, and map_selection::range.

      int i;
      if (! sel)
            return 1;
      while (sel) {
            for (i = 0 ; i < count ; i++) {
                  if (item_range_intersects_range(&sel->range, &range[i]))
                        return 1;
            if (! follow)
      return 0;

Generated by  Doxygen 1.6.0   Back to index