/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_top.c,v 1.14 2020/12/12 00:38:08 tom Exp $")
+MODULE_ID("$Id: m_item_top.c,v 1.16 2021/06/17 21:11:08 tom Exp $")
/*---------------------------------------------------------------------------
-| Facility : libnmenu
+| Facility : libnmenu
| Function : int set_top_row(MENU *menu, int row)
-|
+|
| Description : Makes the specified row the top row in the menu
|
| Return Values : E_OK - success
MENU_EXPORT(int)
set_top_row(MENU *menu, int row)
{
- ITEM *item;
-
T((T_CALLED("set_top_row(%p,%d)"), (void *)menu, row));
if (menu)
if (row != menu->toprow)
{
+ ITEM *item;
+
if (menu->status & _LINK_NEEDED)
_nc_Link_Items(menu);
}
/*---------------------------------------------------------------------------
-| Facility : libnmenu
+| Facility : libnmenu
| Function : int top_row(const MENU *)
-|
+|
| Description : Return the top row of the menu
|
| Return Values : The row number or ERR if there is no row