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

Diff for /src/usr.bin/mg/extend.c between version 1.9 and 1.10

version 1.9, 2001/05/23 20:42:46 version 1.10, 2001/05/23 20:57:54
Line 497 
Line 497 
         int f, n;          int f, n;
 {  {
         static char      buf[48] = "Define key map: ";          static char      buf[48] = "Define key map: ";
         MAPS            *mp;          KEYMAP          *mp;
   
         buf[16] = '\0';          buf[16] = '\0';
         if (eread(buf, &buf[16], 48 - 16, EFNEW) != TRUE)          if (eread(buf, &buf[16], 48 - 16, EFNEW) != TRUE)
                 return FALSE;                  return FALSE;
         if ((mp = name_mode(&buf[16])) == NULL) {          if ((mp = name_map(&buf[16])) == NULL) {
                 ewprintf("Unknown map %s", &buf[16]);                  ewprintf("Unknown map %s", &buf[16]);
                 return FALSE;                  return FALSE;
         }          }
         (VOID)strncat(&buf[16], " key: ", 48 - 16 - 1);          (VOID)strncat(&buf[16], " key: ", 48 - 16 - 1);
         return dobind(mp->p_map, buf, FALSE);          return dobind(mp, buf, FALSE);
 }  }
   
 int  int
Line 687 
Line 687 
 #ifdef  FKEYS  #ifdef  FKEYS
         int      bind;          int      bind;
         KEYMAP  *curmap;          KEYMAP  *curmap;
         MAPS    *mp;  
 #define BINDARG         0  /* this arg is key to bind (local/global set key) */  #define BINDARG         0  /* this arg is key to bind (local/global set key) */
 #define BINDNO          1  /* not binding or non-quoted BINDARG */  #define BINDNO          1  /* not binding or non-quoted BINDARG */
 #define BINDNEXT        2  /* next arg " (define-key) */  #define BINDNEXT        2  /* next arg " (define-key) */
Line 862 
Line 861 
                         break;                          break;
                 case BINDNEXT:                  case BINDNEXT:
                         lp->l_text[lp->l_used] = '\0';                          lp->l_text[lp->l_used] = '\0';
                         if ((mp = name_mode(lp->l_text)) == NULL) {                          if ((curmap = name_map(lp->l_text)) == NULL) {
                                 ewprintf("No such mode: %s", lp->l_text);                                  ewprintf("No such mode: %s", lp->l_text);
                                 status = FALSE;                                  status = FALSE;
                                 free((char *)lp);                                  free((char *)lp);
                                 goto cleanup;                                  goto cleanup;
                         }                          }
                         curmap = mp->p_map;  
                         free((char *)lp);                          free((char *)lp);
                         bind = BINDARG;                          bind = BINDARG;
                         break;                          break;

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