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

Diff for /src/usr.bin/less/screen.c between version 1.1 and 1.2

version 1.1, 1996/09/21 05:39:41 version 1.2, 1996/09/21 06:06:42
Line 136 
Line 136 
 extern int back_scroll;  extern int back_scroll;
 extern int swindow;  extern int swindow;
 extern int no_init;  extern int no_init;
   extern int quit_at_eof;
   extern int more_mode;
 #if HILITE_SEARCH  #if HILITE_SEARCH
 extern int hilite_search;  extern int hilite_search;
 #endif  #endif
Line 412 
Line 414 
 {  {
         PARG parg;          PARG parg;
   
         if (know_dumb)          if (know_dumb || more_mode)
                 /*                  /*
                  * User knows this is a dumb terminal, so don't tell him.                   * User knows this is a dumb terminal, so don't tell him.
                    * more doesn't complain about these, either.
                  */                   */
                 return;                  return;
   
Line 755 
Line 758 
         if (sc_e_keypad == NULL)          if (sc_e_keypad == NULL)
                 sc_e_keypad = "";                  sc_e_keypad = "";
   
         sc_init = tgetstr("ti", &sp);          /*
            * This loses for terminals with termcap entries with ti/te strings
            * that switch to/from an alternate screen, and we're in quit_at_eof
            * (eg, more(1)).
            */
           if (!quit_at_eof && !more_mode) {
                   sc_init = tgetstr("ti", &sp);
                   sc_deinit = tgetstr("te", &sp);
           }
         if (sc_init == NULL)          if (sc_init == NULL)
                 sc_init = "";                  sc_init = "";
   
         sc_deinit= tgetstr("te", &sp);  
         if (sc_deinit == NULL)          if (sc_deinit == NULL)
                 sc_deinit = "";                  sc_deinit = "";
   
Line 982 
Line 991 
         if (no_init)          if (no_init)
                 return;                  return;
         tputs(sc_init, sc_height, putchr);          tputs(sc_init, sc_height, putchr);
   #if 0
         tputs(sc_s_keypad, sc_height, putchr);          tputs(sc_s_keypad, sc_height, putchr);
   #endif
         init_done = 1;          init_done = 1;
 }  }
   
Line 996 
Line 1007 
                 return;                  return;
         if (!init_done)          if (!init_done)
                 return;                  return;
   #if 0
         tputs(sc_e_keypad, sc_height, putchr);          tputs(sc_e_keypad, sc_height, putchr);
   #endif
         tputs(sc_deinit, sc_height, putchr);          tputs(sc_deinit, sc_height, putchr);
         init_done = 0;          init_done = 0;
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2