Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_list.h>
Go to the source code of this file.
Classes | |
struct | RzNumCalcValue |
struct | rz_num_calc_t |
struct | rz_num_t |
Macros | |
#define | RZ_NUMCALC_STRSZ 1024 |
#define | CONVERT_TO_TWO_COMPLEMENT(x) |
#define | RZ_NUM_CMP(a, b) ((a) > (b) ? 1 : ((b) > (a) ? -1 : 0)) |
Typical comparison (1/0/-1) for two numbers of arbitrary types, including unsigned. More... | |
Typedefs | |
typedef struct rz_num_calc_t | RzNumCalc |
typedef struct rz_num_t | RzNum |
typedef ut64(* | RzNumCallback) (struct rz_num_t *self, const char *str, int *ok) |
typedef const char *(* | RzNumCallback2) (struct rz_num_t *self, ut64, int *ok) |
Enumerations | |
enum | RzNumCalcToken { RNCNAME , RNCNUMBER , RNCEND , RNCINC , RNCDEC , RNCLT , RNCGT , RNCPLUS = '+' , RNCMINUS = '-' , RNCMUL = '*' , RNCEXP = 'E' , RNCDIV = '/' , RNCMOD = '' , RNCNEG = '~' , RNCAND = '&' , RNCORR = '|' , RNCXOR = '^' , RNCPRINT = ';' , RNCASSIGN = '=' , RNCLEFTP = '(' , RNCRIGHTP = ')' , RNCSHL = '<' , RNCSHR = '>' , RNCROL = '#' , RNCROR = '$' } |
#define CONVERT_TO_TWO_COMPLEMENT | ( | x | ) |
typedef struct rz_num_calc_t RzNumCalc |
enum RzNumCalcToken |
Definition at line 743 of file unum.c.
References num, rz_num_math(), and cmd_descs_generate::str.
Referenced by sigdb_signature_resolve_details().
Definition at line 735 of file unum.c.
References num, rz_num_math(), ut64(), and value.
Referenced by encode_addr16(), encode_addr32(), encode_const_pool16(), encode_const_pool16_ut8(), encode_const_pool8(), encode_st16(), encode_st8(), encode_ut8(), encode_ut8x2(), lua_is_valid_num_value_string(), and subvar().
Divide 2^64 by the given divisor
Idea: https://stackoverflow.com/a/55584872 Proof: https://git.sr.ht/~thestr4ng3r/isa-bit-twiddling/tree/808253ab4d262f9e7dd7b87d0396f1afd7c5804b/item/Bit_Twiddling.thy#L26-43
divisor | must be non-zero |
Definition at line 167 of file rz_num.h.
References st64.
Referenced by rz_core_analysis_get_stats().
Padding to align v to the next alignment-boundary.
d
such that (v + d) % alignment == 0
. Definition at line 116 of file rz_num.h.
Referenced by parse_aranges_raw(), rz_bflt_get_data_base(), rz_bin_elf_get_targets_map_base(), rz_bin_relocs_patch_find_targets_map_base(), and rz_coff_get_reloc_targets_map_base().
Definition at line 705 of file unum.c.
References escape_char(), len, n, NULL, num, off, cmd_descs_generate::str, strdup(), and ut64().
Referenced by ds_print_as_string(), rax(), and rz_cmd_help().
RZ_API size_t rz_num_base_of_string | ( | RzNum * | num, |
RZ_NONNULL const char * | str | ||
) |
Convert the base suffix to the numeric value.
Definition at line 935 of file unum.c.
References num, rz_num_math(), rz_return_val_if_fail, rz_str_startswith(), and cmd_descs_generate::str.
Referenced by rz_analysis_hint_set_immbase_handler(), and rz_core_visual_define().
Definition at line 826 of file unum.c.
References free(), i, len, num, RZ_BETWEEN, rz_list_free(), rz_list_length(), rz_list_pop_head(), rz_num_math(), rz_num_str_split_list(), cmd_descs_generate::str, strdup(), and ut64().
Referenced by rz_cmd_help().
Get the 64-bit value that has exactly its width
lowest bits set to 1. e.g. rz_num_bitmask(2) == 0b11 rz_num_bitmask(3) == 0b111 ...
Definition at line 134 of file rz_num.h.
Referenced by bfc(), bfi(), bfm(), hex_op_masks_extract(), rz_arm_cs_analysis_op_32_esil(), rz_arm_cs_analysis_op_64_esil(), rz_bv_set_all(), and shifted_reg64_append().
Definition at line 482 of file calc.c.
References rz_num_calc_t::calc_buf, rz_num_calc_t::calc_err, rz_num_calc_t::calc_i, rz_num_calc_t::calc_len, rz_num_calc_t::curr_tok, RzNumCalcValue::d, err, rz_num_calc_t::errors, expr(), get_token(), load_token(), n, RzNumCalcValue::n, NULL, num, rz_num_calc_t::number_value, rz_num_calc_t::oc, RNCPRINT, cmd_descs_generate::str, and rz_num_calc_t::under_calc.
Referenced by rz_num_math().
Definition at line 603 of file unum.c.
References a, b, fail, free(), n, num, p, rz_num_math(), rz_str_replace_char(), s, cmd_descs_generate::str, strdup(), and ut64().
Referenced by rz_cmd_debug_step_cond_handler(), and rz_cmd_help().
RZ_API double rz_num_cos | ( | double | a | ) |
Definition at line 87 of file unum.c.
Referenced by __as_free(), rz_core_fini(), rz_debug_free(), rz_flag_free(), and rz_main_rz_ax().
Definition at line 172 of file unum.c.
References a, d, ERANGE, error(), free(), GB, i, IS_DIGIT, IS_SEPARATOR, KB, len, MB, NULL, num, ok, PFMT64d, PFMT64o, PFMT64x, rz_num_tailff(), rz_str_replace_char(), s, cmd_descs_generate::str, strdup(), tolower, UT16_MAX, UT32_MAX, ut64(), UT64_MAX, UT8_MAX, and x.
Referenced by __panels_process(), __system(), buf_format(), cin_get_num(), cmp(), disasm_strings(), ds_build_op_str(), ds_init(), ds_sub_jumps(), extract_arg(), fold_asm_trace(), foreach_pairs(), gb_parse_arith1(), gb_parse_cb2(), gb_parse_ld2(), gb_parse_ld3(), gbAsm(), get_cf_offset(), get_msg_type(), getreg(), isnum(), le_get_symbols_at(), parse_enum_node(), parse_grep_expression(), parse_struct_node(), parse_type_abstract_declarator_node(), parse_type_declarator_node(), parse_union_node(), prim(), print_heap_bin(), print_heap_fastbin(), riscv_op(), rop_classify_arithmetic_const(), rop_classify_constant(), rz_analysis_aefa(), rz_analysis_all_esil_handler(), rz_analysis_class_vtable_get(), rz_analysis_esil_get_parm_size(), rz_analysis_functions_map_handler(), rz_analyze_cycles_handler(), rz_bin_strpurge(), rz_cf_value_integer_new(), rz_cmd_alias(), rz_cmd_debug_dmi(), rz_cmd_debug_trace_add_addrs_handler(), rz_cmd_heap_bins_list_print(), rz_cmd_heap_chunks_print_handler(), rz_cmd_heap_fastbins_print(), rz_cmd_heap_info_print_handler(), rz_cmd_help(), rz_cmd_main_arena_print_handler(), rz_cmd_search(), rz_config_node_new(), rz_config_set(), rz_core_analysis_continue_until_call(), rz_core_analysis_continue_until_syscall(), rz_core_bin_export_info(), rz_core_rtr_add(), rz_core_visual_cmd(), rz_core_visual_debugtraces(), rz_core_visual_hudclasses(), rz_core_visual_hudstuff(), rz_core_visual_view_rop(), rz_debug_bochs_breakpoint(), rz_debug_bochs_reg_read(), rz_debug_bochs_wait(), rz_debug_gdb_map_get(), rz_num_tailff(), rz_print_areas_no_functions_handler(), rz_range_add_from_string(), rz_resolve_jemalloc(), rz_socket_port_by_name(), rz_str_range_in(), rz_syscall_item_new_from_string(), rz_table_tojson(), sh_op_movl_param_bits(), sh_op_param_bits(), sortNumber(), subvar(), typelinks_load_sdb(), and visual_refresh().
Definition at line 536 of file unum.c.
References d, and cmd_descs_generate::str.
Referenced by is_tcache().
Definition at line 681 of file unum.c.
References num, rz_num_math(), ut64(), and value.
Referenced by convert_offset_from_input().
Definition at line 147 of file unum.c.
RZ_API void rz_num_irand | ( | void | ) |
Definition at line 43 of file unum.c.
References rz_srand(), and rz_time_now().
Referenced by rz_core_rtr_http_run(), rz_core_write_random_at(), rz_file_slurp_random_line_count(), and rz_num_rand().
Checks if the first two chars of p
equal "0x".
p | The string which potentially represents a hex number. |
Definition at line 17 of file unum.c.
References p, and rz_return_val_if_fail.
Referenced by is_num(), seek_to_end_of_token(), and tokenize_asm_generic().
Definition at line 848 of file unum.c.
References c.
Referenced by rz_num_math(), and rz_num_str_len().
Definition at line 676 of file unum.c.
References num, rz_num_math(), ut64(), and value.
Referenced by convert_offset_from_input(), rz_open_close_handler(), rz_open_maps_relocate_current_handler(), rz_open_maps_relocate_handler(), rz_open_maps_remove_handler(), rz_open_maps_resize_handler(), rz_test_main(), and rz_write_random_handler().
Definition at line 456 of file unum.c.
References eprintf, err, free(), len, malloc(), memcpy(), NULL, num, p, rz_num_calc(), rz_num_is_op(), rz_num_math(), rz_str_delta(), s, cmd_descs_generate::str, and ut64().
Referenced by __break_points_cb(), __esil_step_range_cb(), __esil_step_to_cb(), __handle_mouse_on_panel(), __open(), __panels_process(), __parse_string_on_cursor(), __printPattern(), __watch_points_cb(), assemble(), assign_reg(), bfvm_reg_set(), build(), cmd_analysis_esil(), cmd_analysis_graph(), cmd_analysis_trampoline(), cmd_dcu(), cmd_debug_cont_syscall(), cmd_debug_pid(), cmd_pCd(), cmd_pCD(), cmd_pCx(), cmd_print_bars(), cmd_print_blocks(), cmd_print_gadget(), cmd_print_pv(), cmd_Quit(), cmd_seek_opcode(), common_write_value_handler(), config_print_node(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), disasm_strings(), disasm_until_ret(), do_iter_offsets(), ds_init(), ds_show_flags(), evalFlag(), exprmatch(), exprmatchreg(), filter(), filterFlags(), foreachOffset(), format_output(), get_dispatchmessage_offset(), getnum(), jemalloc_get_chunks(), jemalloc_print_narenas(), loadGP(), num_callback(), numget(), parseOperands(), rabin_do_operation(), rax(), riscv_op(), rz_analysis_aefa(), rz_analysis_appcall_handler(), rz_analysis_basic_block_find_paths_handler(), rz_analysis_class_base_add_handler(), rz_analysis_class_base_get(), rz_analysis_class_method_add_handler(), rz_analysis_class_method_get(), rz_analysis_class_vtable_add_handler(), rz_analysis_class_vtable_get(), rz_analysis_class_vtable_lookup_handler(), rz_analysis_continue_until_addr_handler(), rz_analysis_esil_init_mem_handler(), rz_analysis_esil_init_mem_remove_handler(), rz_analysis_function_analyze_jmptable_handler(), rz_analysis_function_blocks_add_handler(), rz_analysis_function_blocks_color_handler(), rz_analysis_function_blocks_edge_handler(), rz_analysis_function_blocks_switch_type_handler(), rz_analysis_function_stacksz_handler(), rz_analysis_function_until_handler(), rz_analysis_function_vars_bp_getref_handler(), rz_analysis_function_vars_bp_handler(), rz_analysis_function_vars_bp_setref_handler(), rz_analysis_function_vars_regs_getref_handler(), rz_analysis_function_vars_regs_setref_handler(), rz_analysis_function_vars_sp_getref_handler(), rz_analysis_function_vars_sp_handler(), rz_analysis_function_vars_sp_setref_handler(), rz_analysis_functions_merge_handler(), rz_analysis_global_variable_add_handler(), rz_analysis_global_variable_delete_byaddr_handler(), rz_analysis_hint_del_handler(), rz_analysis_hint_set_bits_handler(), rz_analysis_hint_set_fail_handler(), rz_analysis_hint_set_immbase_handler(), rz_analysis_hint_set_jump_handler(), rz_analysis_hint_set_ptr_handler(), rz_analysis_hint_set_ret_handler(), rz_analysis_hint_set_size_handler(), rz_analysis_hint_set_stackframe_handler(), rz_analysis_hint_set_val_handler(), rz_analysis_list_struct_offsets_handler(), rz_analysis_noreturn_drop(), rz_analysis_syscall_number_handler(), rz_analysis_syscall_show_handler(), rz_analysis_xrefs_copy_handler(), rz_analysis_xrefs_del_handler(), rz_analyze_function_linked_offsets_handler(), rz_analyze_n_ins_esil_handler(), rz_analyze_n_ins_handler(), rz_analyze_n_ins_size_handler(), rz_analyze_xrefs_section_bytes_handler(), rz_asm_pseudo_align(), rz_asm_pseudo_bits(), rz_asm_pseudo_byte(), rz_asm_pseudo_incbin(), rz_asm_pseudo_intN(), rz_asm_pseudo_org(), rz_block_decrease_handler(), rz_block_handler(), rz_block_increase_handler(), rz_block_max_handler(), rz_cmd_alias(), rz_cmd_analysis(), rz_cmd_cmp_addr_handler(), rz_cmd_cmp_bits_handler(), rz_cmd_cmp_bytes_handler(), rz_cmd_cmp_disasm_handler(), rz_cmd_cmp_hex_block_handler(), rz_cmd_cmp_hex_block_hexdiff_handler(), rz_cmd_cmp_hex_diff_lines_handler(), rz_cmd_cmp_unified1_handler(), rz_cmd_cmp_unified2_handler(), rz_cmd_cmp_unified4_handler(), rz_cmd_cmp_unified8_handler(), rz_cmd_cmp_unified_disasm_handler(), rz_cmd_cmp_unified_handler(), rz_cmd_comments_in_n_instructions_handler(), rz_cmd_debug(), rz_cmd_debug_add_bp_module_handler(), rz_cmd_debug_allocate_maps_handler(), rz_cmd_debug_continue_execution_handler(), rz_cmd_debug_continue_send_signal_handler(), rz_cmd_debug_continue_traptrace_handler(), rz_cmd_debug_disable_bp_index_handler(), rz_cmd_debug_disable_bp_trace_index_handler(), rz_cmd_debug_dmL_handler(), rz_cmd_debug_dmS_handler(), rz_cmd_debug_enable_bp_index_handler(), rz_cmd_debug_enable_bp_trace_index_handler(), rz_cmd_debug_remove_bp_index_handler(), rz_cmd_debug_run_command_bp_index_handler(), rz_cmd_debug_set_expr_bp_index_handler(), rz_cmd_debug_step_back_handler(), rz_cmd_debug_step_handler(), rz_cmd_debug_step_line_handler(), rz_cmd_debug_step_over_handler(), rz_cmd_debug_step_prog_handler(), rz_cmd_debug_step_skip_handler(), rz_cmd_debug_step_until_handler(), rz_cmd_debug_toggle_bp_index_handler(), rz_cmd_debug_toggle_bp_trace_index_handler(), rz_cmd_debug_trace_add_handler(), rz_cmd_debug_trace_calls_handler(), rz_cmd_debug_trace_esil_handler(), rz_cmd_debug_trace_tag_handler(), rz_cmd_disassemble_ropchain_handler(), rz_cmd_disassemble_summarize_block_handler(), rz_cmd_disassemble_summarize_n_bytes_handler(), rz_cmd_disassembly_all_possible_opcodes_handler(), rz_cmd_disassembly_n_bytes_handler(), rz_cmd_disassembly_n_instrs_as_text_json_handler(), rz_cmd_disassembly_n_instructions_handler(), rz_cmd_disassembly_n_instructions_with_flow_handler(), rz_cmd_example_handler(), rz_cmd_help(), rz_cmd_javar_handler(), rz_cmd_macro_break(), rz_cmd_print(), rz_cmd_print_gadget_add_handler(), rz_cmd_print_gadget_move_handler(), rz_cmd_search(), rz_cmd_sizes_of_n_instructions_handler(), rz_config_get_i(), rz_config_set(), rz_convert_mne_handler(), rz_core_analysis_everything(), rz_core_analysis_function_delete_var(), rz_core_asm_strsearch(), rz_core_bin_export_info(), rz_core_bin_load(), rz_core_cmd_foreach(), rz_core_cmd_foreach3(), rz_core_cmd_lastcmd_repeat(), rz_core_cmd_subst_i(), rz_core_debug_esil(), rz_core_debug_kill(), rz_core_file_reopen(), rz_core_help_vars_print(), rz_core_print_examine(), rz_core_print_scrollbar(), rz_core_print_scrollbar_bottom(), rz_core_rtr_remove(), rz_core_setup_debugger(), rz_core_visual(), rz_core_visual_bit_editor(), rz_core_visual_cmd(), rz_core_visual_define(), rz_core_visual_offset(), rz_core_visual_trackflags(), rz_core_visual_view_rop(), rz_debug_bp_add(), rz_debug_drx_handler(), rz_debug_memory_permission_handler(), rz_egg_mkvar(), rz_flag_add_handler(), rz_flag_append_handler(), rz_flag_base_handler(), rz_flag_comment_handler(), rz_flag_hexdump_handler(), rz_flag_length_handler(), rz_flag_move_handler(), rz_flag_range_handler(), rz_flag_relocate_handler(), rz_get_input_num_value(), rz_get_size(), rz_heap_debug_block_win(), rz_hex_from_c_array(), rz_hex_from_py_array(), rz_il_step_evaluate_handler(), rz_il_step_handler(), rz_il_step_over_until_addr_handler(), rz_il_step_skip_until_addr_handler(), rz_il_step_until_addr_handler(), rz_il_vm_status_handler(), rz_il_vm_step_handler(), rz_il_vm_step_until_addr_handler(), rz_il_vm_step_with_events_handler(), rz_is_valid_input_num_value(), rz_main_rizin(), rz_main_rz_asm(), rz_main_rz_bin(), rz_main_rz_find(), rz_main_rz_gg(), rz_meta_data_handler(), rz_meta_data_remove_handler(), rz_meta_format_handler(), rz_meta_hidden_handler(), rz_meta_magic_handler(), rz_meta_string_8bit_handler(), rz_meta_string_handler(), rz_meta_string_utf8_handler(), rz_meta_string_wide16_handler(), rz_meta_string_wide32_handler(), rz_num_base_of_string(), rz_num_between(), rz_num_conditional(), rz_num_get_input_value(), rz_num_is_valid_input(), rz_num_math(), rz_num_tail(), rz_open_arch_bits_handler(), rz_open_binary_add_handler(), rz_open_binary_del_handler(), rz_open_binary_rebase_handler(), rz_open_binary_reload_handler(), rz_open_binary_select_fd_handler(), rz_open_binary_select_id_handler(), rz_open_close_handler(), rz_open_exchange_handler(), rz_open_handler(), rz_open_malloc_handler(), rz_open_maps_all_fd_handler(), rz_open_maps_deprioritize_handler(), rz_open_maps_flags_handler(), rz_open_maps_list_handler(), rz_open_maps_map_fd_handler(), rz_open_maps_map_handler(), rz_open_maps_name_id_del_handler(), rz_open_maps_name_id_handler(), rz_open_maps_prioritize_binid_handler(), rz_open_maps_prioritize_fd_handler(), rz_open_maps_prioritize_handler(), rz_open_maps_relocate_current_handler(), rz_open_maps_relocate_handler(), rz_open_maps_remove_handler(), rz_open_maps_resize_handler(), rz_open_nobin_handler(), rz_open_nobin_write_handler(), rz_open_use_handler(), rz_open_write_handler(), rz_print_areas_no_functions_handler(), rz_print_bitstream_handler(), rz_print_byte_bitstream_handler(), rz_print_commands_after_traps_handler(), rz_print_delta_pointer_table_handler(), rz_print_hexdump_annotated_handler(), rz_print_hexdump_bits_handler(), rz_print_hexdump_comments_handler(), rz_print_hexdump_emoji_handler(), rz_print_hexdump_handler(), rz_print_hexdump_hex_common_handler(), rz_print_hexdump_hexl_common_handler(), rz_print_hexdump_hexless_bytes_handler(), rz_print_hexdump_hexless_words_handler(), rz_print_hexdump_n_lines_handler(), rz_print_hexdump_oct_handler(), rz_print_hexdump_signed_integer_common_handler(), rz_print_hexdump_sparse_handler(), rz_print_hexword_references_common_handler(), rz_print_op_analysis_color_map_handler(), rz_print_utf16be_handler(), rz_print_utf16le_handler(), rz_print_utf32be_handler(), rz_print_utf32le_handler(), rz_rebase_handler(), rz_reg_set_bvalue(), rz_reopen_debug_file_handler(), rz_reopen_handler(), rz_reopen_write_handler(), rz_resize_handler(), rz_resize_insert_handler(), rz_resize_remove_handler(), rz_seek_asz_handler(), rz_seek_blocksize_backward_handler(), rz_seek_blocksize_forward_handler(), rz_seek_handler(), rz_table_filter(), rz_tasks_break_handler(), rz_tasks_delete_handler(), rz_tasks_output_handler(), rz_tasks_wait_handler(), rz_test_main(), rz_type_format_data_internal(), rz_type_format_struct_size(), rz_type_format_uleb(), rz_type_link_del_handler(), rz_type_link_handler(), rz_type_link_show_handler(), rz_type_list_noreturn_handler(), rz_type_print_handler(), rz_type_print_value_handler(), rz_type_xrefs_function_handler(), rz_w32_add_winmsg_breakpoint(), rz_write_bits_handler(), rz_write_cache_commit_handler(), rz_write_cache_remove_handler(), rz_write_debruijn_find_handler(), rz_write_debruijn_handler(), rz_write_duplicate_handler(), rz_write_extend_hexbytes_handler(), rz_write_extend_shift_handler(), rz_write_extend_zero_handler(), rz_write_from_file_handler(), rz_write_from_io_handler(), rz_write_from_io_xchg_handler(), rz_write_from_socket_handler(), rz_write_op_sequence_handler(), rz_write_pcache_commit_handler(), rz_write_pcache_list_handler(), rz_write_random_handler(), rz_write_unified_patch_handler(), rz_write_unset_bits_handler(), rz_write_zero_handler(), rz_yank_file_handler(), rz_yank_handler(), rz_yank_hex_print_handler(), rz_yank_paste_handler(), rz_yank_print_handler(), rz_yank_string_handler(), rz_yank_string_print_handler(), rz_yank_to_handler(), sdb_load_arch_profile(), set_prompt(), subvar(), syscalls_dump(), thumb_getoffset(), types_enum_member_find(), types_enum_member_find_all(), v_writebuf(), w_incdec_handler(), and xrefs_set().
Definition at line 59 of file unum.c.
References a, b, autogen_x86imm::tmp, and ut64().
Referenced by rz_range_add(), and rz_range_sub().
RZ_API RzNum* rz_num_new | ( | RzNumCallback | cb, |
RzNumCallback2 | cb2, | ||
void * | ptr | ||
) |
Definition at line 75 of file unum.c.
References cb, NULL, num, and RZ_NEW0.
Referenced by __as_new(), rz_core_init(), rz_debug_new(), rz_flag_new(), and rz_main_rz_ax().
Definition at line 47 of file unum.c.
References max, rz_num_irand(), and rz_rand().
Referenced by _sendResponsePacket(), rz_cmd_help(), rz_cons_color_random(), rz_core_clippy(), rz_core_rtr_http_run(), rz_core_visual_colors(), rz_core_write_random_at(), rz_file_slurp_random_line_count(), rz_io_zip_create_new_file(), rz_main_rz_agent(), and rz_socket_spawn().
RZ_API double rz_num_sin | ( | double | a | ) |
Definition at line 854 of file unum.c.
References i, len, rz_num_is_op(), rz_num_str_len(), and cmd_descs_generate::str.
Referenced by rz_num_str_len(), and rz_num_str_split().
Definition at line 893 of file unum.c.
References count, i, len, rz_num_str_len(), and cmd_descs_generate::str.
Referenced by rz_num_str_split_list().
Definition at line 905 of file unum.c.
References count, i, list(), rz_list_append(), rz_list_new(), rz_num_str_split(), and cmd_descs_generate::str.
Referenced by rz_cmd_help(), rz_cmd_search(), and rz_num_between().
Definition at line 775 of file unum.c.
References addr, eprintf, free(), hex, i, isxdigit, malloc(), mask, n, num, p, rz_num_math(), ut64(), and UT64_MAX.
Referenced by cmd_dcu(), num_callback(), rz_core_cmd_subst_i(), and rz_core_seek_base().
Definition at line 578 of file unum.c.
References i, NULL, num, out, and rz_str_reverse().
Referenced by format_output(), rax(), and rz_cmd_help().
Convert size in bytes to human-readable string
Result is stored in buf (buf should be at least 8 bytes in size). If buf is NULL, memory for the new string is obtained with malloc(3), and can be freed with free(3).
On success, returns a pointer to buf. It returns NULL if insufficient memory was available.
Definition at line 108 of file unum.c.
References EB, GB, KB, LDBLFMT, len, malloc(), MB, NULL, num, PB, snprintf, and TB.
Referenced by bin_resources_print_standard(), print_arena_stats(), print_debug_map_line(), print_debug_maps_ascii_art(), rax(), rz_cmd_help(), rz_cmd_info_section_bars_handler(), rz_cons_flush(), rz_core_file_info_print(), and rz_resize_human_handler().