X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_scale.c;h=068a1cc8c53893e3b599d3a048245090a21a9e01;hp=608afe6acf3d1ccca2f79132ab0b960bbea72655;hb=93ed44d781ca36f55021e0ad55f1ce33de62f7ba;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1;ds=inline diff --git a/menu/m_scale.c b/menu/m_scale.c index 608afe6a..068a1cc8 100644 --- a/menu/m_scale.c +++ b/menu/m_scale.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 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 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_scale.c,v 1.2 1998/02/11 12:13:50 tom Exp $") +MODULE_ID("$Id: m_scale.c,v 1.10 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -50,11 +50,17 @@ MODULE_ID("$Id: m_scale.c,v 1.2 1998/02/11 12:13:50 tom 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) +NCURSES_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 +70,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 */ -