X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_scale.c;h=3021b3e288af992ca2f13e398774e9e0c91602b2;hp=04110defa02476ea08841689fc0c3c735b7e3abd;hb=d6c65d287166c3105ece4a5e3f3ec7af5a5f26a3;hpb=a8987e73ec254703634802b4f7ee30d3a485524d diff --git a/menu/m_scale.c b/menu/m_scale.c index 04110def..3021b3e2 100644 --- a/menu/m_scale.c +++ b/menu/m_scale.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2004,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 * @@ -37,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_scale.c,v 1.7 2003/10/25 14:54:48 tom Exp $") +MODULE_ID("$Id: m_scale.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -50,12 +51,17 @@ MODULE_ID("$Id: m_scale.c,v 1.7 2003/10/25 14:54:48 tom Exp $") | E_BAD_ARGUMENT - invalid menu pointer | E_NOT_CONNECTED - no items are connected to menu +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) -scale_menu (const MENU *menu, int *rows, int *cols) +MENU_EXPORT(int) +scale_menu(const MENU * menu, int *rows, int *cols) { - if (!menu) - RETURN( E_BAD_ARGUMENT ); - + T((T_CALLED("scale_menu(%p,%p,%p)"), + (const void *)menu, + (void *)rows, + (void *)cols)); + + if (!menu) + RETURN(E_BAD_ARGUMENT); + if (menu->items && *(menu->items)) { if (rows) @@ -65,8 +71,7 @@ scale_menu (const MENU *menu, int *rows, int *cols) RETURN(E_OK); } else - RETURN( E_NOT_CONNECTED ); + RETURN(E_NOT_CONNECTED); } /* m_scale.c ends here */ -