/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * 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 *
#include "menu.priv.h"
-MODULE_ID("$Id: m_post.c,v 1.34 2020/12/12 00:38:14 tom Exp $")
+MODULE_ID("$Id: m_post.c,v 1.35 2021/03/27 23:46:29 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
int count = 0;
bool isfore = FALSE, isback = FALSE, isgrey = FALSE;
int name_len;
- int desc_len;
assert(menu->win);
{
int m = menu->spc_desc / 2;
int cy = -1, cx = -1;
+ int desc_len;
for (ch = ' ', i = 0; i < menu->spc_desc; i++)
{
_nc_Draw_Menu(const MENU *menu)
{
ITEM *item = menu->items[0];
- ITEM *lasthor, *lastvert;
+ ITEM *lastvert;
ITEM *hitem;
int y = 0;
chtype s_bkgd;
do
{
+ ITEM *lasthor;
+
wmove(menu->win, y, 0);
hitem = item;
if (menu->items && *(menu->items))
{
- int y;
int h = 1 + menu->spc_rows * (menu->rows - 1);
WINDOW *win = Get_Menu_Window(menu);
if ((menu->win = newpad(h, menu->width)))
{
- y = (maxy >= h) ? h : maxy;
+ int y = (maxy >= h) ? h : maxy;
+
if (y >= menu->height)
y = menu->height;
if (!(menu->sub = subpad(menu->win, y, menu->width, 0, 0)))