diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-12 23:22:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-12 23:22:15 +0000 |
commit | 6ee254699bf787d78835419be2b3241fb037d444 (patch) | |
tree | 07fe67dab517e4990f344fe2c00e65cef4d25b81 /lib/libmenu/m_win.c | |
parent | 0b62f5dc36fc7203a74cdc812c4234ae188fdfd2 (diff) |
Update to ncurses 5.7, with local changes reapplied.
This is around eight years worth of changes (previously we were around ncurses
5.2), too many to list - many bug fixes and also a few new functions.
A major bump for libcurses, libpanel, libform and libmenu.
ok deraadt
Diffstat (limited to 'lib/libmenu/m_win.c')
-rw-r--r-- | lib/libmenu/m_win.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/libmenu/m_win.c b/lib/libmenu/m_win.c index 988e9695f18..369a922214f 100644 --- a/lib/libmenu/m_win.c +++ b/lib/libmenu/m_win.c @@ -1,7 +1,7 @@ -/* $OpenBSD: m_win.c,v 1.6 2001/01/22 18:02:06 millert Exp $ */ +/* $OpenBSD: m_win.c,v 1.7 2010/01/12 23:22:08 nicm Exp $ */ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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,7 +29,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -39,7 +39,7 @@ #include "menu.priv.h" -MODULE_ID("$From: m_win.c,v 1.10 2000/12/10 02:16:48 tom Exp $") +MODULE_ID("$Id: m_win.c,v 1.7 2010/01/12 23:22:08 nicm Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -51,18 +51,20 @@ MODULE_ID("$From: m_win.c,v 1.10 2000/12/10 02:16:48 tom Exp $") | E_POSTED - menu is already posted +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -set_menu_win (MENU *menu, WINDOW *win) +set_menu_win(MENU * menu, WINDOW *win) { + T((T_CALLED("set_menu_win(%p,%p)"), menu, win)); + if (menu) { - if ( menu->status & _POSTED ) + if (menu->status & _POSTED) RETURN(E_POSTED); menu->userwin = win; _nc_Calculate_Item_Length_and_Width(menu); } else _nc_Default_Menu.userwin = win; - + RETURN(E_OK); } @@ -75,10 +77,12 @@ set_menu_win (MENU *menu, WINDOW *win) | Return Values : NULL on error, otherwise pointer to window +--------------------------------------------------------------------------*/ NCURSES_EXPORT(WINDOW *) -menu_win (const MENU *menu) +menu_win(const MENU * menu) { - const MENU* m = Normalize_Menu(menu); - return (m->userwin ? m->userwin : stdscr); + const MENU *m = Normalize_Menu(menu); + + T((T_CALLED("menu_win(%p)"), menu)); + returnWin(m->userwin ? m->userwin : stdscr); } /* m_win.c ends here */ |