[BACK]Return to mode-key.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/Attic/mode-key.c between version 1.10 and 1.11

version 1.10, 2009/07/28 07:03:32 version 1.11, 2009/07/28 17:05:10
Line 18 
Line 18 
   
 #include <sys/types.h>  #include <sys/types.h>
   
   #include <string.h>
   
 #include "tmux.h"  #include "tmux.h"
   
 /*  /*
Line 54 
Line 56 
         { MODEKEYEDIT_STARTOFLINE, "start-of-line" },          { MODEKEYEDIT_STARTOFLINE, "start-of-line" },
         { MODEKEYEDIT_SWITCHMODE, "switch-mode" },          { MODEKEYEDIT_SWITCHMODE, "switch-mode" },
         { MODEKEYEDIT_SWITCHMODEAPPEND, "switch-mode-append" },          { MODEKEYEDIT_SWITCHMODEAPPEND, "switch-mode-append" },
   
           { 0, NULL }
 };  };
   
 /* Choice keys command strings. */  /* Choice keys command strings. */
Line 64 
Line 68 
         { MODEKEYCHOICE_PAGEDOWN, "page-down" },          { MODEKEYCHOICE_PAGEDOWN, "page-down" },
         { MODEKEYCHOICE_PAGEUP, "page-up" },          { MODEKEYCHOICE_PAGEUP, "page-up" },
         { MODEKEYCHOICE_UP, "up" },          { MODEKEYCHOICE_UP, "up" },
   
           { 0, NULL }
 };  };
   
 /* Copy keys command strings. */  /* Copy keys command strings. */
Line 83 
Line 89 
         { MODEKEYCOPY_STARTOFLINE, "start-of-line" },          { MODEKEYCOPY_STARTOFLINE, "start-of-line" },
         { MODEKEYCOPY_STARTSELECTION, "begin-selection" },          { MODEKEYCOPY_STARTSELECTION, "begin-selection" },
         { MODEKEYCOPY_UP, "cursor-up" },          { MODEKEYCOPY_UP, "cursor-up" },
   
           { 0, NULL }
 };  };
   
 /* vi editing keys. */  /* vi editing keys. */
Line 274 
Line 282 
         for (; cmdstr->name != NULL; cmdstr++) {          for (; cmdstr->name != NULL; cmdstr++) {
                 if (cmdstr->cmd == cmd)                  if (cmdstr->cmd == cmd)
                         return (cmdstr->name);                          return (cmdstr->name);
           }
           return (NULL);
   }
   
   enum mode_key_cmd
   mode_key_fromstring(struct mode_key_cmdstr *cmdstr, const char *name)
   {
           for (; cmdstr->name != NULL; cmdstr++) {
                   if (strcasecmp(cmdstr->name, name) == 0)
                           return (cmdstr->cmd);
           }
           return (MODEKEY_NONE);
   }
   
   const struct mode_key_table *
   mode_key_findtable(const char *name)
   {
           const struct mode_key_table     *mtab;
   
           for (mtab = mode_key_tables; mtab->name != NULL; mtab++) {
                   if (strcasecmp(name, mtab->name) == 0)
                           return (mtab);
         }          }
         return (NULL);          return (NULL);
 }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11