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

Diff for /src/usr.bin/less/signal.c between version 1.6 and 1.7

version 1.6, 2003/06/18 18:40:09 version 1.7, 2011/09/16 18:12:09
Line 1 
Line 1 
 /*  /*
  * Copyright (C) 1984-2002  Mark Nudelman   * Copyright (C) 1984-2011  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.
Line 30 
Line 30 
 extern int lnloop;  extern int lnloop;
 extern int linenums;  extern int linenums;
 extern int wscroll;  extern int wscroll;
   extern int quit_on_intr;
   extern long jump_sline_fraction;
   
 /*  /*
  * Interrupt signal handler.   * Interrupt signal handler.
Line 39 
Line 41 
 u_interrupt(type)  u_interrupt(type)
         int type;          int type;
 {  {
           bell();
 #if OS2  #if OS2
         LSIGNAL(SIGINT, SIG_ACK);          LSIGNAL(SIGINT, SIG_ACK);
 #endif  #endif
Line 137 
Line 140 
 #endif  #endif
 #ifdef SIGWINCH  #ifdef SIGWINCH
                 (void) LSIGNAL(SIGWINCH, winch);                  (void) LSIGNAL(SIGWINCH, winch);
 #else  #endif
 #ifdef SIGWIND  #ifdef SIGWIND
                 (void) LSIGNAL(SIGWIND, winch);                  (void) LSIGNAL(SIGWIND, winch);
 #endif  #endif
 #ifdef SIGQUIT  #ifdef SIGQUIT
                 (void) LSIGNAL(SIGQUIT, SIG_IGN);                  (void) LSIGNAL(SIGQUIT, SIG_IGN);
 #endif  #endif
 #endif  
         } else          } else
         {          {
                 /*                  /*
Line 226 
Line 228 
                 if (sc_width != old_width || sc_height != old_height)                  if (sc_width != old_width || sc_height != old_height)
                 {                  {
                         wscroll = (sc_height + 1) / 2;                          wscroll = (sc_height + 1) / 2;
                           calc_jump_sline();
                           calc_shift_count();
                         screen_trashed = 1;                          screen_trashed = 1;
                 }                  }
         }          }
 #endif  #endif
         if (tsignals & S_INTERRUPT)          if (tsignals & S_INTERRUPT)
         {          {
                 bell();                  if (quit_on_intr)
                 /*                          quit(QUIT_INTERRUPT);
                  * {{ You may wish to replace the bell() with  
                  *    error("Interrupt", NULL_PARG); }}  
                  */  
   
                 /*  
                  * If we were interrupted while in the "calculating  
                  * line numbers" loop, turn off line numbers.  
                  */  
                 if (lnloop)  
                 {  
                         lnloop = 0;  
                         if (linenums == OPT_ONPLUS)  
                                 screen_trashed = 1;  
                         linenums = 0;  
                         error("Line numbers turned off", NULL_PARG);  
                 }  
   
         }          }
 }  }
   

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7