projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 6.2 - patch 20210619
[ncurses.git]
/
menu
/
m_pad.c
diff --git
a/menu/m_pad.c
b/menu/m_pad.c
index 560036e2ccd69ac163de658f2f7753938a439dc6..008e19a79cddf3761f9bd2b8d0ba1a5cd7ce3ddb 100644
(file)
--- a/
menu/m_pad.c
+++ b/
menu/m_pad.c
@@
-1,5
+1,6
@@
/****************************************************************************
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright 2020,2021 Thomas E. Dickey *
+ * Copyright 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 *
@@
-37,56
+38,59
@@
#include "menu.priv.h"
#include "menu.priv.h"
-MODULE_ID("$Id: m_pad.c,v 1.
7 2003/10/25 14:54:48
tom Exp $")
+MODULE_ID("$Id: m_pad.c,v 1.
17 2021/06/17 21:20:30
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
-| Function : int set_menu_pad(MENU
*
menu, int pad)
-|
+| Facility : libnmenu
+| Function : int set_menu_pad(MENU
*
menu, int pad)
+|
| Description : Set the character to be used to separate the item name
| Description : Set the character to be used to separate the item name
-| from its description. This must be a printable
+| from its description. This must be a printable
| character.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - an invalid value has been passed
+--------------------------------------------------------------------------*/
| character.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - an invalid value has been passed
+--------------------------------------------------------------------------*/
-
NCURSES
_EXPORT(int)
-set_menu_pad
(MENU *menu, int pad)
+
MENU
_EXPORT(int)
+set_menu_pad(MENU *menu, int pad)
{
{
- bool do_refresh = (menu != (MENU*)0);
+ bool do_refresh = (menu != (MENU *)0);
+
+ T((T_CALLED("set_menu_pad(%p,%d)"), (void *)menu, pad));
- if (!isprint(
(unsigned char)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);
}
/*---------------------------------------------------------------------------
-| Facility : libnmenu
+| Facility : libnmenu
| Function : int menu_pad(const MENU *menu)
| Function : int menu_pad(const MENU *menu)
-|
+|
| Description : Return the value of the padding character
|
| Return Values : The pad character
+--------------------------------------------------------------------------*/
| Description : Return the value of the padding character
|
| Return Values : The pad character
+--------------------------------------------------------------------------*/
-
NCURSES
_EXPORT(int)
-menu_pad
(const MENU *
menu)
+
MENU
_EXPORT(int)
+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 */