version 1.35, 2010/03/22 19:10:42 |
version 1.36, 2011/01/01 03:39:21 |
|
|
*/ |
*/ |
|
|
/* Edit keys command strings. */ |
/* Edit keys command strings. */ |
struct mode_key_cmdstr mode_key_cmdstr_edit[] = { |
const struct mode_key_cmdstr mode_key_cmdstr_edit[] = { |
{ MODEKEYEDIT_BACKSPACE, "backspace" }, |
{ MODEKEYEDIT_BACKSPACE, "backspace" }, |
{ MODEKEYEDIT_CANCEL, "cancel" }, |
{ MODEKEYEDIT_CANCEL, "cancel" }, |
{ MODEKEYEDIT_COMPLETE, "complete" }, |
{ MODEKEYEDIT_COMPLETE, "complete" }, |
|
|
}; |
}; |
|
|
/* Choice keys command strings. */ |
/* Choice keys command strings. */ |
struct mode_key_cmdstr mode_key_cmdstr_choice[] = { |
const struct mode_key_cmdstr mode_key_cmdstr_choice[] = { |
{ MODEKEYCHOICE_CANCEL, "cancel" }, |
{ MODEKEYCHOICE_CANCEL, "cancel" }, |
{ MODEKEYCHOICE_CHOOSE, "choose" }, |
{ MODEKEYCHOICE_CHOOSE, "choose" }, |
{ MODEKEYCHOICE_DOWN, "down" }, |
{ MODEKEYCHOICE_DOWN, "down" }, |
|
|
}; |
}; |
|
|
/* Copy keys command strings. */ |
/* Copy keys command strings. */ |
struct mode_key_cmdstr mode_key_cmdstr_copy[] = { |
const struct mode_key_cmdstr mode_key_cmdstr_copy[] = { |
{ MODEKEYCOPY_BACKTOINDENTATION, "back-to-indentation" }, |
{ MODEKEYCOPY_BACKTOINDENTATION, "back-to-indentation" }, |
{ MODEKEYCOPY_BOTTOMLINE, "bottom-line" }, |
{ MODEKEYCOPY_BOTTOMLINE, "bottom-line" }, |
{ MODEKEYCOPY_CANCEL, "cancel" }, |
{ MODEKEYCOPY_CANCEL, "cancel" }, |
|
|
} |
} |
|
|
const char * |
const char * |
mode_key_tostring(struct mode_key_cmdstr *cmdstr, enum mode_key_cmd cmd) |
mode_key_tostring(const struct mode_key_cmdstr *cmdstr, enum mode_key_cmd cmd) |
{ |
{ |
for (; cmdstr->name != NULL; cmdstr++) { |
for (; cmdstr->name != NULL; cmdstr++) { |
if (cmdstr->cmd == cmd) |
if (cmdstr->cmd == cmd) |
|
|
} |
} |
|
|
enum mode_key_cmd |
enum mode_key_cmd |
mode_key_fromstring(struct mode_key_cmdstr *cmdstr, const char *name) |
mode_key_fromstring(const struct mode_key_cmdstr *cmdstr, const char *name) |
{ |
{ |
for (; cmdstr->name != NULL; cmdstr++) { |
for (; cmdstr->name != NULL; cmdstr++) { |
if (strcasecmp(cmdstr->name, name) == 0) |
if (strcasecmp(cmdstr->name, name) == 0) |