1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)id_subwins.c	5.1 (Berkeley) 6/7/85";
   9: #endif not lint
  10: 
  11: # include   "curses.ext"
  12: 
  13: /*
  14:  * _id_subwins:
  15:  *	Re-sync the pointers to _y for all the subwindows.
  16:  *
  17:  */
  18: _id_subwins(orig)
  19: register WINDOW *orig;
  20: {
  21:     register WINDOW *win;
  22:     register int    realy;
  23:     register int    y, oy, x;
  24: 
  25:     realy = orig->_begy + orig->_cury;
  26:     for (win = orig->_nextp; win != orig; win = win->_nextp) {
  27:         /*
  28: 		 * If the window ends before our current position,
  29: 		 * don't need to do anything.
  30: 		 */
  31:         if (win->_begy + win->_maxy <= realy)
  32:             continue;
  33: 
  34:         oy = orig->_cury;
  35:         for (y = realy - win->_begy; y < win->_maxy; y++, oy++)
  36:             win->_y[y] = &orig->_y[oy][win->_ch_off];
  37:     }
  38: }

Defined functions

Defined variables

sccsid defined in line 8; never used
Last modified: 1985-06-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 682
Valid CSS Valid XHTML 1.0 Strict