Rizin
unix-like reverse engineering framework and cli tools
cmd_descs_util Namespace Reference

Functions

def compute_cname (name)
 
def get_handler_cname (ty, handler, cname)
 

Variables

string CD_TYPE_OLDINPUT = "RZ_CMD_DESC_TYPE_OLDINPUT"
 
string CD_TYPE_GROUP = "RZ_CMD_DESC_TYPE_GROUP"
 
string CD_TYPE_ARGV = "RZ_CMD_DESC_TYPE_ARGV"
 
string CD_TYPE_ARGV_MODES = "RZ_CMD_DESC_TYPE_ARGV_MODES"
 
string CD_TYPE_ARGV_STATE = "RZ_CMD_DESC_TYPE_ARGV_STATE"
 
string CD_TYPE_FAKE = "RZ_CMD_DESC_TYPE_FAKE"
 
string CD_TYPE_INNER = "RZ_CMD_DESC_TYPE_INNER"
 
list CD_VALID_TYPES
 
list CD_ARG_LAST_TYPES
 

Function Documentation

◆ compute_cname()

def cmd_descs_util.compute_cname (   name)

Definition at line 30 of file cmd_descs_util.py.

30 def compute_cname(name):
31  if name == "":
32  return "empty"
33 
34  name = name.translate(
35  str.maketrans(
36  {
37  ".": "_dot_",
38  "*": "_star_",
39  ">": "_greater_",
40  "<": "_minor_",
41  "-": "_minus_",
42  "+": "_plus_",
43  "=": "_equal_",
44  "$": "_dollar_",
45  "?": "_question_",
46  "/": "_slash_",
47  "\\": "_backslash_",
48  "&": "_and_",
49  "!": "_escl_",
50  "#": "_hash_",
51  " ": "_space_",
52  "(": "_oparen_",
53  ")": "_cparen_",
54  }
55  )
56  )
57  if name.startswith("_"):
58  name = name[1:]
59 
60  return name
61 
62 
def compute_cname(name)

Referenced by cmd_descs_generate.Arg._get_choices_cname(), rzshell_which.find_c_name_handler(), and cmd_descs_generate.Detail.get_detail_entries_cname().

◆ get_handler_cname()

def cmd_descs_util.get_handler_cname (   ty,
  handler,
  cname 
)

Definition at line 63 of file cmd_descs_util.py.

63 def get_handler_cname(ty, handler, cname):
64  if ty == CD_TYPE_OLDINPUT:
65  return "rz_" + (handler or cname)
66 
67  return "rz_" + (handler or cname) + "_handler"
def get_handler_cname(ty, handler, cname)

Referenced by rzshell_which.find_c_name_handler().

Variable Documentation

◆ CD_ARG_LAST_TYPES

list cmd_descs_util.CD_ARG_LAST_TYPES
Initial value:
1 = [
2  "RZ_CMD_ARG_TYPE_RZNUM",
3  "RZ_CMD_ARG_TYPE_STRING",
4  "RZ_CMD_ARG_TYPE_CMD",
5 ]

Definition at line 23 of file cmd_descs_util.py.

◆ CD_TYPE_ARGV

string cmd_descs_util.CD_TYPE_ARGV = "RZ_CMD_DESC_TYPE_ARGV"

Definition at line 7 of file cmd_descs_util.py.

◆ CD_TYPE_ARGV_MODES

string cmd_descs_util.CD_TYPE_ARGV_MODES = "RZ_CMD_DESC_TYPE_ARGV_MODES"

Definition at line 8 of file cmd_descs_util.py.

◆ CD_TYPE_ARGV_STATE

string cmd_descs_util.CD_TYPE_ARGV_STATE = "RZ_CMD_DESC_TYPE_ARGV_STATE"

Definition at line 9 of file cmd_descs_util.py.

◆ CD_TYPE_FAKE

string cmd_descs_util.CD_TYPE_FAKE = "RZ_CMD_DESC_TYPE_FAKE"

Definition at line 10 of file cmd_descs_util.py.

◆ CD_TYPE_GROUP

string cmd_descs_util.CD_TYPE_GROUP = "RZ_CMD_DESC_TYPE_GROUP"

Definition at line 6 of file cmd_descs_util.py.

◆ CD_TYPE_INNER

string cmd_descs_util.CD_TYPE_INNER = "RZ_CMD_DESC_TYPE_INNER"

Definition at line 11 of file cmd_descs_util.py.

◆ CD_TYPE_OLDINPUT

string cmd_descs_util.CD_TYPE_OLDINPUT = "RZ_CMD_DESC_TYPE_OLDINPUT"

Definition at line 5 of file cmd_descs_util.py.

◆ CD_VALID_TYPES

list cmd_descs_util.CD_VALID_TYPES
Initial value:
1 = [
2  CD_TYPE_OLDINPUT,
3  CD_TYPE_GROUP,
4  CD_TYPE_ARGV,
5  CD_TYPE_ARGV_MODES,
6  CD_TYPE_ARGV_STATE,
7  CD_TYPE_FAKE,
8  CD_TYPE_INNER,
9 ]

Definition at line 13 of file cmd_descs_util.py.