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: #if !defined(lint) && !defined(NOSCCS)
   8: static char sccsid[] = "@(#)mvwin.c	5.1 (Berkeley) 6/7/85";
   9: #endif
  10: 
  11: # include   "curses.ext"
  12: 
  13: /*
  14:  * relocate the starting position of a window
  15:  *
  16:  */
  17: 
  18: mvwin(win, by, bx)
  19: reg WINDOW  *win;
  20: reg int     by, bx; {
  21: 
  22:     register WINDOW *orig;
  23:     register int    dy, dx;
  24: 
  25:     if (by + win->_maxy > LINES || bx + win->_maxx > COLS)
  26:         return ERR;
  27:     dy = by - win->_begy;
  28:     dx = bx - win->_begx;
  29:     orig = win->_orig;
  30:     if (orig == NULL) {
  31:         orig = win;
  32:         do {
  33:             win->_begy += dy;
  34:             win->_begx += dx;
  35:             _swflags_(win);
  36:             win = win->_nextp;
  37:         } while (win != orig);
  38:     }
  39:     else {
  40:         if (by < orig->_begy || win->_maxy + dy > orig->_maxy)
  41:             return ERR;
  42:         if (bx < orig->_begx || win->_maxx + dx > orig->_maxx)
  43:             return ERR;
  44:         win->_begy = by;
  45:         win->_begx = bx;
  46:         _swflags_(win);
  47:         _set_subwin_(orig, win);
  48:     }
  49:     touchwin(win);
  50:     return OK;
  51: }

Defined functions

mvwin defined in line 18; never used

Defined variables

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