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

Diff for /src/usr.bin/ssh/Attic/key.c between version 1.70 and 1.71

version 1.70, 2008/06/11 21:01:35 version 1.71, 2008/06/11 23:02:22
Line 326 
Line 326 
          */           */
         char    *augmentation_string = " .o+=*BOX@%&#/^";          char    *augmentation_string = " .o+=*BOX@%&#/^";
         char    *retval, *p;          char    *retval, *p;
         char     field[FLDSIZE_X][FLDSIZE_Y];          u_char   field[FLDSIZE_X][FLDSIZE_Y];
         u_int    i, b;          u_int    i, b;
         int      x, y;          int      x, y;
           size_t   len = strlen(augmentation_string);
   
         retval = xcalloc(1, (FLDSIZE_X + 3) * (FLDSIZE_Y + 2));          retval = xcalloc(1, (FLDSIZE_X + 3) * (FLDSIZE_Y + 2));
   
         /* initialize field */          /* initialize field */
         memset(field, ' ', FLDSIZE_X * FLDSIZE_Y * sizeof(char));          memset(field, 0, FLDSIZE_X * FLDSIZE_Y * sizeof(char));
         x = FLDSIZE_X / 2;          x = FLDSIZE_X / 2;
         y = FLDSIZE_Y / 2;          y = FLDSIZE_Y / 2;
         field[x][y] = '.';          field[x][y] = 1;
   
         /* process raw key */          /* process raw key */
         for (i = 0; i < dgst_raw_len; i++) {          for (i = 0; i < dgst_raw_len; i++) {
Line 355 
Line 356 
                         y = MIN(y, FLDSIZE_Y - 1);                          y = MIN(y, FLDSIZE_Y - 1);
   
                         /* augment the field */                          /* augment the field */
                         p = strchr(augmentation_string, field[x][y]);                          field[x][y]++;
                         if (*++p != '\0')  
                                 field[x][y] = *p;  
   
                         input = input >> 2;                          input = input >> 2;
                 }                  }
         }          }
Line 377 
Line 375 
         for (y = 0; y < FLDSIZE_Y; y++) {          for (y = 0; y < FLDSIZE_Y; y++) {
                 *p++ = '|';                  *p++ = '|';
                 for (x = 0; x < FLDSIZE_X; x++)                  for (x = 0; x < FLDSIZE_X; x++)
                         *p++ = field[x][y];                          *p++ = augmentation_string[MIN(field[x][y], len - 1)];
                 *p++ = '|';                  *p++ = '|';
                 *p++ = '\n';                  *p++ = '\n';
         }          }

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71