X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Fbase%2Fresizeterm.c;h=b25cf908133d55322cca2f9dc71c2ac82b0eec7a;hb=214f159cd8c0ea4fba47beb249379d0da2dfb8ca;hp=0ee30065fc799e633b8c1e7c722599a733defc7d;hpb=9eb6f4991977566a493a5b1c36de2299f2754449;p=ncurses.git diff --git a/ncurses/base/resizeterm.c b/ncurses/base/resizeterm.c index 0ee30065..b25cf908 100644 --- a/ncurses/base/resizeterm.c +++ b/ncurses/base/resizeterm.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. * + * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 1998-2015,2016 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 * @@ -45,7 +46,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: resizeterm.c,v 1.48 2015/10/10 19:47:25 tom Exp $") +MODULE_ID("$Id: resizeterm.c,v 1.52 2021/10/23 17:12:33 tom Exp $") /* * If we're trying to be reentrant, do not want any local statics. @@ -146,9 +147,10 @@ static int ripped_bottom(WINDOW *win) { int result = 0; - ripoff_t *rop; if (win != 0) { + ripoff_t *rop; + #ifdef USE_SP_RIPOFF SCREEN *sp = _nc_screen_of(win); #endif @@ -208,7 +210,7 @@ parent_depth(WINDOW *cmp) } /* - * FIXME: must adjust position so it's within the parent! + * FIXME: must adjust position so it is within the parent! */ static int adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS) @@ -291,7 +293,7 @@ decrease_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS) for (each_window(SP_PARM, wp)) { WINDOW *win = &(wp->win); - if (!(win->_flags & _ISPAD)) { + if (!IS_PAD(win)) { if (child_depth(win) == depth) { found = TRUE; if (adjust_window(win, ToLines, ToCols, @@ -326,7 +328,7 @@ increase_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS) for (each_window(SP_PARM, wp)) { WINDOW *win = &(wp->win); - if (!(win->_flags & _ISPAD)) { + if (!IS_PAD(win)) { if (parent_depth(win) == depth) { found = TRUE; if (adjust_window(win, ToLines, ToCols, @@ -448,7 +450,7 @@ NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols) NCURSES_EXPORT(int) resize_term(int ToLines, int ToCols) { - int res = ERR; + int res; _nc_sp_lock_global(curses); res = NCURSES_SP_NAME(resize_term) (CURRENT_SCREEN, ToLines, ToCols); _nc_sp_unlock_global(curses);