X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_pad.c;h=76083ba36d3468a3554bf007f6ba5022151312ad;hp=2235a4842285988fc48d3a1cd4e3b9d6491fc270;hb=3faafb2efcc426a48649c12943d5006cae12cff1;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/menu/m_pad.c b/menu/m_pad.c index 2235a484..76083ba3 100644 --- a/menu/m_pad.c +++ b/menu/m_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 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 * @@ -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_pad.c,v 1.2 1998/02/11 12:13:50 tom Exp $") +MODULE_ID("$Id: m_pad.c,v 1.10 2004/12/25 21:40:58 tom Exp $") /* Macro to redraw menu if it is posted and changed */ #define Refresh_Menu(menu) \ @@ -58,18 +58,21 @@ MODULE_ID("$Id: m_pad.c,v 1.2 1998/02/11 12:13:50 tom Exp $") | Return Values : E_OK - success | E_BAD_ARGUMENT - an invalid value has been passed +--------------------------------------------------------------------------*/ -int set_menu_pad(MENU *menu, int pad) +NCURSES_EXPORT(int) +set_menu_pad(MENU * menu, int pad) { - bool do_refresh = (menu != (MENU*)0); + bool do_refresh = (menu != (MENU *) 0); - if (!isprint((unsigned char)pad)) + T((T_CALLED("set_menu_pad(%p,%d)"), menu, pad)); + + if (!isprint(UChar(pad))) RETURN(E_BAD_ARGUMENT); - - Normalize_Menu( menu ); + + Normalize_Menu(menu); menu->pad = pad; - + if (do_refresh) - Refresh_Menu( menu ); + Refresh_Menu(menu); RETURN(E_OK); } @@ -82,9 +85,11 @@ int set_menu_pad(MENU *menu, int pad) | | Return Values : The pad character +--------------------------------------------------------------------------*/ -int menu_pad(const MENU * menu) +NCURSES_EXPORT(int) +menu_pad(const MENU * menu) { - return (Normalize_Menu( menu ) -> pad); + T((T_CALLED("menu_pad(%p)"), menu)); + returnCode(Normalize_Menu(menu)->pad); } /* m_pad.c ends here */