src/commands.cc

changeset 87
8f65914e7046
parent 85
264a61e9eba0
equal deleted inserted replaced
86:43fe4be38a58 87:8f65914e7046
65 // ============================================================================ 65 // ============================================================================
66 // Returns the prototype of the command 66 // Returns the prototype of the command
67 string get_command_signature (command_info* comm) 67 string get_command_signature (command_info* comm)
68 { 68 {
69 string text; 69 string text;
70 text += GetTypeName (comm->returnvalue); 70 text += get_type_name (comm->returnvalue);
71 text += ' '; 71 text += ' ';
72 text += comm->name; 72 text += comm->name;
73 73
74 if (comm->maxargs != 0) 74 if (comm->maxargs != 0)
75 text += ' '; 75 text += ' ';
87 } 87 }
88 88
89 if (i) 89 if (i)
90 text += ", "; 90 text += ", ";
91 91
92 text += GetTypeName (comm->args[i].type); 92 text += get_type_name (comm->args[i].type);
93 text += ' '; 93 text += ' ';
94 text += comm->args[i].name; 94 text += comm->args[i].name;
95 95
96 if (i >= comm->numargs) 96 if (i >= comm->numargs)
97 { 97 {
98 text += " = "; 98 text += " = ";
99 99
100 bool is_string = comm->args[i].type == TYPE_STRING; 100 bool is_string = comm->args[i].type == e_string_type;
101 101
102 if (is_string) 102 if (is_string)
103 text += '"'; 103 text += '"';
104 104
105 text += string::from_number (comm->args[i].defvalue); 105 text += string::from_number (comm->args[i].defvalue);

mercurial