1: #ifndef lint
   2: static char sccsid[] = "@(#)wwdelline.c	3.7 4/24/85";
   3: #endif
   4: 
   5: /*
   6:  * Copyright (c) 1983 Regents of the University of California,
   7:  * All rights reserved.  Redistribution permitted subject to
   8:  * the terms of the Berkeley Software License Agreement.
   9:  */
  10: 
  11: #include "ww.h"
  12: 
  13: wwdelline(w, row)
  14: register struct ww *w;
  15: int row;
  16: {
  17:     register i;
  18:     register union ww_char **cpp, **cqq;
  19:     register union ww_char *cp;
  20:     int row1, row2;
  21:     char deleted;
  22:     int visible;
  23: 
  24:     /*
  25: 	 * Scroll first.
  26: 	 */
  27:     if ((row1 = row) < w->ww_i.t) {
  28:         row1 = w->ww_i.t;
  29:     }
  30:     if ((row2 = w->ww_b.b) > w->ww_i.b) {
  31:         row2 = w->ww_i.b;
  32:         visible = 0;
  33:     } else
  34:         visible = 1;
  35:     deleted = wwscroll1(w, row1, row2, 1, visible);
  36: 
  37:     /*
  38: 	 * Fix the buffer.
  39: 	 * But leave clearing the last line for wwclreol().
  40: 	 */
  41:     cpp = &w->ww_buf[row];
  42:     cqq = cpp + 1;
  43:     cp = *cpp;
  44:     for (i = w->ww_b.b - row; --i > 0;)
  45:         *cpp++ = *cqq++;
  46:     *cpp = cp;
  47: 
  48:     /*
  49: 	 * Now clear the last line.
  50: 	 */
  51:     if (visible)
  52:         wwclreol1(w, w->ww_b.b - 1, w->ww_b.l, deleted);
  53:     else
  54:         for (i = w->ww_b.nc; --i >= 0;)
  55:             cp++->c_w = ' ';
  56: }

Defined functions

wwdelline defined in line 13; used 2 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1987-02-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 687
Valid CSS Valid XHTML 1.0 Strict