diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-01-29 19:19:48 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-01-29 19:19:48 +0000 |
commit | 337b48e26f6f20d89042de151389fdf6663b96c4 (patch) | |
tree | 61d4cc04bddcf99ef666fe62585502c203cb96a5 /navit/search.c | |
parent | bdd3237ccb009c5618c49a3c3cb3c4bd0e5a2e04 (diff) | |
download | navit-337b48e26f6f20d89042de151389fdf6663b96c4.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.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/navit/search.c b/navit/search.c index b73b42393..1a26dab1c 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_) { |