ARB
|
#include <arb_backtrace.h>
#include <arb_strbuf.h>
#include <arb_defs.h>
#include <arb_str.h>
#include "gb_key.h"
#include "gb_aci.h"
#include <SigHandler.h>
#include <execinfo.h>
#include <cstdarg>
#include <cctype>
#include <cerrno>
#include <ctime>
#include <setjmp.h>
#include <valgrind.h>
Go to the source code of this file.
Classes | |
class | TextRef |
class | TaggedContentParser |
Functions | |
static char * | GBS_string_2_key_with_exclusions (const char *str, const char *additional) |
char * | GBS_string_2_key (const char *str) |
char * | GB_memdup (const char *source, size_t len) |
__ATTR__USERESULT GB_ERROR | check_key (const char *key, int len) |
GB_ERROR | GB_check_key (const char *key) |
GB_ERROR | GB_check_hkey (const char *key) |
char * | GBS_escape_string (const char *str, const char *chars_to_escape, char escape_char) |
char * | GBS_unescape_string (const char *str, const char *escaped_chars, char escape_char) |
char * | GBS_eval_env (GB_CSTR p) |
long | GBS_gcgchecksum (const char *seq) |
uint32_t | GB_checksum (const char *seq, long length, int ignore_case, const char *exclude) |
uint32_t | GBS_checksum (const char *seq, int ignore_case, const char *exclude) |
size_t | GBS_shorten_repeated_data (char *data) |
static TextRef | textBetween (const TextRef &t1, const TextRef &t2) |
static void | g_bs_add_value_tag_to_hash (GB_HASH *hash, const char *tag, char *value) |
static void | g_bs_convert_string_to_tagged_hash_with_delete (GB_HASH *hash, char *s, char *default_tag, const char *del) |
static GB_ERROR | g_bs_convert_string_to_tagged_hash_with_rewrite (GB_HASH *hash, char *s, char *default_tag, const char *rtag, const char *aci, GBL_call_env &env) |
static void | g_bs_merge_tags (const char *tag, long, void *cd_sub_result) |
static void | g_bs_read_tagged_hash (const char *value, long subhash, void *cd_g_bs_collect_tags_hash) |
static void | g_bs_read_final_hash (const char *tag, long value, void *cd_merge_result) |
static char * | g_bs_get_string_of_tag_hash (GB_HASH *tag_hash) |
static long | g_bs_free_hash_of_hashes_elem (const char *, long val, void *) |
static void | g_bs_free_hash_of_hashes (GB_HASH *hash) |
char * | GBS_merge_tagged_strings (const char *s1, const char *tag1, const char *replace1, const char *s2, const char *tag2, const char *replace2) |
char * | GBS_modify_tagged_string_with_ACI (const char *s, const char *dt, const char *tag, const char *aci, GBL_call_env &env) |
char * | GB_read_as_tagged_string (GBDATA *gbd, const char *tagi) |
void | GBS_fwrite_string (const char *strngi, FILE *out) |
static char * | GBS_fread_string (FILE *in) |
char * | GBS_fconvert_string (char *buffer) |
char * | GBS_replace_tabs_by_spaces (const char *text) |
char * | GBS_trim (const char *str) |
static char * | dated_info (const char *info) |
char * | GBS_log_action_to (const char *comment, const char *action, bool stamp) |
const char * | GBS_funptr2readable (void *funptr, bool stripARBHOME) |
Variables | |
static const char * | EMPTY_KEY_NOT_ALLOWED = "Empty key is not allowed" |
uint32_t | crctab [] |
Definition at line 31 of file adstring.cxx.
References ARB_strdup(), GB_KEY_LEN_MAX, and GB_KEY_LEN_MIN.
Referenced by GBS_string_2_key().
Definition at line 52 of file adstring.cxx.
References GBS_string_2_key_with_exclusions().
Referenced by aw_question(), aws_init_localized(), awt_create_load_box(), AWT_create_mask_submenu(), create_calltexe_window(), create_save_box_for_selection_lists(), createCopy_table_handler(), current_changed_cb(), export_to_DB(), ID_checker::fromText(), gb_fix_recursive(), GB_read_as_tagged_string(), GBS_merge_tagged_strings(), GBS_modify_tagged_string_with_ACI(), GDE_create_filename_browser_window(), GDE_makeawarname_in(), AW_window_menu_modes_opengl::init(), AW_window_menu_modes::init(), AW_window_menu::init(), AW_window_simple_menu::init(), AW_window_message::init(), name2ID(), ArbImporter::read_data(), sai_transtab_awar(), and trackAlignmentChanges().
Definition at line 56 of file adstring.cxx.
Referenced by gb_convert_compression(), GB_read_bits(), GB_read_bytes(), GB_read_floats(), GB_read_ints(), and GB_read_string().
|
inline |
Definition at line 64 of file adstring.cxx.
References EMPTY_KEY_NOT_ALLOWED, GB_KEY_LEN_MAX, GB_KEY_LEN_MIN, GBS_global_string(), and NULp.
Referenced by GB_check_hkey(), and GB_check_key().
Definition at line 85 of file adstring.cxx.
References check_key().
Referenced by aw_question(), field_create_cb(), GB_create(), GB_create_container(), GBT_add_data(), GBT_check_alignment_name(), GBT_check_tree_name(), and gcman_specific_awarname().
Definition at line 92 of file adstring.cxx.
References check_key(), EMPTY_KEY_NOT_ALLOWED, gb_assert, and NULp.
Referenced by add_field_cb(), AW_awar::AW_awar(), check_data_path(), FieldTransfer::WriteRule::check_hkey(), field_create_cb(), GBT_add_data(), gbt_scan_db_rek(), gcman_specific_awarname(), and prepare_and_get_selected_itemfield().
escape characters in 'str'
uses a special escape-method, which eliminates all 'chars_to_escape' completely from str (this makes further processing of the string more easy)
str | string to escape |
escape_char | is the character used for escaping. For performance reasons it should be a character rarely used in 'str'. |
chars_to_escape | may not contain 'A'-'Z' (these are used for escaping) and it may not be longer than 26 bytes |
Inverse of GBS_unescape_string()
Definition at line 124 of file adstring.cxx.
References buffer, and gb_assert.
Referenced by colorDefChanged_callback(), insert_genes_of_organism(), and standard_list2file().
inverse of GB_escape_string() - for params see there
Definition at line 175 of file adstring.cxx.
References buffer, and gb_assert.
Referenced by colorDefTabNameChanged_callback(), parse_names_into_gene_struct(), and standard_file2list().
Definition at line 212 of file adstring.cxx.
References ARB_strpartdup(), GBS_strstruct::cat(), error(), GB_export_error(), GB_getenv(), GBS_find_string(), GBS_global_string(), GBS_strstruct::ncat(), NULp, and GBS_strstruct::release_memfriendly().
Referenced by aw_modal_file_selection(), AWT_create_ascii_print_window(), create_print_awars(), GB_disable_path(), GB_getenvPATH(), GB_read_file(), GB_textprint(), and getenv_autodirectory().
Definition at line 246 of file adstring.cxx.
Referenced by gbl_gcgchecksum().
Definition at line 319 of file adstring.cxx.
References crctab, length, and tab().
Referenced by AW_advice(), calcSequenceChecksum(), ChecksumCollector::checksum(), GBS_checksum(), and PT_prepare_species_sequence().
Definition at line 352 of file adstring.cxx.
References GB_checksum().
Referenced by adaptCopiedAlignment(), awt_create_select_filter_win(), concatenateFieldsCreateNewSpecies(), export_to_DB(), gbl_checksum(), GBT_gen_accession_number(), gen_extract_gene_2_pseudoSpecies(), CommandOutput::has_checksum(), pd_get_the_gene_names(), pd_get_the_names(), ArbImporter::read_data(), trackAlignmentChanges(), and ED4_terminal::write_sequence().
Definition at line 357 of file adstring.cxx.
References gb_assert, and orgLen.
Referenced by QUERY::DbQuery_update_list(), dump_internal(), QueryExpr::matches(), and SET_QUERIED().
Definition at line 478 of file adstring.cxx.
References TextRef::get_data(), and TextRef::get_following().
Referenced by TextRef::partBefore().
Definition at line 590 of file adstring.cxx.
References GB_IGNORE_CASE, GBS_create_hash(), GBS_read_hash(), and GBS_write_hash().
Referenced by g_bs_convert_string_to_tagged_hash_with_delete(), and g_bs_convert_string_to_tagged_hash_with_rewrite().
|
static |
Definition at line 607 of file adstring.cxx.
References ARB_stricmp(), TextRef::copy(), g_bs_add_value_tag_to_hash(), TaggedContentParser::get_content(), TaggedContentParser::get_tag(), TaggedContentParser::has_content(), TaggedContentParser::has_part(), TaggedContentParser::has_tag(), and TaggedContentParser::next().
Referenced by GBS_merge_tagged_strings().
|
static |
Definition at line 628 of file adstring.cxx.
References ARB_stricmp(), TextRef::copy(), error(), g_bs_add_value_tag_to_hash(), GB_await_error(), GB_command_interpreter_in_env(), TaggedContentParser::get_content(), TaggedContentParser::get_tag(), TaggedContentParser::has_content(), TaggedContentParser::has_part(), TaggedContentParser::has_tag(), TaggedContentParser::next(), and NULp.
Referenced by GBS_modify_tagged_string_with_ACI().
Definition at line 653 of file adstring.cxx.
References GBS_strstruct::cat(), and GBS_strstruct::put().
Referenced by g_bs_read_tagged_hash().
|
static |
Definition at line 660 of file adstring.cxx.
References ARB_strdup(), ARB_strupper(), g_bs_merge_tags(), GBS_hash_do_const_sorted_loop(), GBS_HCF_sortedByKey(), GBS_write_hash(), GBS_strstruct::putlong(), and GBS_strstruct::release().
Referenced by g_bs_get_string_of_tag_hash().
Definition at line 675 of file adstring.cxx.
References GBS_strstruct::cat(), GBS_strstruct::cat_wrapped(), GBS_strstruct::empty(), and GBS_strstruct::put().
Referenced by g_bs_get_string_of_tag_hash().
Definition at line 689 of file adstring.cxx.
References g_bs_read_final_hash(), g_bs_read_tagged_hash(), GB_IGNORE_CASE, GBS_create_dynaval_hash(), GBS_dynaval_free(), GBS_free_hash(), GBS_hash_do_const_sorted_loop(), GBS_HCF_sortedByKey(), and GBS_strstruct::release_memfriendly().
Referenced by GBS_merge_tagged_strings(), and GBS_modify_tagged_string_with_ACI().
Definition at line 700 of file adstring.cxx.
References GBS_free_hash().
Referenced by g_bs_free_hash_of_hashes().
|
static |
Definition at line 705 of file adstring.cxx.
References g_bs_free_hash_of_hashes_elem(), GBS_free_hash(), GBS_hash_do_loop(), and NULp.
Referenced by GBS_merge_tagged_strings(), and GBS_modify_tagged_string_with_ACI().
char* GBS_merge_tagged_strings | ( | const char * | s1, |
const char * | tag1, | ||
const char * | replace1, | ||
const char * | s2, | ||
const char * | tag2, | ||
const char * | replace2 | ||
) |
Definition at line 710 of file adstring.cxx.
References ARB_strdup(), g_bs_convert_string_to_tagged_hash_with_delete(), g_bs_free_hash_of_hashes(), g_bs_get_string_of_tag_hash(), GB_MIND_CASE, GBS_create_hash(), GBS_string_2_key(), NULp, and result.
Referenced by MG_merge_tagged_field_cb().
char* GBS_modify_tagged_string_with_ACI | ( | const char * | s, |
const char * | dt, | ||
const char * | tag, | ||
const char * | aci, | ||
GBL_call_env & | env | ||
) |
Definition at line 747 of file adstring.cxx.
References ARB_strdup(), error(), g_bs_convert_string_to_tagged_hash_with_rewrite(), g_bs_free_hash_of_hashes(), g_bs_get_string_of_tag_hash(), GB_export_error(), GB_MIND_CASE, GBS_create_hash(), GBS_string_2_key(), NULp, and result.
Referenced by modify_fields_of_queried_cb().
Definition at line 776 of file adstring.cxx.
References TextRef::copy(), GB_read_as_string(), GBS_string_2_key(), TaggedContentParser::get_content(), TaggedContentParser::get_tag(), TaggedContentParser::has_part(), TaggedContentParser::has_tag(), TextRef::icompare(), TaggedContentParser::next(), and NULp.
Referenced by mg_check_field_cb().
void GBS_fwrite_string | ( | const char * | strngi, |
FILE * | out | ||
) |
Definition at line 807 of file adstring.cxx.
Referenced by gb_write_one_child().
|
static |
Definition at line 849 of file adstring.cxx.
References GBS_strstruct::put(), and GBS_strstruct::release_memfriendly().
Definition at line 880 of file adstring.cxx.
References buffer, gb_assert, and NULp.
Referenced by gb_parse_ascii_rek().
Definition at line 923 of file adstring.cxx.
References GBS_strstruct::put(), and GBS_strstruct::release_memfriendly().
Referenced by awt_aps_go(), and awt_aps_text_changed().
Definition at line 947 of file adstring.cxx.
References ARB_strpartdup().
Referenced by TreeNode::apply_aci_to_remarks(), GS_calc_resulting_groupname(), write_float_converted(), and write_int_converted().
Definition at line 958 of file adstring.cxx.
References ARB_strdup(), GBS_global_string_copy(), arb_test::nl(), and NULp.
Referenced by GBS_log_action_to().
concatenates 'comment' and 'action'. '
' is appended to existing 'comment' and/or 'action' (if missing).
comment | may be NULp (=> result is 'action') |
action | may NOT be NULp |
stamp | true -> prefix current timestamp in front of 'action' |
Definition at line 976 of file adstring.cxx.
References GBS_strstruct::cat(), dated_info(), GBS_strstruct::put(), and GBS_strstruct::release_memfriendly().
Referenced by GBT_log_to_tree_remark(), ConsensusTreeBuilder::get_tree_remark(), nt_create_configuration(), EDB_root_bact::save_current_config(), TREE_load(), and TREE_write_Newick().
const char* GBS_funptr2readable | ( | void * | funptr, |
bool | stripARBHOME | ||
) |
Definition at line 1007 of file adstring.cxx.
References ARB_strBeginsWith(), and GB_getenvARBHOME().
Referenced by TypedDatabaseCallback::get_info().
|
static |
Definition at line 62 of file adstring.cxx.
Referenced by check_key(), and GB_check_hkey().
uint32_t crctab[] |
Definition at line 264 of file adstring.cxx.
Referenced by GB_checksum().