~ubuntu-branches/debian/sid/ncurses/sid-200908151543

« back to all changes in this revision

Viewing changes to ncurses/base/lib_mvwin.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-12-14 21:06:00 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081214210600-2rdjwvpplgvh3zeb
Tags: 5.7+20081213-1
MergingĀ upstreamĀ versionĀ 5.7+20081213.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
3
3
 *                                                                          *
4
4
 * Permission is hereby granted, free of charge, to any person obtaining a  *
5
5
 * copy of this software and associated documentation files (the            *
40
40
 
41
41
#include <curses.priv.h>
42
42
 
43
 
MODULE_ID("$Id: lib_mvwin.c,v 1.12 2001/12/19 01:06:22 tom Exp $")
 
43
MODULE_ID("$Id: lib_mvwin.c,v 1.14 2006/02/25 22:53:46 tom Exp $")
44
44
 
45
45
NCURSES_EXPORT(int)
46
46
mvwin(WINDOW *win, int by, int bx)
50
50
    if (!win || (win->_flags & _ISPAD))
51
51
        returnCode(ERR);
52
52
 
 
53
    /*
 
54
     * mvwin() should only modify the indices.  See test/demo_menus.c and
 
55
     * test/movewindow.c for examples.
 
56
     */
 
57
#if 0
53
58
    /* Copying subwindows is allowed, but it is expensive... */
54
59
    if (win->_flags & _SUBWIN) {
55
60
        int err = ERR;
89
94
        }
90
95
        returnCode(err);
91
96
    }
 
97
#endif
92
98
 
93
99
    if (by + win->_maxy > screen_lines - 1
94
100
        || bx + win->_maxx > screen_columns - 1