diff options
author | Tiago Cunha <tcunha@gmx.com> | 2011-01-03 23:31:26 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2011-01-03 23:31:26 +0000 |
commit | 521247bedb4756f08ba9fdcf2c073dc318e3dcc6 (patch) | |
tree | 305de6d11b504ee8450012abb276cf25c9353ecd /mode-key.c | |
parent | 9ad028e8ee183c96e0973aaf785bf849307e01a7 (diff) | |
download | rtmux-521247bedb4756f08ba9fdcf2c073dc318e3dcc6.tar.gz rtmux-521247bedb4756f08ba9fdcf2c073dc318e3dcc6.tar.bz2 rtmux-521247bedb4756f08ba9fdcf2c073dc318e3dcc6.zip |
Sync OpenBSD patchset 823:
Sprinkle a little more const.
Diffstat (limited to 'mode-key.c')
-rw-r--r-- | mode-key.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: mode-key.c,v 1.46 2010-03-16 17:30:58 micahcowan Exp $ */ +/* $Id: mode-key.c,v 1.47 2011-01-03 23:31:26 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -40,7 +40,7 @@ */ /* 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_CANCEL, "cancel" }, { MODEKEYEDIT_COMPLETE, "complete" }, @@ -63,7 +63,7 @@ struct mode_key_cmdstr mode_key_cmdstr_edit[] = { }; /* 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_CHOOSE, "choose" }, { MODEKEYCHOICE_DOWN, "down" }, @@ -77,7 +77,7 @@ struct mode_key_cmdstr mode_key_cmdstr_choice[] = { }; /* 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_BOTTOMLINE, "bottom-line" }, { MODEKEYCOPY_CANCEL, "cancel" }, @@ -384,7 +384,7 @@ mode_key_cmp(struct mode_key_binding *mbind1, struct mode_key_binding *mbind2) } 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++) { if (cmdstr->cmd == cmd) @@ -394,7 +394,7 @@ mode_key_tostring(struct mode_key_cmdstr *cmdstr, enum mode_key_cmd 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++) { if (strcasecmp(cmdstr->name, name) == 0) |