libbtc
bitcoinclibrary
|
Go to the source code of this file.
Data Structures | |
struct | cstring |
Typedefs | |
typedef struct cstring | cstring |
Functions | |
LIBBTC_API cstring * | cstr_new (const char *init_str) |
LIBBTC_API cstring * | cstr_new_sz (size_t sz) |
LIBBTC_API cstring * | cstr_new_buf (const void *buf, size_t sz) |
LIBBTC_API void | cstr_free (cstring *s, btc_bool free_buf) |
LIBBTC_API btc_bool | cstr_equal (const cstring *a, const cstring *b) |
LIBBTC_API btc_bool | cstr_resize (cstring *s, size_t sz) |
LIBBTC_API btc_bool | cstr_erase (cstring *s, size_t pos, ssize_t len) |
LIBBTC_API btc_bool | cstr_append_buf (cstring *s, const void *buf, size_t sz) |
static LIBBTC_API btc_bool | cstr_append_c (cstring *s, char ch) |
LIBBTC_API btc_bool cstr_append_buf | ( | cstring * | s, |
const void * | buf, | ||
size_t | sz | ||
) |
Definition at line 106 of file cstr.c.
References cstr_alloc_min_sz(), cstring::len, and cstring::str.
Referenced by btc_script_append_op(), btc_script_append_pushdata(), btc_script_build_multisig(), btc_script_copy_without_op_codeseperator(), btc_tx_in_copy(), btc_tx_out_copy(), btc_tx_sighash(), cstr_append_c(), deser_varstr(), ser_bytes(), ser_u16(), ser_u32(), and ser_u64().
|
inlinestatic |
Definition at line 59 of file cstr.h.
References cstr_append_buf().
LIBBTC_API btc_bool cstr_equal | ( | const cstring * | a, |
const cstring * | b | ||
) |
LIBBTC_API btc_bool cstr_erase | ( | cstring * | s, |
size_t | pos, | ||
ssize_t | len | ||
) |
LIBBTC_API void cstr_free | ( | cstring * | s, |
btc_bool | free_buf | ||
) |
Definition at line 69 of file cstr.c.
References cstring::str.
Referenced by btc_tx_hash(), btc_tx_in_free(), btc_tx_out_free(), btc_tx_sighash(), and deser_varstr().
LIBBTC_API cstring* cstr_new | ( | const char * | init_str | ) |
LIBBTC_API cstring* cstr_new_buf | ( | const void * | buf, |
size_t | sz | ||
) |
Definition at line 47 of file cstr.c.
References cstr_new_sz(), cstring::len, and cstring::str.
Referenced by cstr_new().
LIBBTC_API cstring* cstr_new_sz | ( | size_t | sz | ) |
Definition at line 33 of file cstr.c.
References cstr_alloc_min_sz().
Referenced by btc_tx_add_p2pkh_hash160_out(), btc_tx_add_p2sh_hash160_out(), btc_tx_hash(), btc_tx_in_copy(), btc_tx_out_copy(), btc_tx_sighash(), cstr_new(), cstr_new_buf(), and deser_varstr().
LIBBTC_API btc_bool cstr_resize | ( | cstring * | s, |
size_t | sz | ||
) |
Definition at line 81 of file cstr.c.
References cstr_alloc_min_sz(), buffer::len, cstring::len, and cstring::str.
Referenced by btc_script_build_multisig(), btc_script_build_p2pkh(), btc_script_build_p2sh(), and btc_tx_sighash().