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

Diff for /src/usr.bin/less/prompt.c between version 1.19 and 1.20

version 1.19, 2016/01/12 23:01:23 version 1.20, 2016/01/13 22:47:45
Line 120 
Line 120 
 {  {
         char buf[INT_STRLEN_BOUND(pos) + 2];          char buf[INT_STRLEN_BOUND(pos) + 2];
   
         postoa(pos, buf, sizeof buf);          postoa(pos, buf, sizeof(buf));
         ap_str(buf);          ap_str(buf);
 }  }
   
 /*  /*
  * Append a line number to the end of the message.  
  */  
 static void  
 ap_linenum(off_t linenum)  
 {  
         char buf[INT_STRLEN_BOUND(linenum) + 2];  
   
         linenumtoa(linenum, buf, sizeof buf);  
         ap_str(buf);  
 }  
   
 /*  
  * Append an integer to the end of the message.   * Append an integer to the end of the message.
  */   */
 static void  static void
Line 255 
Line 243 
         case 'd':       /* Current page number */          case 'd':       /* Current page number */
                 linenum = currline(where);                  linenum = currline(where);
                 if (linenum > 0 && sc_height > 1)                  if (linenum > 0 && sc_height > 1)
                         ap_linenum(PAGE_NUM(linenum));                          ap_pos(PAGE_NUM(linenum));
                 else                  else
                         ap_quest();                          ap_quest();
                 break;                  break;
Line 266 
Line 254 
                         ap_quest();                          ap_quest();
                 } else if (len == 0) {                  } else if (len == 0) {
                         /* An empty file has no pages. */                          /* An empty file has no pages. */
                         ap_linenum(0);                          ap_pos(0);
                 } else {                  } else {
                         linenum = find_linenum(len - 1);                          linenum = find_linenum(len - 1);
                         if (linenum <= 0)                          if (linenum <= 0)
                                 ap_quest();                                  ap_quest();
                         else                          else
                                 ap_linenum(PAGE_NUM(linenum));                                  ap_pos(PAGE_NUM(linenum));
                 }                  }
                 break;                  break;
         case 'E':       /* Editor name */          case 'E':       /* Editor name */
Line 293 
Line 281 
         case 'l':       /* Current line number */          case 'l':       /* Current line number */
                 linenum = currline(where);                  linenum = currline(where);
                 if (linenum != 0)                  if (linenum != 0)
                         ap_linenum(linenum);                          ap_pos(linenum);
                 else                  else
                         ap_quest();                          ap_quest();
                 break;                  break;
Line 303 
Line 291 
                     (linenum = find_linenum(len)) <= 0)                      (linenum = find_linenum(len)) <= 0)
                         ap_quest();                          ap_quest();
                 else                  else
                         ap_linenum(linenum-1);                          ap_pos(linenum-1);
                 break;                  break;
         case 'm':       /* Number of files */          case 'm':       /* Number of files */
                 n = ntags();                  n = ntags();

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20