version 1.44, 2013/03/22 15:54:29 |
version 1.45, 2013/03/24 09:54:10 |
|
|
void |
void |
window_choose_data_run(struct window_choose_data *cdata) |
window_choose_data_run(struct window_choose_data *cdata) |
{ |
{ |
struct cmd_ctx *ctx; |
struct cmd_list *cmdlist; |
struct cmd_list *cmdlist; |
char *cause; |
char *cause; |
|
|
|
/* |
/* |
* The command template will have already been replaced. But if it's |
* The command template will have already been replaced. But if it's |
|
|
if (cdata->command == NULL) |
if (cdata->command == NULL) |
return; |
return; |
|
|
if (cmd_string_parse(cdata->command, &cmdlist, &cause) != 0) { |
if (cmd_string_parse(cdata->command, &cmdlist, NULL, 0, &cause) != 0) { |
if (cause != NULL) { |
if (cause != NULL) { |
*cause = toupper((u_char) *cause); |
*cause = toupper((u_char) *cause); |
status_message_set(cdata->start_client, "%s", cause); |
status_message_set(cdata->start_client, "%s", cause); |
|
|
return; |
return; |
} |
} |
|
|
ctx = cmd_get_ctx(NULL, cdata->start_client); |
cmdq_run(cdata->start_client->cmdq, cmdlist); |
ctx->error = key_bindings_error; |
|
ctx->print = key_bindings_print; |
|
ctx->info = key_bindings_info; |
|
|
|
cmd_list_exec(cmdlist, ctx); |
|
cmd_list_free(cmdlist); |
cmd_list_free(cmdlist); |
cmd_free_ctx(ctx); |
|
} |
} |
|
|
void |
void |