root/lib/search/internal.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 #ifndef MC__SEARCH_INTERNAL_H
   2 #define MC__SEARCH_INTERNAL_H
   3 
   4 /*** typedefs(not structures) and defined constants **********************************************/
   5 
   6 #ifdef SEARCH_TYPE_GLIB
   7 #define mc_search_regex_t GRegex
   8 #else
   9 #define mc_search_regex_t pcre
  10 #endif
  11 
  12 /*** enums ***************************************************************************************/
  13 
  14 typedef enum
  15 {
  16     COND__NOT_FOUND,
  17     COND__NOT_ALL_FOUND,
  18     COND__FOUND_CHAR,
  19     COND__FOUND_CHAR_LAST,
  20     COND__FOUND_OK,
  21     COND__FOUND_ERROR
  22 } mc_search__found_cond_t;
  23 
  24 /*** structures declarations (and typedefs of structures)*****************************************/
  25 
  26 typedef struct mc_search_cond_struct
  27 {
  28     GString *str;
  29     GString *upper;
  30     GString *lower;
  31     mc_search_regex_t *regex_handle;
  32     gchar *charset;
  33 } mc_search_cond_t;
  34 
  35 /*** global variables defined in .c file *********************************************************/
  36 
  37 /*** declarations of public functions ************************************************************/
  38 
  39 /* search/lib.c : */
  40 
  41 gchar *mc_search__recode_str (const char *, gsize, const char *, const char *, gsize *);
  42 
  43 gchar *mc_search__get_one_symbol (const char *, const char *, gsize, gboolean *);
  44 
  45 GString *mc_search__tolower_case_str (const char *, const char *, gsize);
  46 
  47 GString *mc_search__toupper_case_str (const char *, const char *, gsize);
  48 
  49 /* search/regex.c : */
  50 
  51 void mc_search__cond_struct_new_init_regex (const char *, mc_search_t *, mc_search_cond_t *);
  52 
  53 gboolean mc_search__run_regex (mc_search_t *, const void *, gsize, gsize, gsize *);
  54 
  55 GString *mc_search_regex_prepare_replace_str (mc_search_t *, GString *);
  56 
  57 /* search/normal.c : */
  58 
  59 void mc_search__cond_struct_new_init_normal (const char *, mc_search_t *, mc_search_cond_t *);
  60 
  61 gboolean mc_search__run_normal (mc_search_t *, const void *, gsize, gsize, gsize *);
  62 
  63 GString *mc_search_normal_prepare_replace_str (mc_search_t *, GString *);
  64 
  65 /* search/glob.c : */
  66 
  67 void mc_search__cond_struct_new_init_glob (const char *, mc_search_t *, mc_search_cond_t *);
  68 
  69 gboolean mc_search__run_glob (mc_search_t *, const void *, gsize, gsize, gsize *);
  70 
  71 GString *mc_search_glob_prepare_replace_str (mc_search_t *, GString *);
  72 
  73 /* search/hex.c : */
  74 
  75 void mc_search__cond_struct_new_init_hex (const char *, mc_search_t *, mc_search_cond_t *);
  76 
  77 gboolean mc_search__run_hex (mc_search_t *, const void *, gsize, gsize, gsize *);
  78 
  79 GString *mc_search_hex_prepare_replace_str (mc_search_t *, GString *);
  80 
  81 /*** inline functions ****************************************************************************/
  82 
  83 #endif

/* [previous][next][first][last][top][bottom][index][help]  */