projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 5.9 - patch 20130324
[ncurses.git]
/
menu
/
m_pad.c
diff --git
a/menu/m_pad.c
b/menu/m_pad.c
index 8a3382eab19f411bee24439cec4be13952ded50a..0abaf67aee630f12909167f5e3935bf04cdd58a9 100644
(file)
--- a/
menu/m_pad.c
+++ b/
menu/m_pad.c
@@
-1,5
+1,5
@@
/****************************************************************************
/****************************************************************************
- * Copyright (c) 1998
,2000 Free Software Foundation, Inc.
*
+ * Copyright (c) 1998
-2010,2012 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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@
-28,7
+28,6
@@
/****************************************************************************
* Author: Juergen Pfeifer, 1995,1997 *
/****************************************************************************
* Author: Juergen Pfeifer, 1995,1997 *
- * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en *
****************************************************************************/
/***************************************************************************
****************************************************************************/
/***************************************************************************
@@
-38,19
+37,19
@@
#include "menu.priv.h"
#include "menu.priv.h"
-MODULE_ID("$Id: m_pad.c,v 1.
6 2002/07/06 15:22:16 juergen
Exp $")
+MODULE_ID("$Id: m_pad.c,v 1.
13 2012/03/10 23:43:41 tom
Exp $")
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
if ( (menu) && ((menu)->status & _POSTED) )\
{\
_nc_Draw_Menu( menu );\
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
if ( (menu) && ((menu)->status & _POSTED) )\
{\
_nc_Draw_Menu( menu );\
- _nc_Show_Menu( menu );\
+ _nc_Show_Menu( menu );
\
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int set_menu_pad(MENU
*
menu, int pad)
+| Function : int set_menu_pad(MENU
*
menu, int pad)
|
| Description : Set the character to be used to separate the item name
| from its description. This must be a printable
|
| Description : Set the character to be used to separate the item name
| from its description. This must be a printable
@@
-60,18
+59,20
@@
MODULE_ID("$Id: m_pad.c,v 1.6 2002/07/06 15:22:16 juergen Exp $")
| E_BAD_ARGUMENT - an invalid value has been passed
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
| E_BAD_ARGUMENT - an invalid value has been passed
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
-set_menu_pad
(MENU *
menu, int pad)
+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)"), (void *)menu, pad));
+
+ if (!isprint(UChar(pad)))
RETURN(E_BAD_ARGUMENT);
RETURN(E_BAD_ARGUMENT);
-
- Normalize_Menu(
menu
);
- menu->pad = pad;
-
+
+ Normalize_Menu(
menu
);
+ menu->pad =
(unsigned char)
pad;
+
if (do_refresh)
if (do_refresh)
-
Refresh_Menu( menu
);
+
Refresh_Menu(menu
);
RETURN(E_OK);
}
RETURN(E_OK);
}
@@
-85,9
+86,10
@@
set_menu_pad (MENU *menu, int pad)
| Return Values : The pad character
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
| Return Values : The pad character
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
-menu_pad
(const MENU * menu)
+menu_pad(const MENU * menu)
{
{
- return (Normalize_Menu( menu ) -> pad);
+ T((T_CALLED("menu_pad(%p)"), (const void *)menu));
+ returnCode(Normalize_Menu(menu)->pad);
}
/* m_pad.c ends here */
}
/* m_pad.c ends here */