Handle dynamic string. More...
Handle dynamic string.
In this string are always valid (you don't have NULL pointer, only empty strings)
◆ DSTR_INITIALIZER [1/2]Initializer, used to initialize string like in the following example.
#define DSTR_INITIALIZER
Initializer, used to initialize string like in the following example.
Structure to hold a string.
Definition at line 37 of file string.h.
◆ DSTR_INITIALIZER [2/2]Initializer, used to initialize string like in the following example.
Definition at line 49 of file string.h.
◆ tds_dstr_empty [1/2]Make a string empty.
Definition at line 79 of file string.h.
◆ tds_dstr_empty [2/2]Make a string empty.
Definition at line 91 of file string.h.
◆ DSTRStructure to hold a string.
Use tds_dstr_* functions/macros, do not access members directly. There should be always a buffer.
◆ tds_dstr_alloc() DSTR * tds_dstr_alloc ( DSTR * s, size_t length ) ◆ tds_dstr_buf()Returns a buffer to edit the string.
Be careful to avoid buffer overflows and remember to set the correct length at the end of the editing if changed.
Definition at line 59 of file string.h.
Referenced by _SQLDriverConnect(), _SQLExecute(), dbcolname(), dbcolsource(), dbretname(), odbc_parse_connect_string(), odbc_stat_execute(), odbc_upper_column_names(), parse_value(), prepare_call(), tds_dstr_get(), and to_native().
◆ tds_dstr_copy()copy a string from another
Definition at line 123 of file tdsstring.c.
References tds_dstr_copyn().
Referenced by _SQLConnect(), _SQLTables(), bcp_init(), ct_con_props(), ct_connect(), dbsetlname(), DSNDlgProc(), LoginDlgProc(), odbc_add_char_param(), odbc_add_int_param(), odbc_col_setname(), odbc_connect(), odbc_env_change(), odbc_get_dsn_info(), odbc_populate_ird(), param_info_alloc(), paraminfoalloc(), parse_server(), parse_server_name_for_port(), parse_wacky_dsn_string(), search_interface_file(), set_result_column(), tds5_fix_dot_query(), tds7_process_compute_result(), tds_alloc_login(), tds_config_env_tdsdump(), tds_config_env_tdshost(), tds_dstr_set(), tds_init_login(), tds_parse_conf_section(), tds_process_col_name(), tds_process_colinfo(), tds_process_compute_names(), tds_process_compute_result(), tds_read_interfaces(), tds_set_app(), tds_set_client_charset(), tds_set_host(), tds_set_language(), tds_set_library(), tds_set_passwd(), tds_set_server(), and tds_set_user().
◆ tds_dstr_copyn() DSTR * tds_dstr_copyn ( DSTR * s, const char * src, size_t length )Set string to a given buffer of characters.
Definition at line 78 of file tdsstring.c.
References tds_dstr::dstr_s, tds_dstr::dstr_size, EMPTY, free(), malloc(), NULL, TDS_OFFSET, and TDS_UNLIKELY.
Referenced by blk_init(), change_database(), odbc_dstr_copy(), odbc_parse_connect_string(), odbc_stat_execute(), parse_server_name_for_port(), parse_value(), tds_dstr_copy(), and tds_dstr_dup().
◆ tds_dstr_cstr() [1/2]Returns a C version (NUL terminated string) of dstr.
Definition at line 78 of file string.h.
◆ tds_dstr_cstr() [2/2]Returns a C version (NUL terminated string) of dstr.
Definition at line 66 of file string.h.
Referenced by _bcp_exec_out(), _blk_rowxfer_out(), _SQLConnect(), _SQLDescribeCol(), _SQLDriverConnect(), _SQLExecDirect(), _SQLExecute(), _SQLGetConnectAttr(), _SQLGetCursorName(), _SQLGetDescRec(), _SQLGetInfo(), _SQLGetStmtAttr(), _SQLNativeSql(), _SQLPrepare(), _SQLSetConnectAttr(), _SQLTables(), assert_equal_dstr(), blk_describe(), ConfigDSN(), ct_con_props(), ct_describe(), ct_get_data(), dbacolname(), dbcolinfo(), dbcoltablename(), dbperror(), dbprhead(), dbsprhead(), dbtablecolinfo(), DSNDlgProc(), LoginDlgProc(), main(), make_ntlm_v2_hash(), odbc_connect(), odbc_convert_char(), odbc_convert_table(), odbc_cursor_execute(), odbc_init_headers(), odbc_parse_connect_string(), odbc_populate_ird(), odbc_prepare(), odbc_quote_metadata(), odbc_sql2tds(), odbc_stat_execute(), paraminfoalloc(), parse_server_name_for_port(), prepared_rpc(), reinit_results(), set_result_column(), tds4_send_emulated_rpc(), tds5_bcp_add_fixed_columns(), tds5_process_dyn_result2(), tds5_process_insert_bulk_reply(), tds5_process_result2(), tds71_do_login(), tds7_bcp_send_colmetadata(), tds7_build_bulk_insert_stmt(), tds7_build_param_def_from_params(), tds7_get_data_info(), tds7_process_result(), tds7_send_auth(), tds7_send_login(), tds7_write_param_def_from_params(), tds_answer_challenge(), tds_answer_challenge_ntlmv2(), tds_bcp_init(), tds_bcp_start_insert_stmt(), tds_config_env_tdsdump(), tds_config_login(), tds_connect(), tds_cursor_update(), tds_ntlm_get_auth(), tds_parse_conf_section(), tds_parse_login_results(), tds_process_info(), tds_process_param_result(), tds_put_data_info(), tds_read_conf_sections(), tds_read_config_info(), tds_send_emulated_rpc(), tds_send_login(), tds_setup_connection(), tdsdbopen(), test(), test0(), validate(), and write_all_strings().
◆ tds_dstr_dup()Duplicate a string from another dynamic string.
Definition at line 135 of file tdsstring.c.
References tds_dstr::dstr_s, and tds_dstr_copyn().
Referenced by _SQLConnect(), _SQLDriverConnect(), odbc_build_update_params(), odbc_connect(), odbc_populate_ird(), odbc_stat_execute(), tds5_process_result2(), tds_bcp_init(), tds_config_login(), tds_read_conf_sections(), and tds_read_config_info().
◆ tds_dstr_free() void tds_dstr_free ( DSTR * s )free string
Definition at line 63 of file tdsstring.c.
Referenced by _SQLAllocStmt(), _SQLDriverConnect(), _SQLFreeStmt(), _SQLNativeSql(), _SQLSetConnectAttr(), _SQLTables(), free_dsninfo(), main(), odbc_parse_connect_string(), odbc_stat_execute(), tds_connect(), tds_deinit_bcpinfo(), tds_free_column(), tds_free_login(), tds_read_conf_sections(), and tvp_free().
◆ tds_dstr_init() ◆ tds_dstr_isempty() [1/2]test if string is empty
Definition at line 60 of file string.h.
◆ tds_dstr_isempty() [2/2]test if string is empty
Definition at line 48 of file string.h.
Referenced by _SQLConnect(), _SQLDriverConnect(), _SQLExecute(), _SQLTables(), dbcolsource(), dbperror(), LoginDlgProc(), odbc_cursor_execute(), odbc_get_dsn_info(), odbc_init_headers(), odbc_populate_ird(), odbc_stat_execute(), prepare_call(), tds4_send_emulated_rpc(), tds5_process_result2(), tds71_do_login(), tds7_build_param_def_from_params(), tds7_process_compute_result(), tds7_write_param_def_from_params(), tds_config_login(), tds_connect(), tds_cursor_update(), tds_init_login(), tds_process_compute_result(), tds_process_param_result(), tds_read_conf_sections(), tds_read_config_info(), tds_send_emulated_rpc(), tds_send_login(), tds_setup_connection(), tds_submit_query_params(), and validate().
◆ tds_dstr_len() [1/2]Returns the length of the string in bytes.
Definition at line 85 of file string.h.
◆ tds_dstr_len() [2/2]Returns the length of the string in bytes.
Definition at line 73 of file string.h.
Referenced by _SQLDriverConnect(), _SQLGetStmtAttr(), _SQLSetConnectAttr(), _SQLTables(), ct_con_props(), ct_get_data(), dbprhead(), dbprrow(), dbspr1row(), dbspr1rowlen(), dbsprhead(), dbsprline(), odbc_bcp_init(), odbc_cursor_execute(), odbc_quote_metadata(), odbc_stat_execute(), odbc_upper_column_names(), prepared_rpc(), tds4_send_emulated_rpc(), tds7_bcp_send_colmetadata(), tds7_build_bulk_insert_stmt(), tds7_build_param_def_from_params(), tds7_send_auth(), tds7_write_param_def_from_params(), tds_ntlm_get_auth(), tds_put_data_info(), tds_put_data_info_length(), tds_send_emulated_rpc(), tds_send_login(), and test().
◆ tds_dstr_set() DSTR * tds_dstr_set ( DSTR * s, char * src ) ◆ tds_dstr_setlen() DSTR * tds_dstr_setlen ( DSTR * s, size_t length ) ◆ tds_dstr_zero() void tds_dstr_zero ( DSTR * s ) ◆ tds_str_empty [1/2]Internal representation for an empty string.
Definition at line 1 of file tdsstring.c.
◆ tds_str_empty [2/2]Internal representation for an empty string.
Definition at line 1 of file tdsstring.c.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4