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

Diff for /src/usr.bin/less/output.c between version 1.12 and 1.13

version 1.12, 2015/11/06 15:50:33 version 1.13, 2015/11/13 16:48:48
Line 76 
Line 76 
  * overwritten or scrolled away.   * overwritten or scrolled away.
  */   */
 void  void
 flush(void)  flush(int ignore_errors)
 {  {
         int n;          int n;
         int fd;          int fd;
Line 89 
Line 89 
         fd = (any_display) ? STDOUT_FILENO : STDERR_FILENO;          fd = (any_display) ? STDOUT_FILENO : STDERR_FILENO;
         nwritten = write(fd, obuf, n);          nwritten = write(fd, obuf, n);
         if (nwritten != n) {          if (nwritten != n) {
                 if (nwritten == -1)                  if (nwritten == -1 && !ignore_errors)
                         quit(QUIT_ERROR);                          quit(QUIT_ERROR);
                 screen_trashed = 1;                  screen_trashed = 1;
         }          }
Line 111 
Line 111 
          * when we are still one char from the end of obuf.           * when we are still one char from the end of obuf.
          */           */
         if (ob >= &obuf[sizeof (obuf)-1])          if (ob >= &obuf[sizeof (obuf)-1])
                 flush();                  flush(0);
         *ob++ = (char)c;          *ob++ = (char)c;
         return (c);          return (c);
 }  }
Line 277 
Line 277 
                  */                   */
                 screen_trashed = 1;                  screen_trashed = 1;
   
         flush();          flush(0);
 }  }
   
 static char intr_to_abort[] = "... (interrupt to abort)";  static char intr_to_abort[] = "... (interrupt to abort)";
Line 297 
Line 297 
         (void) less_printf(fmt, parg);          (void) less_printf(fmt, parg);
         putstr(intr_to_abort);          putstr(intr_to_abort);
         at_exit();          at_exit();
         flush();          flush(0);
         need_clr = 1;          need_clr = 1;
 }  }
   
Line 325 
Line 325 
         lower_left();          lower_left();
         if (col >= sc_width)          if (col >= sc_width)
                 screen_trashed = 1;                  screen_trashed = 1;
         flush();          flush(0);
   
         return (c);          return (c);
 }  }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13