summaryrefslogtreecommitdiff
path: root/menu/m_cursor.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2021-10-20 23:22:45 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2021-10-20 23:22:45 +0000
commit332fa27640b1901ac632e6d37a4aa9643d0f8594 (patch)
treebfb5303e24d1cd4ddd22df12f45a013fefb9ca23 /menu/m_cursor.c
parentff448436b2b70771d09b8d5ff34a509dcf02f81b (diff)
downloadncurses-master.tar.gz
Diffstat (limited to 'menu/m_cursor.c')
-rw-r--r--menu/m_cursor.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/menu/m_cursor.c b/menu/m_cursor.c
index 3f8e548..b9b301d 100644
--- a/menu/m_cursor.c
+++ b/menu/m_cursor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -38,7 +38,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_cursor.c,v 1.23 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: m_cursor.c,v 1.26 2021/03/27 23:46:29 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,16 +50,16 @@ MODULE_ID("$Id: m_cursor.c,v 1.23 2020/02/02 23:34:34 tom Exp $")
| E_BAD_ARGUMENT - invalid menu
| E_NOT_POSTED - Menu is not posted
+--------------------------------------------------------------------------*/
-NCURSES_EXPORT(int)
-_nc_menu_cursor_pos(const MENU * menu, const ITEM * item, int *pY, int *pX)
+MENU_EXPORT(int)
+_nc_menu_cursor_pos(const MENU *menu, const ITEM *item, int *pY, int *pX)
{
if (!menu || !pX || !pY)
return (E_BAD_ARGUMENT);
else
{
- if ((ITEM *) 0 == item)
+ if ((ITEM *)0 == item)
item = menu->curitem;
- assert(item != (ITEM *) 0);
+ assert(item != (ITEM *)0);
if (!(menu->status & _POSTED))
return (E_NOT_POSTED);
@@ -80,19 +80,19 @@ _nc_menu_cursor_pos(const MENU * menu, const ITEM * item, int *pY, int *pX)
| E_BAD_ARGUMENT - invalid menu
| E_NOT_POSTED - Menu is not posted
+--------------------------------------------------------------------------*/
-NCURSES_EXPORT(int)
-pos_menu_cursor(const MENU * menu)
+MENU_EXPORT(int)
+pos_menu_cursor(const MENU *menu)
{
- WINDOW *win, *sub;
int x = 0, y = 0;
- int err = _nc_menu_cursor_pos(menu, (ITEM *) 0, &y, &x);
+ int err = _nc_menu_cursor_pos(menu, (ITEM *)0, &y, &x);
T((T_CALLED("pos_menu_cursor(%p)"), (const void *)menu));
if (E_OK == err)
{
- win = Get_Menu_UserWin(menu);
- sub = menu->usersub ? menu->usersub : win;
+ WINDOW *win = Get_Menu_UserWin(menu);
+ WINDOW *sub = menu->usersub ? menu->usersub : win;
+
assert(win && sub);
if ((menu->opt & O_SHOWMATCH) && (menu->pindex > 0))