src/commands.cc

changeset 79
2425fa6a4f21
parent 75
bf8c57437231
child 82
841562f5a32f
equal deleted inserted replaced
78:e6d7e32e6481 79:2425fa6a4f21
155 { 155 {
156 string text; 156 string text;
157 text += GetTypeName (comm->returnvalue); 157 text += GetTypeName (comm->returnvalue);
158 text += ' '; 158 text += ' ';
159 text += comm->name; 159 text += comm->name;
160
161 if (comm->maxargs != 0)
162 text += ' ';
163
160 text += '('; 164 text += '(';
161 165
162 bool hasoptionals = false; 166 bool hasoptionals = false;
163 167
164 for (int i = 0; i < comm->maxargs; i++) 168 for (int i = 0; i < comm->maxargs; i++)
176 text += ' '; 180 text += ' ';
177 text += comm->args[i].name; 181 text += comm->args[i].name;
178 182
179 if (i >= comm->numargs) 183 if (i >= comm->numargs)
180 { 184 {
181 text += '='; 185 text += " = ";
182 186
183 bool is_string = comm->args[i].type == TYPE_STRING; 187 bool is_string = comm->args[i].type == TYPE_STRING;
184 188
185 if (is_string) 189 if (is_string)
186 text += '"'; 190 text += '"';

mercurial