ncursesw-morphos/menu/m_global.c

599 lines
18 KiB
C
Raw Normal View History

1998-03-01 12:21:12 +08:00
/****************************************************************************
* Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
1998-03-01 12:21:12 +08:00
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* "Software"), to deal in the Software without restriction, including *
* without limitation the rights to use, copy, modify, merge, publish, *
* distribute, distribute with modifications, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included *
* in all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
* *
* Except as contained in this notice, the name(s) of the above copyright *
* holders shall not be used in advertising or otherwise to promote the *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/****************************************************************************
2002-10-13 11:35:53 +08:00
* Author: Juergen Pfeifer, 1995,1997 *
1998-03-01 12:21:12 +08:00
****************************************************************************/
1997-05-15 12:00:00 +08:00
/***************************************************************************
1998-03-01 12:21:12 +08:00
* Module m_global *
1997-05-15 12:00:00 +08:00
* Globally used internal routines and the default menu and item structures *
***************************************************************************/
#include "menu.priv.h"
MODULE_ID("$Id: m_global.c,v 1.25 2010/01/23 21:20:10 tom Exp $")
1997-05-15 12:00:00 +08:00
2002-10-13 11:35:53 +08:00
static char mark[] = "-";
2005-10-10 02:41:57 +08:00
/* *INDENT-OFF* */
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = {
1997-05-15 12:00:00 +08:00
16, /* Nr. of chars high */
1, /* Nr. of chars wide */
16, /* Nr. of items high */
1, /* Nr. of items wide */
16, /* Nr. of formatted items high */
1, /* Nr. of formatted items wide */
16, /* Nr. of items high (actual) */
0, /* length of widest name */
0, /* length of widest description */
1, /* length of mark */
1, /* length of one item */
1, /* Spacing for descriptor */
1, /* Spacing for columns */
1, /* Spacing for rows */
(char *)0, /* buffer used to store match chars */
0, /* Index into pattern buffer */
(WINDOW *)0, /* Window containing entire menu */
(WINDOW *)0, /* Portion of menu displayed */
(WINDOW *)0, /* User's window */
(WINDOW *)0, /* User's subwindow */
(ITEM **)0, /* List of items */
0, /* Total Nr. of items in menu */
(ITEM *)0, /* Current item */
0, /* Top row of menu */
(chtype)A_REVERSE, /* Attribute for selection */
(chtype)A_NORMAL, /* Attribute for nonselection */
(chtype)A_UNDERLINE, /* Attribute for inactive */
' ', /* Pad character */
(Menu_Hook)0, /* Menu init */
(Menu_Hook)0, /* Menu term */
(Menu_Hook)0, /* Item init */
(Menu_Hook)0, /* Item term */
(void *)0, /* userptr */
2002-10-13 11:35:53 +08:00
mark, /* mark */
1997-05-15 12:00:00 +08:00
ALL_MENU_OPTS, /* options */
0 /* status */
};
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = {
1997-05-15 12:00:00 +08:00
{ (char *)0, 0 }, /* name */
{ (char *)0, 0 }, /* description */
(MENU *)0, /* Pointer to parent menu */
(char *)0, /* Userpointer */
ALL_ITEM_OPTS, /* options */
0, /* Item Nr. */
0, /* y */
0, /* x */
FALSE, /* value */
(ITEM *)0, /* left */
(ITEM *)0, /* right */
(ITEM *)0, /* up */
(ITEM *)0 /* down */
};
2005-10-10 02:41:57 +08:00
/* *INDENT-ON* */
1997-05-15 12:00:00 +08:00
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : static void ComputeMaximum_NameDesc_Lenths(MENU *menu)
|
| Description : Calculates the maximum name and description lengths
| of the items connected to the menu
|
| Return Values : -
+--------------------------------------------------------------------------*/
2006-12-18 12:32:42 +08:00
NCURSES_INLINE static void
2005-10-10 02:41:57 +08:00
ComputeMaximum_NameDesc_Lengths(MENU * menu)
1997-05-15 12:00:00 +08:00
{
2005-10-10 02:41:57 +08:00
unsigned MaximumNameLength = 0;
1997-05-15 12:00:00 +08:00
unsigned MaximumDescriptionLength = 0;
ITEM **items;
2006-12-18 12:32:42 +08:00
unsigned check;
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
assert(menu && menu->items);
2005-10-10 02:41:57 +08:00
for (items = menu->items; *items; items++)
1997-05-15 12:00:00 +08:00
{
2006-12-18 12:32:42 +08:00
check = _nc_Calculate_Text_Width(&((*items)->name));
if (check > MaximumNameLength)
MaximumNameLength = check;
2005-10-10 02:41:57 +08:00
2006-12-18 12:32:42 +08:00
check = _nc_Calculate_Text_Width(&((*items)->description));
if (check > MaximumDescriptionLength)
MaximumDescriptionLength = check;
1997-05-15 12:00:00 +08:00
}
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
menu->namelen = MaximumNameLength;
menu->desclen = MaximumDescriptionLength;
2005-10-10 02:41:57 +08:00
T(("ComputeMaximum_NameDesc_Lengths %d,%d", menu->namelen, menu->desclen));
1997-05-15 12:00:00 +08:00
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : static void ResetConnectionInfo(MENU *, ITEM **)
|
| Description : Reset all informations in the menu and the items in
| the item array that indicates a connection
|
| Return Values : -
+--------------------------------------------------------------------------*/
2006-12-18 12:32:42 +08:00
NCURSES_INLINE static void
2005-10-10 02:41:57 +08:00
ResetConnectionInfo(MENU * menu, ITEM ** items)
1997-05-15 12:00:00 +08:00
{
ITEM **item;
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
assert(menu && items);
2005-10-10 02:41:57 +08:00
for (item = items; *item; item++)
1997-05-15 12:00:00 +08:00
{
(*item)->index = 0;
2005-10-10 02:41:57 +08:00
(*item)->imenu = (MENU *) 0;
1997-05-15 12:00:00 +08:00
}
if (menu->pattern)
free(menu->pattern);
menu->pattern = (char *)0;
2005-10-10 02:41:57 +08:00
menu->pindex = 0;
menu->items = (ITEM **) 0;
menu->nitems = 0;
1997-05-15 12:00:00 +08:00
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : bool _nc_Connect_Items(MENU *menu, ITEM **items)
|
| Description : Connect the items in the item array to the menu.
| Decorate all the items with a number and a backward
| pointer to the menu.
|
2004-02-09 10:15:26 +08:00
| Return Values : TRUE - successful connection
1997-05-15 12:00:00 +08:00
| FALSE - connection failed
+--------------------------------------------------------------------------*/
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT(bool)
2005-10-10 02:41:57 +08:00
_nc_Connect_Items(MENU * menu, ITEM ** items)
1997-05-15 12:00:00 +08:00
{
ITEM **item;
unsigned int ItemCount = 0;
2005-10-10 02:41:57 +08:00
if (menu && items)
{
for (item = items; *item; item++)
1997-05-15 12:00:00 +08:00
{
2005-10-10 02:41:57 +08:00
if ((*item)->imenu)
1997-05-15 12:00:00 +08:00
{
/* if a item is already connected, reject connection */
break;
}
}
2005-10-10 02:41:57 +08:00
if (!(*item))
1997-05-15 12:00:00 +08:00
/* we reached the end, so there was no connected item */
{
2005-10-10 02:41:57 +08:00
for (item = items; *item; item++)
1997-05-15 12:00:00 +08:00
{
if (menu->opt & O_ONEVALUE)
{
(*item)->value = FALSE;
}
(*item)->index = ItemCount++;
(*item)->imenu = menu;
2005-10-10 02:41:57 +08:00
}
1997-05-15 12:00:00 +08:00
}
}
else
2005-10-10 02:41:57 +08:00
return (FALSE);
1997-05-15 12:00:00 +08:00
if (ItemCount != 0)
{
2005-10-10 02:41:57 +08:00
menu->items = items;
1997-05-15 12:00:00 +08:00
menu->nitems = ItemCount;
ComputeMaximum_NameDesc_Lengths(menu);
2005-10-10 02:41:57 +08:00
if ((menu->pattern = typeMalloc(char, (unsigned)(1 + menu->namelen))))
1997-05-15 12:00:00 +08:00
{
2005-10-10 02:41:57 +08:00
Reset_Pattern(menu);
set_menu_format(menu, menu->frows, menu->fcols);
1997-05-15 12:00:00 +08:00
menu->curitem = *items;
menu->toprow = 0;
2005-10-10 02:41:57 +08:00
return (TRUE);
1997-05-15 12:00:00 +08:00
}
}
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
/* If we fall through to this point, we have to reset all items connection
and inform about a reject connection */
2005-10-10 02:41:57 +08:00
ResetConnectionInfo(menu, items);
return (FALSE);
1997-05-15 12:00:00 +08:00
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : void _nc_Disconnect_Items(MENU *menu)
|
| Description : Disconnect the menus item array from the menu
|
| Return Values : -
+--------------------------------------------------------------------------*/
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT(void)
2005-10-10 02:41:57 +08:00
_nc_Disconnect_Items(MENU * menu)
1997-05-15 12:00:00 +08:00
{
if (menu && menu->items)
2005-10-10 02:41:57 +08:00
ResetConnectionInfo(menu, menu->items);
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : int _nc_Calculate_Text_Width(const TEXT * item)
|
| Description : Calculate the number of columns for a TEXT.
|
| Return Values : the width
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
_nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ )
{
#if USE_WIDEC_SUPPORT
int result = item->length;
T((T_CALLED("_nc_menu_text_width(%p)"), (const void *)item));
2006-12-18 12:32:42 +08:00
if (result != 0 && item->str != 0)
2005-10-10 02:41:57 +08:00
{
2006-12-18 12:32:42 +08:00
int count = mbstowcs(0, item->str, 0);
wchar_t *temp = 0;
2005-10-10 02:41:57 +08:00
2006-12-18 12:32:42 +08:00
if (count > 0
&& (temp = typeMalloc(wchar_t, 2 + count)) != 0)
2005-10-10 02:41:57 +08:00
{
2006-12-18 12:32:42 +08:00
int n;
2005-10-10 02:41:57 +08:00
2006-12-18 12:32:42 +08:00
result = 0;
mbstowcs(temp, item->str, (unsigned)count);
for (n = 0; n < count; ++n)
{
int test = wcwidth(temp[n]);
if (test <= 0)
test = 1;
result += test;
}
free(temp);
2005-10-10 02:41:57 +08:00
}
}
returnCode(result);
#else
return item->length;
#endif
}
2006-12-18 12:32:42 +08:00
/*
* Calculate the actual width of a menu entry for wide-characters.
2005-10-10 02:41:57 +08:00
*/
2006-12-18 12:32:42 +08:00
#if USE_WIDEC_SUPPORT
2005-10-10 02:41:57 +08:00
static int
calculate_actual_width(MENU * menu, bool name)
{
int width = 0;
int check = 0;
ITEM **items;
assert(menu && menu->items);
2006-12-18 12:32:42 +08:00
if (menu->items != 0)
2005-10-10 02:41:57 +08:00
{
2006-12-18 12:32:42 +08:00
for (items = menu->items; *items; items++)
2005-10-10 02:41:57 +08:00
{
2006-12-18 12:32:42 +08:00
if (name)
{
check = _nc_Calculate_Text_Width(&((*items)->name));
}
else
{
check = _nc_Calculate_Text_Width(&((*items)->description));
}
if (check > width)
width = check;
2005-10-10 02:41:57 +08:00
}
2006-12-18 12:32:42 +08:00
}
else
{
width = (name ? menu->namelen : menu->desclen);
2005-10-10 02:41:57 +08:00
}
T(("calculate_actual_width %s = %d/%d",
name ? "name" : "desc",
width,
name ? menu->namelen : menu->desclen));
return width;
1997-05-15 12:00:00 +08:00
}
2005-10-10 02:41:57 +08:00
#else
#define calculate_actual_width(menu, name) (name ? menu->namelen : menu->desclen)
#endif
1997-05-15 12:00:00 +08:00
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : void _nc_Calculate_Item_Length_and_Width(MENU *menu)
|
| Description : Calculate the length of an item and the width of the
| whole menu.
|
| Return Values : -
+--------------------------------------------------------------------------*/
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT(void)
2005-10-10 02:41:57 +08:00
_nc_Calculate_Item_Length_and_Width(MENU * menu)
1997-05-15 12:00:00 +08:00
{
int l;
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
assert(menu);
2005-10-10 02:41:57 +08:00
menu->height = 1 + menu->spc_rows * (menu->arows - 1);
l = calculate_actual_width(menu, TRUE);
l += menu->marklen;
if ((menu->opt & O_SHOWDESC) && (menu->desclen > 0))
{
l += calculate_actual_width(menu, FALSE);
l += menu->spc_desc;
}
1997-05-15 12:00:00 +08:00
menu->itemlen = l;
l *= menu->cols;
2005-10-10 02:41:57 +08:00
l += (menu->cols - 1) * menu->spc_cols; /* for the padding between the columns */
1997-05-15 12:00:00 +08:00
menu->width = l;
2005-10-10 02:41:57 +08:00
T(("_nc_CalculateItem_Length_and_Width columns %d, item %d, width %d",
menu->cols,
menu->itemlen,
menu->width));
}
1997-05-15 12:00:00 +08:00
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : void _nc_Link_Item(MENU *menu)
|
2004-02-09 10:15:26 +08:00
| Description : Statically calculate for every item its four neighbors.
1997-05-15 12:00:00 +08:00
| This depends on the orientation of the menu. This
2004-02-09 10:15:26 +08:00
| static approach simplifies navigation in the menu a lot.
1997-05-15 12:00:00 +08:00
|
| Return Values : -
+--------------------------------------------------------------------------*/
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT(void)
2005-10-10 02:41:57 +08:00
_nc_Link_Items(MENU * menu)
1997-05-15 12:00:00 +08:00
{
if (menu && menu->items && *(menu->items))
{
2005-10-10 02:41:57 +08:00
int i, j;
1997-05-15 12:00:00 +08:00
ITEM *item;
int Number_Of_Items = menu->nitems;
int col = 0, row = 0;
int Last_in_Row;
int Last_in_Column;
bool cycle = (menu->opt & O_NONCYCLIC) ? FALSE : TRUE;
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
menu->status &= ~_LINK_NEEDED;
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
if (menu->opt & O_ROWMAJOR)
{
int Number_Of_Columns = menu->cols;
2005-10-10 02:41:57 +08:00
for (i = 0; i < Number_Of_Items; i++)
1997-05-15 12:00:00 +08:00
{
item = menu->items[i];
2005-10-10 02:41:57 +08:00
Last_in_Row = row * Number_Of_Columns + (Number_Of_Columns - 1);
item->left = (col) ?
/* if we are not in the leftmost column, we can use the
predecessor in the items array */
menu->items[i - 1] :
(cycle ? menu->items[(Last_in_Row >= Number_Of_Items) ?
Number_Of_Items - 1 :
Last_in_Row] :
(ITEM *) 0);
item->right = ((col < (Number_Of_Columns - 1)) &&
((i + 1) < Number_Of_Items)
)?
menu->items[i + 1] :
(cycle ? menu->items[row * Number_Of_Columns] :
(ITEM *) 0
);
Last_in_Column = (menu->rows - 1) * Number_Of_Columns + col;
item->up = (row) ? menu->items[i - Number_Of_Columns] :
(cycle ? menu->items[(Last_in_Column >= Number_Of_Items) ?
Number_Of_Items - 1 :
Last_in_Column] :
(ITEM *) 0);
item->down = ((i + Number_Of_Columns) < Number_Of_Items)
?
menu->items[i + Number_Of_Columns] :
(cycle ? menu->items[(row + 1) < menu->rows ?
Number_Of_Items - 1 : col] :
(ITEM *) 0);
1997-05-15 12:00:00 +08:00
item->x = col;
item->y = row;
2005-10-10 02:41:57 +08:00
if (++col == Number_Of_Columns)
1997-05-15 12:00:00 +08:00
{
row++;
col = 0;
}
}
}
else
{
int Number_Of_Rows = menu->rows;
2005-10-10 02:41:57 +08:00
for (j = 0; j < Number_Of_Items; j++)
1997-05-15 12:00:00 +08:00
{
2005-10-10 02:41:57 +08:00
item = menu->items[i = (col * Number_Of_Rows + row)];
Last_in_Column = (menu->cols - 1) * Number_Of_Rows + row;
item->left = (col) ?
1997-05-15 12:00:00 +08:00
menu->items[i - Number_Of_Rows] :
2005-10-10 02:41:57 +08:00
(cycle ? (Last_in_Column >= Number_Of_Items) ?
menu->items[Last_in_Column - Number_Of_Rows] :
menu->items[Last_in_Column] :
(ITEM *) 0);
item->right = ((i + Number_Of_Rows) < Number_Of_Items)
?
menu->items[i + Number_Of_Rows] :
(cycle ? menu->items[row] : (ITEM *) 0);
1997-05-15 12:00:00 +08:00
Last_in_Row = col * Number_Of_Rows + (Number_Of_Rows - 1);
2005-10-10 02:41:57 +08:00
item->up = (row) ?
menu->items[i - 1] :
(cycle ?
menu->items[(Last_in_Row >= Number_Of_Items) ?
Number_Of_Items - 1 :
Last_in_Row] :
(ITEM *) 0);
item->down = (row < (Number_Of_Rows - 1))
?
(menu->items[((i + 1) < Number_Of_Items) ?
i + 1 :
(col - 1) * Number_Of_Rows + row + 1]) :
(cycle ?
menu->items[col * Number_Of_Rows] :
(ITEM *) 0
);
1997-05-15 12:00:00 +08:00
item->x = col;
item->y = row;
2005-10-10 02:41:57 +08:00
if ((++row) == Number_Of_Rows)
1997-05-15 12:00:00 +08:00
{
col++;
row = 0;
}
}
}
}
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : void _nc_Show_Menu(const MENU* menu)
1997-05-15 12:00:00 +08:00
|
| Description : Update the window that is associated with the menu
|
| Return Values : -
+--------------------------------------------------------------------------*/
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT(void)
2005-10-10 02:41:57 +08:00
_nc_Show_Menu(const MENU * menu)
1997-05-15 12:00:00 +08:00
{
WINDOW *win;
int maxy, maxx;
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
assert(menu);
2005-10-10 02:41:57 +08:00
if ((menu->status & _POSTED) && !(menu->status & _IN_DRIVER))
1997-05-15 12:00:00 +08:00
{
/* adjust the internal subwindow to start on the current top */
assert(menu->sub);
2005-10-10 02:41:57 +08:00
mvderwin(menu->sub, menu->spc_rows * menu->toprow, 0);
1997-05-15 12:00:00 +08:00
win = Get_Menu_Window(menu);
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
maxy = getmaxy(win);
2005-10-10 02:41:57 +08:00
maxx = getmaxx(win);
if (menu->height < maxy)
1997-05-15 12:00:00 +08:00
maxy = menu->height;
2005-10-10 02:41:57 +08:00
if (menu->width < maxx)
1997-05-15 12:00:00 +08:00
maxx = menu->width;
2005-10-10 02:41:57 +08:00
copywin(menu->sub, win, 0, 0, 0, 0, maxy - 1, maxx - 1, 0);
1997-05-15 12:00:00 +08:00
pos_menu_cursor(menu);
2005-10-10 02:41:57 +08:00
}
}
1997-05-15 12:00:00 +08:00
/*---------------------------------------------------------------------------
| Facility : libnmenu
| Function : void _nc_New_TopRow_and_CurrentItem(
| MENU *menu,
| int new_toprow,
| ITEM *new_current_item)
|
| Description : Redisplay the menu so that the given row becomes the
| top row and the given item becomes the new current
| item.
|
| Return Values : -
+--------------------------------------------------------------------------*/
2002-10-13 11:35:53 +08:00
NCURSES_EXPORT(void)
_nc_New_TopRow_and_CurrentItem(
MENU * menu,
int new_toprow,
ITEM * new_current_item)
1997-05-15 12:00:00 +08:00
{
ITEM *cur_item;
bool mterm_called = FALSE;
bool iterm_called = FALSE;
2005-10-10 02:41:57 +08:00
1997-05-15 12:00:00 +08:00
assert(menu);
if (menu->status & _POSTED)
{
if (new_current_item != menu->curitem)
{
2005-10-10 02:41:57 +08:00
Call_Hook(menu, itemterm);
1997-05-15 12:00:00 +08:00
iterm_called = TRUE;
}
if (new_toprow != menu->toprow)
{
2005-10-10 02:41:57 +08:00
Call_Hook(menu, menuterm);
1997-05-15 12:00:00 +08:00
mterm_called = TRUE;
2005-10-10 02:41:57 +08:00
}
cur_item = menu->curitem;
1997-05-15 12:00:00 +08:00
assert(cur_item);
2005-10-10 02:41:57 +08:00
menu->toprow = new_toprow;
menu->curitem = new_current_item;
1997-05-15 12:00:00 +08:00
if (mterm_called)
{
2005-10-10 02:41:57 +08:00
Call_Hook(menu, menuinit);
1997-05-15 12:00:00 +08:00
}
if (iterm_called)
{
/* this means, move from the old current_item to the new one... */
2005-10-10 02:41:57 +08:00
Move_To_Current_Item(menu, cur_item);
Call_Hook(menu, iteminit);
1997-05-15 12:00:00 +08:00
}
if (mterm_called || iterm_called)
{
_nc_Show_Menu(menu);
}
else
pos_menu_cursor(menu);
}
else
2005-10-10 02:41:57 +08:00
{ /* if we are not posted, this is quite simple */
menu->toprow = new_toprow;
1997-05-15 12:00:00 +08:00
menu->curitem = new_current_item;
}
}
/* m_global.c ends here */