summaryrefslogtreecommitdiff
path: root/navit/search.c
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-01-29 19:19:48 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-01-29 19:19:48 +0000
commit06c69325b7d7e49c5ba9a129277ff7a9ebcebe70 (patch)
tree61d4cc04bddcf99ef666fe62585502c203cb96a5 /navit/search.c
parenteba3c3d24167a6d0005ada1cb61b683c8b3a80c9 (diff)
downloadnavit-svn-06c69325b7d7e49c5ba9a129277ff7a9ebcebe70.tar.gz
Fix:core:Add comments and some #defines for constants
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4917 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/search.c')
-rw-r--r--navit/search.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/navit/search.c b/navit/search.c
index b73b4239..1a26dab1 100644
--- a/navit/search.c
+++ b/navit/search.c
@@ -82,6 +82,12 @@ search_item_hash_equal(gconstpointer a, gconstpointer b)
return FALSE;
}
+/**
+ * @brief Create new instance of search_list to run a search.
+ *
+ * @param ms mapset that is to be searched
+ * @returns new search_list
+ */
struct search_list *
search_list_new(struct mapset *ms)
{
@@ -95,6 +101,11 @@ search_list_new(struct mapset *ms)
static void search_list_search_free(struct search_list *sl, int level);
+/**
+ * @brief Determine search list level for given attr_type.
+ * @param attr_type attribute value
+ * @return corresponding search list level (country=0, town=1, ...)
+ */
static int
search_list_level(enum attr_type attr_type)
{
@@ -134,6 +145,13 @@ interpolation_clear(struct interpolation *inter)
inter->first=inter->last=inter->curr=NULL;
}
+/**
+ * @brief Start a search.
+ *
+ * @param this search_list to use for the search
+ * @param search_attr attributes to use for the search
+ * @param partial do partial search? (1=yes,0=no)
+ */
void
search_list_search(struct search_list *this_, struct attr *search_attr, int partial)
{
@@ -669,6 +687,12 @@ search_add_result(struct search_list_level *le, struct search_list_common *slc)
return 0;
}
+/**
+ * @brief Get (next) result from a search.
+ *
+ * @param this_ search_list representing the search
+ * @return next result
+ */
struct search_list_result *
search_list_get_result(struct search_list *this_)
{