[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.1.1.3 and 1.1.1.4

version 1.1.1.3, 2011/09/16 17:47:07 version 1.1.1.4, 2014/04/25 13:33:50
Line 1 
Line 1 
 /*  /*
  * Copyright (C) 1984-2011  Mark Nudelman   * Copyright (C) 1984-2012  Mark Nudelman
  *   *
  * You may distribute under the terms of either the GNU General Public   * You may distribute under the terms of either the GNU General Public
  * License or the Less License, as specified in the README file.   * License or the Less License, as specified in the README file.
  *   *
  * For more information about less, or for information on how to   * For more information, see the README file.
  * contact the author, see the README file.  
  */   */
   
   
Line 43 
Line 42 
 static constant char s_proto[] =  static constant char s_proto[] =
   "?n?f%f .?m(%T %i of %m) ..?e(END) ?x- Next\\: %x..%t";    "?n?f%f .?m(%T %i of %m) ..?e(END) ?x- Next\\: %x..%t";
 static constant char m_proto[] =  static constant char m_proto[] =
   "?n?f%f .?m(%T %i of %m) ..?e(END) ?x- Next\\: %x.:?pB%pB\\%:byte %bB?s/%s...%t";    "?f%f .?m(%T %i of %m) .?e(END) ?x- Next\\: %x.:?pB%pB\\%:byte %bB?s/%s...%t";
 static constant char M_proto[] =  static constant char M_proto[] =
   "?f%f .?n?m(%T %i of %m) ..?ltlines %lt-%lb?L/%L. :byte %bB?s/%s. .?e(END) ?x- Next\\: %x.:?pB%pB\\%..%t";    "?f%f .?n?m(%T %i of %m) ..?ltlines %lt-%lb?L/%L. :byte %bB?s/%s. .?e(END) ?x- Next\\: %x.:?pB%pB\\%..%t";
 static constant char e_proto[] =  static constant char e_proto[] =
Line 52 
Line 51 
   "HELP -- ?eEND -- Press g to see it again:Press RETURN for more., or q when done";    "HELP -- ?eEND -- Press g to see it again:Press RETURN for more., or q when done";
 static constant char w_proto[] =  static constant char w_proto[] =
   "Waiting for data";    "Waiting for data";
 static constant char more_proto[] =  
   "--More--(?eEND ?x- Next\\: %x.:?pB%pB\\%:byte %bB?s/%s...%t)";  
   
 public char *prproto[3];  public char *prproto[3];
 public char constant *eqproto = e_proto;  public char constant *eqproto = e_proto;
Line 70 
Line 67 
 init_prompt()  init_prompt()
 {  {
         prproto[0] = save(s_proto);          prproto[0] = save(s_proto);
         prproto[1] = save(less_is_more ? more_proto : m_proto);          prproto[1] = save(m_proto);
         prproto[2] = save(M_proto);          prproto[2] = save(M_proto);
         eqproto = save(e_proto);          eqproto = save(e_proto);
         hproto = save(h_proto);          hproto = save(h_proto);
Line 117 
Line 114 
 {  {
         char buf[INT_STRLEN_BOUND(pos) + 2];          char buf[INT_STRLEN_BOUND(pos) + 2];
   
         postoa(pos, buf);          postoa(pos, buf, sizeof(buf));
         ap_str(buf);          ap_str(buf);
 }  }
   
Line 130 
Line 127 
 {  {
         char buf[INT_STRLEN_BOUND(linenum) + 2];          char buf[INT_STRLEN_BOUND(linenum) + 2];
   
         linenumtoa(linenum, buf);          linenumtoa(linenum, buf, sizeof(buf));
         ap_str(buf);          ap_str(buf);
 }  }
   
Line 143 
Line 140 
 {  {
         char buf[INT_STRLEN_BOUND(num) + 2];          char buf[INT_STRLEN_BOUND(num) + 2];
   
         inttoa(num, buf);          inttoa(num, buf, sizeof(buf));
         ap_str(buf);          ap_str(buf);
 }  }
   
Line 393 
Line 390 
  * where to resume parsing the string.   * where to resume parsing the string.
  * We must keep track of nested IFs and skip them properly.   * We must keep track of nested IFs and skip them properly.
  */   */
         static char *          static constant char *
 skipcond(p)  skipcond(p)
         register char *p;          register constant char *p;
 {  {
         register int iflevel;          register int iflevel;
   
Line 451 
Line 448 
 /*  /*
  * Decode a char that represents a position on the screen.   * Decode a char that represents a position on the screen.
  */   */
         static char *          static constant char *
 wherechar(p, wp)  wherechar(p, wp)
         char *p;          char constant *p;
         int *wp;          int *wp;
 {  {
         switch (*p)          switch (*p)
Line 477 
Line 474 
  */   */
         public char *          public char *
 pr_expand(proto, maxwidth)  pr_expand(proto, maxwidth)
         char *proto;          constant char *proto;
         int maxwidth;          int maxwidth;
 {  {
         register char *p;          register constant char *p;
         register int c;          register int c;
         int where;          int where;
   

Legend:
Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4