Ticket #3693: 3693-mc_search_run-document-the-return-value.patch

File 3693-mc_search_run-document-the-return-value.patch, 1.1 KB (added by mooffie, 7 years ago)

This documentation is needed in order to understand the bug(s) in #3720.

  • lib/search/search.c

    From c796186befaf47a11f27c37bb4bd1349c9e0338c Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Thu, 10 Nov 2016 22:26:54 +0200
    Subject: [PATCH] (mc_search_run): document the return value.
    
    ---
     lib/search/search.c | 13 +++++++++++++
     1 file changed, 13 insertions(+)
    
    diff --git a/lib/search/search.c b/lib/search/search.c
    index 88008ab..2e19ccf 100644
    a b mc_search_prepare (mc_search_t * lc_mc_search) 
    263263 
    264264/* --------------------------------------------------------------------------------------------- */ 
    265265 
     266/** 
     267 * Carries out the search. 
     268 * 
     269 * Returns TRUE if found. 
     270 * 
     271 * Returns FALSE if not found. In this case, lc_mc_search->error reveals 
     272 * the reason: 
     273 * 
     274 *   - MC_SEARCH_E_NOTFOUND: the pattern isn't in the subject string. 
     275 *   - MC_SEARCH_E_ABORT: the user aborted the search. 
     276 *   - For any other reason (but not for the above two!): the description 
     277 *     is in lc_mc_search->error_str. 
     278 */ 
    266279gboolean 
    267280mc_search_run (mc_search_t * lc_mc_search, const void *user_data, 
    268281               gsize start_search, gsize end_search, gsize * found_len)