Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12639

Modified Files:
        mode-key.c tmux.h 
Log Message:
Sync OpenBSD patchset 823:

Sprinkle a little more const.


Index: mode-key.c
===================================================================
RCS file: /cvsroot/tmux/tmux/mode-key.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- mode-key.c  16 Mar 2010 17:30:58 -0000      1.46
+++ mode-key.c  3 Jan 2011 23:31:26 -0000       1.47
@@ -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 @@
 };
 
 /* 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 @@
 };
 
 /* 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 @@
 }
 
 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 @@
 }
 
 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)

Index: tmux.h
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.h,v
retrieving revision 1.598
retrieving revision 1.599
diff -u -d -r1.598 -r1.599
--- tmux.h      3 Jan 2011 23:30:43 -0000       1.598
+++ tmux.h      3 Jan 2011 23:31:26 -0000       1.599
@@ -530,10 +530,10 @@
 
 /* Named mode key table description. */
 struct mode_key_table {
-       const char              *name;
-       struct mode_key_cmdstr  *cmdstr;
-       struct mode_key_tree    *tree;
-       const struct mode_key_entry *table;     /* default entries */
+       const char                      *name;
+       const struct mode_key_cmdstr    *cmdstr;
+       struct mode_key_tree            *tree;
+       const struct mode_key_entry     *table; /* default entries */
 };
 
 /* Modes. */
@@ -1325,8 +1325,10 @@
 extern struct mode_key_tree mode_key_tree_emacs_copy;
 int    mode_key_cmp(struct mode_key_binding *, struct mode_key_binding *);
 SPLAY_PROTOTYPE(mode_key_tree, mode_key_binding, entry, mode_key_cmp);
-const char *mode_key_tostring(struct mode_key_cmdstr *r, enum mode_key_cmd);
-enum mode_key_cmd mode_key_fromstring(struct mode_key_cmdstr *, const char *);
+const char *mode_key_tostring(const struct mode_key_cmdstr *,
+           enum mode_key_cmd);
+enum mode_key_cmd mode_key_fromstring(const struct mode_key_cmdstr *,
+           const char *);
 const struct mode_key_table *mode_key_findtable(const char *);
 void   mode_key_init_trees(void);
 void   mode_key_init(struct mode_key_data *, struct mode_key_tree *);


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to