ARB
|
#include "gb_local.h"
#include "gb_aci_impl.h"
#include <arb_strbuf.h>
#include <arb_match.h>
#include <cctype>
Go to the source code of this file.
Classes | |
struct | GBS_string_matcher |
Macros | |
#define | GBS_SET ((char)1) |
#define | GBS_SEP ((char)2) |
#define | GBS_MWILD ((char)3) |
#define | GBS_WILD ((char)4) |
Enumerations | |
enum | string_matcher_type { SM_INVALID = -1, SM_ANY = 0, SM_WILDCARDED, SM_REGEXPR } |
Functions | |
GBS_string_matcher * | GBS_compile_matcher (const char *search_expr, GB_CASE case_flag) |
void | GBS_free_matcher (GBS_string_matcher *matcher) |
GB_CSTR | GBS_find_string (GB_CSTR cont, GB_CSTR substr, int match_mode) |
bool | GBS_string_matches (const char *str, const char *expr, GB_CASE case_sens) |
bool | GBS_string_matches_regexp (const char *str, const GBS_string_matcher *expr) |
static __ATTR__USERESULT GB_ERROR | gbs_build_replace_string (GBS_strstruct &out, char *replaceBy, const char *sWildcards, long sWildMax, const char *const *mWildcards, long mWildMax, const GBL_call_env &callEnv) |
static char * | gbs_compress_command (const char *com) |
char * | GBS_string_eval_in_env (const char *insource, const char *icommand, const GBL_call_env &callEnv) |
char * | GBS_string_eval (const char *insource, const char *icommand) |
#define GBS_SET ((char)1) |
Definition at line 302 of file admatch.cxx.
Referenced by gbs_compress_command(), and GBS_string_eval_in_env().
#define GBS_SEP ((char)2) |
Definition at line 303 of file admatch.cxx.
Referenced by gbs_compress_command(), and GBS_string_eval_in_env().
#define GBS_MWILD ((char)3) |
Definition at line 304 of file admatch.cxx.
Referenced by gbs_build_replace_string(), gbs_compress_command(), and GBS_string_eval_in_env().
#define GBS_WILD ((char)4) |
Definition at line 305 of file admatch.cxx.
Referenced by gbs_build_replace_string(), gbs_compress_command(), and GBS_string_eval_in_env().
enum string_matcher_type |
Enumerator | |
---|---|
SM_INVALID | |
SM_ANY | |
SM_WILDCARDED | |
SM_REGEXPR |
Definition at line 27 of file admatch.cxx.
GBS_string_matcher* GBS_compile_matcher | ( | const char * | search_expr, |
GB_CASE | case_flag | ||
) |
Definition at line 41 of file admatch.cxx.
References ARB_strdup(), GBS_string_matcher::case_flag, error(), GB_export_error(), GB_MIND_CASE, GBS_compile_regexpr(), GBS_free_matcher(), GBS_global_string(), GBS_unwrap_regexpr(), NULp, GBS_string_matcher::regexpr, SM_ANY, SM_INVALID, SM_REGEXPR, SM_WILDCARDED, GBS_string_matcher::type, and GBS_string_matcher::wildexpr.
Referenced by GB_find_all_files(), GB_find_latest_file(), and GBS_read_dir().
void GBS_free_matcher | ( | GBS_string_matcher * | matcher | ) |
Definition at line 94 of file admatch.cxx.
References GBS_free_regexpr(), GBS_string_matcher::regexpr, and GBS_string_matcher::wildexpr.
Referenced by GB_find_all_files(), GB_find_latest_file(), GBS_compile_matcher(), and GBS_read_dir().
Definition at line 103 of file admatch.cxx.
References NULp.
Referenced by aw_help_helpfile_changed_cb(), AW_openURL(), AW_xfig::AW_xfig(), export_species_using_form(), GBS_eval_env(), GBS_string_eval_in_env(), GBS_string_matches(), and transfer_single_field().
Definition at line 193 of file admatch.cxx.
References ARB_strchrnul(), ARB_strpartdup(), GB_IGNORE_CASE, GBS_find_string(), and s.
Referenced by aw_help_helpfile_changed_cb(), AW_help_popup(), aw_ref_to_title(), AW_server_callback(), ArbImporter::detect_format(), fieldContainsAlignment(), filter_columnstat_SAIs(), gb_find_value_equal(), gb_index_find(), GB_login(), GBS_get_arb_tcp_entries(), GBS_string_matches_regexp(), gde_filter_weights(), ArbImporter::read_data(), ArbImporter::read_line(), and write_entry().
bool GBS_string_matches_regexp | ( | const char * | str, |
const GBS_string_matcher * | expr | ||
) |
Definition at line 269 of file admatch.cxx.
References GBS_string_matcher::case_flag, gb_assert, GBS_regmatch_compiled(), GBS_string_matches(), NULp, GBS_string_matcher::regexpr, SM_ANY, SM_INVALID, SM_REGEXPR, SM_WILDCARDED, GBS_string_matcher::type, and GBS_string_matcher::wildexpr.
Referenced by GB_find_all_files(), GB_find_latest_file(), and GBS_read_dir().
|
static |
Definition at line 307 of file admatch.cxx.
References ARB_strBeginsWith(), ARB_strdup(), GBS_strstruct::cat(), GB_await_error(), GB_command_interpreter_in_env(), GB_FIND, GB_get_father(), GB_have_error(), GB_is_container(), GB_read_as_string(), GB_search(), GBS_global_string(), GBS_MWILD, GBS_string_eval_in_env(), GBS_WILD, GBL_call_env::get_item_ref(), NULp, GBS_strstruct::put(), GBL_IMPL::search_matching_parenthesis(), and GBL_call_env::track_field_access().
Referenced by GBS_string_eval_in_env().
Definition at line 452 of file admatch.cxx.
References ARB_strdup(), GBS_MWILD, GBS_SEP, GBS_SET, GBS_WILD, result, and s.
Referenced by GBS_string_eval_in_env().
char* GBS_string_eval_in_env | ( | const char * | insource, |
const char * | icommand, | ||
const GBL_call_env & | callEnv | ||
) |
Definition at line 493 of file admatch.cxx.
References ARB_strdup(), ARB_strpartdup(), GBS_strstruct::cat(), command, GBS_strstruct::empty(), GBS_strstruct::erase(), error(), gb_assert, GB_export_error(), gbs_build_replace_string(), gbs_compress_command(), GBS_find_string(), GBS_global_string(), GBS_MWILD, GBS_SEP, GBS_SET, GBS_WILD, GBS_strstruct::get_data(), GBS_strstruct::ncat(), NULp, GBL_IMPL::print_trace(), GBS_strstruct::release(), GBS_strstruct::swap_content(), GBL_IMPL::traceACI, and GBL_IMPL::traceIndent.
Referenced by ed_submit_info_event(), export_species_using_form(), GB_command_interpreter_in_env(), gbl_srt(), gbs_build_replace_string(), GBS_string_eval(), ArbImporter::read_data(), and ExportFieldScanner::scanFields().
Definition at line 699 of file admatch.cxx.
References GBS_string_eval_in_env(), and NULp.
Referenced by ARB_main(), aw_help_helpfile_changed_cb(), aw_help_search(), AW_reactivate_all_advices(), aw_ref_to_title(), awt_create_filter_awars(), awt_create_select_filter(), awtc_delete_names_file(), awtc_remove_arb_acc(), ColumnStat::ColumnStat(), CommandOutput::CommandOutput(), create_itemfield_selection_button(), ed_submit_parse_event(), export_format_single(), export_to_DB(), File_selection::File_selection(), ALI_selection::fill(), ArbImporter::import_data(), NameInformation::NameInformation(), ArbImporter::next_file(), ParseMenus(), pd_export_pt_server(), read_export_format(), RefEntries::refresh_result_cb(), ColumnStat::refresh_sai_selection_list(), tree_vars_callback(), type2id(), AW_awar::update(), update_default_treename_cb(), and update_rulesAwar().