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

« back to all changes in this revision

Viewing changes to ncurses/base/lib_pad.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-11-05 21:34:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20081105213400-7d9r3jj2ngz18k24
Tags: 5.7-1
* Merging upstream version 5.7.
* Updating soname and sodepver to 5.7 in rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/****************************************************************************
2
 
 * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
 
2
 * Copyright (c) 1998-2004,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            *
29
29
/****************************************************************************
30
30
 *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
31
31
 *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
32
 
 *     and: Thomas E. Dickey                        1996-on                 *
33
 
 *     and: Juergen Pfeifer                         2009                    *
34
32
 ****************************************************************************/
35
33
 
36
34
/*
42
40
 
43
41
#include <curses.priv.h>
44
42
 
45
 
MODULE_ID("$Id: lib_pad.c,v 1.43 2009/04/18 18:25:37 tom Exp $")
 
43
MODULE_ID("$Id: lib_pad.c,v 1.41 2006/10/14 20:47:13 tom Exp $")
46
44
 
47
45
NCURSES_EXPORT(WINDOW *)
48
 
NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c)
 
46
newpad(int l, int c)
49
47
{
50
48
    WINDOW *win;
51
49
    NCURSES_CH_T *ptr;
72
70
    returnWin(win);
73
71
}
74
72
 
75
 
#if NCURSES_SP_FUNCS
76
 
NCURSES_EXPORT(WINDOW *)
77
 
newpad(int l, int c)
78
 
{
79
 
    return NCURSES_SP_NAME(newpad) (CURRENT_SCREEN, l, c);
80
 
}
81
 
#endif
82
 
 
83
73
NCURSES_EXPORT(WINDOW *)
84
74
subpad(WINDOW *orig, int l, int c, int begy, int begx)
85
75
{
172
162
        pmaxcol = pmincol + smaxcol - smincol;
173
163
    }
174
164
 
175
 
    if (smaxrow >= screen_lines(CURRENT_SCREEN)
176
 
        || smaxcol >= screen_columns(CURRENT_SCREEN)
 
165
    if (smaxrow >= screen_lines
 
166
        || smaxcol >= screen_columns
177
167
        || sminrow > smaxrow
178
168
        || smincol > smaxcol)
179
169
        returnCode(ERR);