1/*
2 *  $Id: dlg_internals.h,v 1.3 2019/08/08 21:29:41 tom Exp $
3 *
4 *  dlg_internals.h -- runtime binding support for dialog
5 *
6 *  Copyright 2019 Thomas E.  Dickey
7 *
8 *  This program is free software; you can redistribute it and/or modify
9 *  it under the terms of the GNU Lesser General Public License, version 2.1
10 *  as published by the Free Software Foundation.
11 *
12 *  This program is distributed in the hope that it will be useful, but
13 *  WITHOUT ANY WARRANTY; without even the implied warranty of
14 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 *  Lesser General Public License for more details.
16 *
17 *  You should have received a copy of the GNU Lesser General Public
18 *  License along with this program; if not, write to
19 *	Free Software Foundation, Inc.
20 *	51 Franklin St., Fifth Floor
21 *	Boston, MA 02110, USA.
22 */
23
24#ifndef DLG_INTERNALS_H_included
25#define DLG_INTERNALS_H_included 1
26
27#include <dialog.h>
28
29#define TableSize(name) (sizeof(name)/sizeof((name)[0]))
30
31/* *INDENT-OFF* */
32#define resizeit(name, NAME) \
33		name = ((NAME >= old_##NAME) \
34			? (NAME - (old_##NAME - old_##name)) \
35			: old_##name)
36
37#define AddLastKey() \
38	if (dialog_vars.last_key) { \
39	    if (dlg_need_separator()) \
40		dlg_add_separator(); \
41	    dlg_add_last_key(-1); \
42	}
43
44
45/* *INDENT-ON* */
46
47#endif /* DLG_INTERNALS_H_included */
48