X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_pad.c;h=43d9ed7e33691e8fedf48b90cf1b6748cc04e09e;hp=6cad9c54b06409e1d9c68616b5d3b5b35a0709ff;hb=37babca07fea18b480155ef60ef302ca09fca152;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/ncurses/base/lib_pad.c b/ncurses/base/lib_pad.c index 6cad9c54..43d9ed7e 100644 --- a/ncurses/base/lib_pad.c +++ b/ncurses/base/lib_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,6 +29,8 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * + * and: Juergen Pfeifer 2009 * ****************************************************************************/ /* @@ -40,10 +42,10 @@ #include -MODULE_ID("$Id: lib_pad.c,v 1.41 2006/10/14 20:47:13 tom Exp $") +MODULE_ID("$Id: lib_pad.c,v 1.43 2009/04/18 18:25:37 tom Exp $") NCURSES_EXPORT(WINDOW *) -newpad(int l, int c) +NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c) { WINDOW *win; NCURSES_CH_T *ptr; @@ -70,6 +72,14 @@ newpad(int l, int c) returnWin(win); } +#if NCURSES_SP_FUNCS +NCURSES_EXPORT(WINDOW *) +newpad(int l, int c) +{ + return NCURSES_SP_NAME(newpad) (CURRENT_SCREEN, l, c); +} +#endif + NCURSES_EXPORT(WINDOW *) subpad(WINDOW *orig, int l, int c, int begy, int begx) { @@ -162,8 +172,8 @@ pnoutrefresh(WINDOW *win, pmaxcol = pmincol + smaxcol - smincol; } - if (smaxrow >= screen_lines - || smaxcol >= screen_columns + if (smaxrow >= screen_lines(CURRENT_SCREEN) + || smaxcol >= screen_columns(CURRENT_SCREEN) || sminrow > smaxrow || smincol > smaxcol) returnCode(ERR);