[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.11 and 1.12

version 1.11, 2001/05/23 22:12:10 version 1.12, 2001/05/23 22:20:35
Line 22 
Line 22 
   
 static int       remap          __P((KEYMAP *, int, PF, KEYMAP *));  static int       remap          __P((KEYMAP *, int, PF, KEYMAP *));
 static KEYMAP   *realocmap      __P((KEYMAP *));  static KEYMAP   *realocmap      __P((KEYMAP *));
 static VOID      fixmap         __P((KEYMAP *, KEYMAP *, KEYMAP *));  static void      fixmap         __P((KEYMAP *, KEYMAP *, KEYMAP *));
 static int       dobind         __P((KEYMAP *, char *, int));  static int       dobind         __P((KEYMAP *, char *, int));
 static char     *skipwhite      __P((char *));  static char     *skipwhite      __P((char *));
 static char     *parsetoken     __P((char *));  static char     *parsetoken     __P((char *));
Line 293 
Line 293 
 /*  /*
  * Fix references to a reallocated keymap (recursive).   * Fix references to a reallocated keymap (recursive).
  */   */
 static VOID  static void
 fixmap(curmap, mp, mt)  fixmap(curmap, mp, mt)
         KEYMAP *mt;          KEYMAP *mt;
         KEYMAP *curmap;          KEYMAP *curmap;
Line 346 
Line 346 
                                         return FALSE;                                          return FALSE;
                         }                          }
                 }                  }
                 (VOID)doscan(curmap, c = maclcur->l_text[s], NULL);                  (void)doscan(curmap, c = maclcur->l_text[s], NULL);
                 maclcur = maclcur->l_fp;                  maclcur = maclcur->l_fp;
         } else {          } else {
 #endif /* !NO_STARTUP */  #endif /* !NO_STARTUP */
 #endif /* !NO_MACRO */  #endif /* !NO_MACRO */
                 (VOID)strcpy(prompt, p);                  (void)strcpy(prompt, p);
                 pep = prompt + strlen(prompt);                  pep = prompt + strlen(prompt);
                 for (;;) {                  for (;;) {
                         ewprintf("%s", prompt);                          ewprintf("%s", prompt);
Line 417 
Line 417 
                         curmap = ele->k_prefmap;                          curmap = ele->k_prefmap;
                 }                  }
         }          }
         (VOID)doscan(curmap, c = *keys, NULL);          (void)doscan(curmap, c = *keys, NULL);
         return remap(curmap, c, funct, pref_map);          return remap(curmap, c, funct, pref_map);
 }  }
   
Line 506 
Line 506 
                 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, buf, FALSE);          return dobind(mp, buf, FALSE);
 }  }
   
Line 610 
Line 610 
         for (lp = lforw(bp->b_linep); lp != bp->b_linep; lp = lforw(lp)) {          for (lp = lforw(bp->b_linep); lp != bp->b_linep; lp = lforw(lp)) {
                 if (llength(lp) >= 128)                  if (llength(lp) >= 128)
                         return FALSE;                          return FALSE;
                 (VOID)strncpy(excbuf, ltext(lp), llength(lp));                  (void)strncpy(excbuf, ltext(lp), llength(lp));
   
                 /* make sure it's terminated */                  /* make sure it's terminated */
                 excbuf[llength(lp)] = '\0';                  excbuf[llength(lp)] = '\0';
Line 663 
Line 663 
                         break;                          break;
                 }                  }
         }          }
         (VOID)ffclose((BUFFER *)NULL);          (void)ffclose((BUFFER *)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;

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