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

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

version 1.9, 2001/05/23 23:29:48 version 1.10, 2001/05/24 03:05:23
Line 66 
Line 66 
   
 void  void
 ungetkey(c)  ungetkey(c)
         int     c;          int     c;
 {  {
 #ifdef DO_METAKEY  #ifdef DO_METAKEY
         if (use_metakey && pushed && c == CCHR('['))          if (use_metakey && pushed && c == CCHR('['))
Line 133 
Line 133 
  */   */
 PF  PF
 doscan(map, c, newmap)  doscan(map, c, newmap)
         KEYMAP *map;          KEYMAP  *map;
         int     c;          int     c;
         KEYMAP **newmap;          KEYMAP  **newmap;
 {  {
         MAP_ELEMENT     *elec = &map->map_element[0];          MAP_ELEMENT     *elec = &map->map_element[0];
         MAP_ELEMENT     *last = &map->map_element[map->map_num];          MAP_ELEMENT     *last = &map->map_element[map->map_num];
Line 192 
Line 192 
                         c = TOLOWER(key.k_chars[key.k_count - 1]);                          c = TOLOWER(key.k_chars[key.k_count - 1]);
                         curmap = curbp->b_modes[mode]->p_map;                          curmap = curbp->b_modes[mode]->p_map;
                         for (i = 0; i < key.k_count - 1; i++) {                          for (i = 0; i < key.k_count - 1; i++) {
                                 if ((fp = doscan(curmap, (key.k_chars[i]), &curmap))                                  if ((fp = doscan(curmap, (key.k_chars[i]), &curmap))
                                     != NULL)                                      != NULL)
                                         break;                                          break;
                         }                          }
Line 205 
Line 205 
                                 if (fp != rescan) {                                  if (fp != rescan) {
 #ifndef NO_MACRO  #ifndef NO_MACRO
                                         if (macrodef && macrocount <= MAXMACRO)                                          if (macrodef && macrocount <= MAXMACRO)
                                                 macro[macrocount - 1].m_funct                                                  macro[macrocount - 1].m_funct
                                                     = fp;                                                      = fp;
 #endif /* !NO_MACRO */  #endif /* !NO_MACRO */
                                         return (*fp)(f, n);                                          return (*fp)(f, n);
Line 221 
Line 221 
                                 break;                                  break;
                 }                  }
                 if (fp == NULL) {                  if (fp == NULL) {
                         while ((fp = doscan(curmap, key.k_chars[i++] =                          while ((fp = doscan(curmap, key.k_chars[i++] =
                             getkey(TRUE), &curmap)) == NULL)                              getkey(TRUE), &curmap)) == NULL)
                                 /*nothing*/;                                  /*nothing*/;
                         key.k_count = i;                          key.k_count = i;
Line 242 
Line 242 
 {  {
         KEYMAP  *curmap;          KEYMAP  *curmap;
         PF       funct;          PF       funct;
         int      c;          int      c;
         int      nn = 4;          int      nn = 4;
   
         if (f & FFUNIV)          if (f & FFUNIV)
Line 381 
Line 381 
                                 lp->l_fp = maclcur->l_fp;                                  lp->l_fp = maclcur->l_fp;
                                 lp->l_bp = maclcur->l_bp;                                  lp->l_bp = maclcur->l_bp;
                                 lp->l_fp->l_bp = lp->l_bp->l_fp = lp;                                  lp->l_fp->l_bp = lp->l_bp->l_fp = lp;
                                 bcopy(maclcur->l_text, lp->l_text,                                  bcopy(maclcur->l_text, lp->l_text,
                                     maclcur->l_used);                                      maclcur->l_used);
                                 for (count = maclcur->l_used;                                  for (count = maclcur->l_used;
                                     count < lp->l_used; count++)                                      count < lp->l_used; count++)
                                         lp->l_text[count] = c;                                          lp->l_text[count] = c;
                                 free((char *)maclcur);                                  free((char *)maclcur);

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