X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_scale.c;h=0067ae76a1c9acfa6d9f465c04f0e5e7332713ce;hp=d6f964bff66238941f6c3b4da9afa78eeed3caf2;hb=bec710451bd1f286840c4e7e18fc646bd63adeba;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/menu/m_scale.c b/menu/m_scale.c index d6f964bf..0067ae76 100644 --- a/menu/m_scale.c +++ b/menu/m_scale.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998 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 * @@ -27,7 +28,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -37,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_scale.c,v 1.4 1999/05/16 17:28:00 juergen Exp $") +MODULE_ID("$Id: m_scale.c,v 1.13 2020/12/12 00:38:14 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -50,11 +51,17 @@ MODULE_ID("$Id: m_scale.c,v 1.4 1999/05/16 17:28:00 juergen Exp $") | E_BAD_ARGUMENT - invalid menu pointer | E_NOT_CONNECTED - no items are connected to menu +--------------------------------------------------------------------------*/ -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) @@ -64,8 +71,7 @@ int 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 */ -