[BACK]Return to keymap.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Diff for /src/usr.bin/mg/keymap.c between version 1.10 and 1.11

version 1.10, 2001/05/23 22:36:14 version 1.11, 2001/05/23 22:56:52
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
   
 /*  /*
  * Keyboard maps.  This is character set dependent.  The terminal specific   * Keyboard maps.  This is character set dependent.  The terminal specific
  * parts of building the keymap has been moved to a better place.   * parts of building the keymap has been moved to a better place.
  */   */
   
Line 11 
Line 11 
 static int       name_fent      __P((char *, int));  static int       name_fent      __P((char *, int));
   
 /*  /*
  * initial keymap declarations, deepest first   * initial keymap declarations, deepest first
  */   */
   
 #ifndef NO_HELP  #ifndef NO_HELP
Line 656 
Line 656 
  * in name_function.)  If the function is NULL, it must be listed with the   * in name_function.)  If the function is NULL, it must be listed with the
  * same name in the map_table above.   * same name in the map_table above.
  */   */
 FUNCTNAMES functnames[] = {  const FUNCTNAMES functnames[] = {
 #ifndef NO_HELP  #ifndef NO_HELP
         {apropos_command, "apropos"},          {apropos_command, "apropos"},
 #endif /* !NO_HELP */  #endif /* !NO_HELP */
Line 875 
Line 875 
         do {          do {
                 /* + can be used instead of | here if more efficent.     */                  /* + can be used instead of | here if more efficent.     */
                 if ((try = base | x) < NFUNCT) {                  if ((try = base | x) < NFUNCT) {
                         if ((notit = strcmp(fname, functnames[try].n_name))                          if ((notit = strcmp(fname, functnames[try].n_name))
                             >= 0) {                              >= 0) {
                                 if (!notit)                                  if (!notit)
                                         return try;                                          return try;
Line 918 
Line 918 
                 if (++i >= NFUNCT)                  if (++i >= NFUNCT)
                         /* no match */                          /* no match */
                         return NULL;                          return NULL;
                 for (j = 0; (l = fname[j]) && functnames[i].n_name[j] == l;                  for (j = 0; (l = fname[j]) && functnames[i].n_name[j] == l;
                     j++);                      j++);
                 if (fname[j] != '\0')                  if (fname[j] != '\0')
                         /* no match */                          /* no match */
Line 951 
Line 951 
 function_name(fpoint)  function_name(fpoint)
         PF fpoint;          PF fpoint;
 {  {
         FUNCTNAMES      *fnp = &functnames[0];          const FUNCTNAMES        *fnp = &functnames[0];
   
         if (fpoint == NULL)          if (fpoint == NULL)
                 /* ambiguous */                  /* ambiguous */

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