[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.12 and 1.13

version 1.12, 2001/05/23 22:20:35 version 1.13, 2001/05/23 22:36:13
Line 139 
Line 139 
                         if (curmap->map_num >= curmap->map_max &&                          if (curmap->map_num >= curmap->map_max &&
                             (curmap = realocmap(curmap)) == NULL)                              (curmap = realocmap(curmap)) == NULL)
                                 return FALSE;                                  return FALSE;
                         if ((pfp = (PF *)malloc(sizeof(PF))) == NULL) {                          if ((pfp = malloc(sizeof(PF))) == NULL) {
                                 ewprintf("Out of memory");                                  ewprintf("Out of memory");
                                 return FALSE;                                  return FALSE;
                         }                          }
Line 182 
Line 182 
                         return TRUE;                          return TRUE;
                 if (funct != NULL || ele->k_prefmap == NULL) {                  if (funct != NULL || ele->k_prefmap == NULL) {
                         if (ele->k_funcp[n1] == NULL)                          if (ele->k_funcp[n1] == NULL)
                                 ele->k_prefmap = (KEYMAP *) NULL;                                  ele->k_prefmap = NULL;
                         /* easy case */                          /* easy case */
                         ele->k_funcp[n1] = funct;                          ele->k_funcp[n1] = funct;
                         if (funct == NULL) {                          if (funct == NULL) {
Line 341 
Line 341 
                 for (s = 0; s < maclcur->l_used - 1; s++) {                  for (s = 0; s < maclcur->l_used - 1; s++) {
                         if (doscan(curmap, c = CHARMASK(maclcur->l_text[s]), &curmap)                          if (doscan(curmap, c = CHARMASK(maclcur->l_text[s]), &curmap)
                             != NULL) {                              != NULL) {
                                 if (remap(curmap, c, NULL, (KEYMAP *)NULL)                                  if (remap(curmap, c, NULL, NULL)
                                     != TRUE)                                      != TRUE)
                                         return FALSE;                                          return FALSE;
                         }                          }
Line 408 
Line 408 
         }          }
         while (--kcount) {          while (--kcount) {
                 if (doscan(curmap, c = *keys++, &curmap) != NULL) {                  if (doscan(curmap, c = *keys++, &curmap) != NULL) {
                         if (remap(curmap, c, NULL, (KEYMAP *)NULL) != TRUE)                          if (remap(curmap, c, NULL, NULL) != TRUE)
                                 return FALSE;                                  return FALSE;
                         /*                          /*
                          * XXX - Bizzarreness. remap creates an empty KEYMAP                           * XXX - Bizzarreness. remap creates an empty KEYMAP
Line 652 
Line 652 
                 /* just to be careful */                  /* just to be careful */
                 return FALSE;                  return FALSE;
   
         if (ffropen(fname, (BUFFER *)NULL) != FIOSUC)          if (ffropen(fname, NULL) != FIOSUC)
                 return FALSE;                  return FALSE;
   
         while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) {          while ((s = ffgetline(excbuf, sizeof(excbuf) - 1, &nbytes)) == FIOSUC) {
Line 663 
Line 663 
                         break;                          break;
                 }                  }
         }          }
         (void)ffclose((BUFFER *)NULL);          (void)ffclose(NULL);
         excbuf[nbytes] = '\0';          excbuf[nbytes] = '\0';
         if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE))          if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE))
                 return FALSE;                  return FALSE;
Line 891 
Line 891 
                         lp->l_text[lp->l_used] = '\0';                          lp->l_text[lp->l_used] = '\0';
                         status = bindkey(&curmap, lp->l_text, key.k_chars,                          status = bindkey(&curmap, lp->l_text, key.k_chars,
                             key.k_count);                              key.k_count);
                 } else                  } else {
                         status = bindkey(&curmap, (char *)NULL, key.k_chars,                          status = bindkey(&curmap, NULL, key.k_chars,
                             key.k_count);                              key.k_count);
                   }
                 break;                  break;
         case BINDNO:          case BINDNO:
 #endif /* FKEYS */  #endif /* FKEYS */

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13