X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=panel%2Fp_move.c;h=7ff6fa7e817989db0a06ba27b04a59dfc202c8e6;hp=d7dbd2eafc3f04e66db9168a44a8dce12a16ad40;hb=ee8861cb4901d33fef9ad228b55a60ca4950e79c;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/panel/p_move.c b/panel/p_move.c index d7dbd2ea..7ff6fa7e 100644 --- a/panel/p_move.c +++ b/panel/p_move.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2008,2010 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 +30,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1995 * * and: Eric S. Raymond * + * and: Juergen Pfeifer 1997-1999,2009 * ****************************************************************************/ /* p_move.c @@ -36,21 +38,24 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_move.c,v 1.7 2001/02/24 23:41:35 tom Exp $") +MODULE_ID("$Id: p_move.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) -move_panel (PANEL *pan, int starty, int startx) +PANEL_EXPORT(int) +move_panel(PANEL * pan, int starty, int startx) { - if(!pan) - return(ERR); + int rc = ERR; - if (IS_LINKED(pan)) { - Touchpan(pan); - PANEL_UPDATE(pan,(PANEL*)0); - } + T((T_CALLED("move_panel(%p,%d,%d)"), (void *)pan, starty, startx)); - if (mvwin(pan->win,starty,startx)) - return(ERR); - - return(OK); + if (pan) + { + GetHook(pan); + if (IS_LINKED(pan)) + { + Touchpan(pan); + PANEL_UPDATE(pan, (PANEL *) 0); + } + rc = mvwin(pan->win, starty, startx); + } + returnCode(rc); }