mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2024-11-21 03:12:03 +08:00
ncurses 6.2 - patch 20200704
+ modify version-check with Ada generics to use the same pattern as in the check for supported gnat versions (report by Pascal Pignard). > additional changes for building with Visual Studio C++ and msys2 (patches by "Maarten Anonymous"): + adjust headers/declarations to provide for "dllimport" vs "dllexport" declarations when constructing DLLs, to worko with Visual Studio C++.
This commit is contained in:
parent
9b4c4abadc
commit
04d942c3d9
6
Ada95/aclocal.m4
vendored
6
Ada95/aclocal.m4
vendored
@ -29,7 +29,7 @@ dnl***************************************************************************
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey
|
||||
dnl
|
||||
dnl $Id: aclocal.m4,v 1.157 2020/05/31 20:52:36 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.158 2020/07/04 23:32:09 tom Exp $
|
||||
dnl Macros used in NCURSES Ada95 auto-configuration script.
|
||||
dnl
|
||||
dnl These macros are maintained separately from NCURSES. The copyright on
|
||||
@ -1421,7 +1421,7 @@ test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
|
||||
AC_SUBST(GNATPREP_OPTS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_GENERICS version: 5 updated: 2020/05/31 16:49:35
|
||||
dnl CF_GNAT_GENERICS version: 6 updated: 2020/07/04 19:30:27
|
||||
dnl ----------------
|
||||
AC_DEFUN([CF_GNAT_GENERICS],
|
||||
[
|
||||
@ -1429,7 +1429,7 @@ AC_REQUIRE([CF_GNAT_VERSION])
|
||||
|
||||
AC_MSG_CHECKING(if GNAT supports generics)
|
||||
case $cf_cv_gnat_version in
|
||||
(3.[[1-9]]*|[[4-9]].*|[[1-9]][[0-9]].*)
|
||||
(3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|[[1-9]][[0-9]].[[0-9]]*|20[[0-9]][[0-9]])
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
(*)
|
||||
|
2
Ada95/configure
vendored
2
Ada95/configure
vendored
@ -16670,7 +16670,7 @@ test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
|
||||
echo "$as_me:16670: checking if GNAT supports generics" >&5
|
||||
echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
|
||||
case $cf_cv_gnat_version in
|
||||
(3.[1-9]*|[4-9].*|[1-9][0-9].*)
|
||||
(3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
(*)
|
||||
|
10
NEWS
10
NEWS
@ -26,7 +26,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.3511 2020/06/27 21:48:14 tom Exp $
|
||||
-- $Id: NEWS,v 1.3514 2020/07/04 23:28:53 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is a log of changes that ncurses has gone through since Zeyd started
|
||||
@ -46,6 +46,14 @@ See the AUTHORS file for the corresponding full names.
|
||||
Changes through 1.9.9e did not credit all contributions;
|
||||
it is not possible to add this information.
|
||||
|
||||
20200704
|
||||
+ modify version-check with Ada generics to use the same pattern as in
|
||||
the check for supported gnat versions (report by Pascal Pignard).
|
||||
> additional changes for building with Visual Studio C++ and msys2
|
||||
(patches by "Maarten Anonymous"):
|
||||
+ adjust headers/declarations to provide for "dllimport" vs "dllexport"
|
||||
declarations when constructing DLLs, to worko with Visual Studio C++.
|
||||
|
||||
20200627
|
||||
+ build-fixes for gnat 10.1.1, whose gnatmake drops integration with
|
||||
gprbuild.
|
||||
|
6
aclocal.m4
vendored
6
aclocal.m4
vendored
@ -29,7 +29,7 @@ dnl***************************************************************************
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey 1995-on
|
||||
dnl
|
||||
dnl $Id: aclocal.m4,v 1.914 2020/05/31 20:50:13 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.916 2020/07/04 23:31:15 tom Exp $
|
||||
dnl Macros used in NCURSES auto-configuration script.
|
||||
dnl
|
||||
dnl These macros are maintained separately from NCURSES. The copyright on
|
||||
@ -2811,7 +2811,7 @@ test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
|
||||
AC_SUBST(GNATPREP_OPTS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_GENERICS version: 5 updated: 2020/05/31 16:49:35
|
||||
dnl CF_GNAT_GENERICS version: 6 updated: 2020/07/04 19:30:27
|
||||
dnl ----------------
|
||||
AC_DEFUN([CF_GNAT_GENERICS],
|
||||
[
|
||||
@ -2819,7 +2819,7 @@ AC_REQUIRE([CF_GNAT_VERSION])
|
||||
|
||||
AC_MSG_CHECKING(if GNAT supports generics)
|
||||
case $cf_cv_gnat_version in
|
||||
(3.[[1-9]]*|[[4-9]].*|[[1-9]][[0-9]].*)
|
||||
(3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|[[1-9]][[0-9]].[[0-9]]*|20[[0-9]][[0-9]])
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
(*)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.in,v 1.122 2020/03/08 16:13:11 tom Exp $
|
||||
# $Id: Makefile.in,v 1.123 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
##############################################################################
|
||||
# Copyright 2018,2020 Thomas E. Dickey #
|
||||
# Copyright 1998-2015,2016 Free Software Foundation, Inc. #
|
||||
@ -89,7 +89,7 @@ CXXFLAGS = @CXXFLAGS@ @EXTRA_CXXFLAGS@
|
||||
CXXLIBS = @CXXLIBS@
|
||||
|
||||
INCDIR = ../include
|
||||
CPPFLAGS = -DHAVE_CONFIG_H -I../c++ @CPPFLAGS@
|
||||
CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES_CXX -I../c++ @CPPFLAGS@
|
||||
|
||||
CTAGS = @CTAGS@
|
||||
ETAGS = @ETAGS@
|
||||
@ -97,8 +97,8 @@ ETAGS = @ETAGS@
|
||||
CC = ${CXX}
|
||||
CCFLAGS = $(CPPFLAGS) $(CXXFLAGS)
|
||||
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS)
|
||||
CFLAGS_NORMAL = $(CCFLAGS)
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
|
||||
CFLAGS_PROFILE = $(CCFLAGS) -pg
|
||||
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
|
||||
|
@ -32,14 +32,14 @@
|
||||
* Author: Juergen Pfeifer, 1997 *
|
||||
****************************************************************************/
|
||||
|
||||
// $Id: cursesapp.h,v 1.14 2020/02/02 23:34:34 tom Exp $
|
||||
// $Id: cursesapp.h,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
|
||||
#ifndef NCURSES_CURSESAPP_H_incl
|
||||
#define NCURSES_CURSESAPP_H_incl
|
||||
|
||||
#include <cursslk.h>
|
||||
|
||||
class NCURSES_IMPEXP NCursesApplication {
|
||||
class NCURSES_CXX_IMPEXP NCursesApplication {
|
||||
public:
|
||||
typedef struct _slk_link { // This structure is used to maintain
|
||||
struct _slk_link* prev; // a stack of SLKs
|
||||
|
@ -32,7 +32,7 @@
|
||||
* Author: Juergen Pfeifer, 1997 *
|
||||
****************************************************************************/
|
||||
|
||||
// $Id: cursesf.h,v 1.35 2020/02/02 23:34:34 tom Exp $
|
||||
// $Id: cursesf.h,v 1.36 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
|
||||
#ifndef NCURSES_CURSESF_H_incl
|
||||
#define NCURSES_CURSESF_H_incl 1
|
||||
@ -51,11 +51,11 @@ extern "C" {
|
||||
// The abstract base class for builtin and user defined Fieldtypes.
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP NCursesFormField; // forward declaration
|
||||
class NCURSES_CXX_IMPEXP NCursesFormField; // forward declaration
|
||||
|
||||
// Class to represent builtin field types as well as C++ written new
|
||||
// fieldtypes (see classes UserDefineFieldType...
|
||||
class NCURSES_IMPEXP NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP NCursesFieldType
|
||||
{
|
||||
friend class NCursesFormField;
|
||||
|
||||
@ -101,7 +101,7 @@ public:
|
||||
// The class representing a forms field, wrapping the lowlevel FIELD struct
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP NCursesFormField
|
||||
class NCURSES_CXX_IMPEXP NCursesFormField
|
||||
{
|
||||
friend class NCursesForm;
|
||||
|
||||
@ -338,7 +338,7 @@ extern "C" {
|
||||
// The class representing a form, wrapping the lowlevel FORM struct
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP NCursesForm : public NCursesPanel
|
||||
class NCURSES_CXX_IMPEXP NCursesForm : public NCursesPanel
|
||||
{
|
||||
protected:
|
||||
FORM* form; // the lowlevel structure
|
||||
@ -629,7 +629,7 @@ public:
|
||||
// data belongs to some class T. Use T as template argument
|
||||
// to create a UserField.
|
||||
// -------------------------------------------------------------------------
|
||||
template<class T> class NCURSES_IMPEXP NCursesUserField : public NCursesFormField
|
||||
template<class T> class NCURSES_CXX_IMPEXP NCursesUserField : public NCursesFormField
|
||||
{
|
||||
public:
|
||||
NCursesUserField (int rows,
|
||||
@ -662,7 +662,7 @@ public:
|
||||
// The same mechanism is used to attach user data to a form
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
template<class T> class NCURSES_IMPEXP NCursesUserForm : public NCursesForm
|
||||
template<class T> class NCURSES_CXX_IMPEXP NCursesUserForm : public NCursesForm
|
||||
{
|
||||
protected:
|
||||
// 'Internal' constructor, builds an object without association to a
|
||||
@ -721,7 +721,7 @@ public:
|
||||
// Builtin Fieldtypes
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP Alpha_Field : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP Alpha_Field : public NCursesFieldType
|
||||
{
|
||||
private:
|
||||
int min_field_width;
|
||||
@ -737,7 +737,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP Alphanumeric_Field : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP Alphanumeric_Field : public NCursesFieldType
|
||||
{
|
||||
private:
|
||||
int min_field_width;
|
||||
@ -753,7 +753,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP Integer_Field : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP Integer_Field : public NCursesFieldType
|
||||
{
|
||||
private:
|
||||
int precision;
|
||||
@ -771,7 +771,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP Numeric_Field : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP Numeric_Field : public NCursesFieldType
|
||||
{
|
||||
private:
|
||||
int precision;
|
||||
@ -789,7 +789,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP Regular_Expression_Field : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP Regular_Expression_Field : public NCursesFieldType
|
||||
{
|
||||
private:
|
||||
char* regex;
|
||||
@ -834,7 +834,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP Enumeration_Field : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP Enumeration_Field : public NCursesFieldType
|
||||
{
|
||||
private:
|
||||
const char** list;
|
||||
@ -873,7 +873,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP IPV4_Address_Field : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP IPV4_Address_Field : public NCursesFieldType
|
||||
{
|
||||
private:
|
||||
void set(NCursesFormField& f) {
|
||||
@ -896,7 +896,7 @@ extern "C" {
|
||||
// Abstract base class for User-Defined Fieldtypes
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP UserDefinedFieldType : public NCursesFieldType
|
||||
class NCURSES_CXX_IMPEXP UserDefinedFieldType : public NCursesFieldType
|
||||
{
|
||||
friend class UDF_Init; // Internal helper to set up statics
|
||||
private:
|
||||
@ -939,7 +939,7 @@ extern "C" {
|
||||
// Abstract base class for User-Defined Fieldtypes with Choice functions
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType
|
||||
class NCURSES_CXX_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType
|
||||
{
|
||||
friend class UDF_Init; // Internal helper to set up statics
|
||||
private:
|
||||
|
@ -32,7 +32,7 @@
|
||||
* Author: Juergen Pfeifer, 1997 *
|
||||
****************************************************************************/
|
||||
|
||||
// $Id: cursesm.h,v 1.33 2020/02/02 23:34:34 tom Exp $
|
||||
// $Id: cursesm.h,v 1.34 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
|
||||
#ifndef NCURSES_CURSESM_H_incl
|
||||
#define NCURSES_CURSESM_H_incl 1
|
||||
@ -47,7 +47,7 @@ extern "C" {
|
||||
// This wraps the ITEM type of <menu.h>
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP NCursesMenuItem
|
||||
class NCURSES_CXX_IMPEXP NCursesMenuItem
|
||||
{
|
||||
friend class NCursesMenu;
|
||||
|
||||
@ -153,7 +153,7 @@ typedef bool ITEMCALLBACK(NCursesMenuItem&);
|
||||
// If you don't like to create a child class for individual items to
|
||||
// overload action(), you may use this class and provide a callback
|
||||
// function pointer for items.
|
||||
class NCURSES_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem
|
||||
class NCURSES_CXX_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem
|
||||
{
|
||||
private:
|
||||
ITEMCALLBACK* p_fct;
|
||||
@ -200,7 +200,7 @@ extern "C" {
|
||||
// This wraps the MENU type of <menu.h>
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
class NCURSES_IMPEXP NCursesMenu : public NCursesPanel
|
||||
class NCURSES_CXX_IMPEXP NCursesMenu : public NCursesPanel
|
||||
{
|
||||
protected:
|
||||
MENU *menu;
|
||||
@ -596,7 +596,7 @@ public:
|
||||
// to create a UserItem.
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
template<class T> class NCURSES_IMPEXP NCursesUserItem : public NCursesMenuItem
|
||||
template<class T> class NCURSES_CXX_IMPEXP NCursesUserItem : public NCursesMenuItem
|
||||
{
|
||||
public:
|
||||
NCursesUserItem (const char* p_name,
|
||||
@ -623,7 +623,7 @@ public:
|
||||
// The same mechanism is used to attach user data to a menu
|
||||
// -------------------------------------------------------------------------
|
||||
//
|
||||
template<class T> class NCURSES_IMPEXP NCursesUserMenu : public NCursesMenu
|
||||
template<class T> class NCURSES_CXX_IMPEXP NCursesUserMenu : public NCursesMenu
|
||||
{
|
||||
protected:
|
||||
NCursesUserMenu( int nlines,
|
||||
|
@ -44,7 +44,7 @@
|
||||
#define CPP_HAS_TRY_CATCH 0
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: cursesmain.cc,v 1.18 2020/04/04 23:25:34 tom Exp $")
|
||||
MODULE_ID("$Id: cursesmain.cc,v 1.19 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
@ -60,7 +60,7 @@ MODULE_ID("$Id: cursesmain.cc,v 1.18 2020/04/04 23:25:34 tom Exp $")
|
||||
* You only have to instantiate a static NCursesApplication object in your
|
||||
* main application source file and link this module with your application.
|
||||
*/
|
||||
NCURSES_EXPORT(int) main(int argc, char* argv[])
|
||||
NCURSES_CXX_IMPEXP int main(int argc, char* argv[])
|
||||
{
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#ifndef NCURSES_CURSESP_H_incl
|
||||
#define NCURSES_CURSESP_H_incl 1
|
||||
|
||||
// $Id: cursesp.h,v 1.33 2020/02/02 23:34:34 tom Exp $
|
||||
// $Id: cursesp.h,v 1.34 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
|
||||
#include <cursesw.h>
|
||||
|
||||
@ -43,7 +43,7 @@ extern "C" {
|
||||
# include <panel.h>
|
||||
}
|
||||
|
||||
class NCURSES_IMPEXP NCursesPanel
|
||||
class NCURSES_CXX_IMPEXP NCursesPanel
|
||||
: public NCursesWindow
|
||||
{
|
||||
protected:
|
||||
|
@ -32,12 +32,23 @@
|
||||
#ifndef NCURSES_CURSESW_H_incl
|
||||
#define NCURSES_CURSESW_H_incl 1
|
||||
|
||||
// $Id: cursesw.h,v 1.56 2020/02/02 23:34:34 tom Exp $
|
||||
// $Id: cursesw.h,v 1.57 2020/07/04 20:38:43 tom Exp $
|
||||
|
||||
extern "C" {
|
||||
# include <curses.h>
|
||||
}
|
||||
|
||||
#if defined(BUILDING_NCURSES_CXX)
|
||||
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
||||
#else
|
||||
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
||||
#endif
|
||||
|
||||
#define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
||||
|
||||
#define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API
|
||||
#define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type
|
||||
|
||||
#include <etip.h>
|
||||
|
||||
/* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
|
||||
@ -757,7 +768,7 @@ extern "C" int _nc_ripoffline(int, int (*init)(WINDOW*, int));
|
||||
extern "C" int _nc_xx_ripoff_init(WINDOW *, int);
|
||||
extern "C" int _nc_has_mouse(void);
|
||||
|
||||
class NCURSES_IMPEXP NCursesWindow
|
||||
class NCURSES_CXX_IMPEXP NCursesWindow
|
||||
{
|
||||
friend class NCursesMenu;
|
||||
friend class NCursesForm;
|
||||
@ -1371,7 +1382,7 @@ public:
|
||||
// -------------------------------------------------------------------------
|
||||
// We leave this here for compatibility reasons.
|
||||
// -------------------------------------------------------------------------
|
||||
class NCURSES_IMPEXP NCursesColorWindow : public NCursesWindow
|
||||
class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow
|
||||
{
|
||||
public:
|
||||
NCursesColorWindow(WINDOW* &window) // useful only for stdscr
|
||||
@ -1417,7 +1428,7 @@ public:
|
||||
// Pad Support. We allow an association of a pad with a "real" window
|
||||
// through which the pad may be viewed.
|
||||
// -------------------------------------------------------------------------
|
||||
class NCURSES_IMPEXP NCursesPad : public NCursesWindow
|
||||
class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow
|
||||
{
|
||||
private:
|
||||
NCursesWindow* viewWin; // the "viewport" window
|
||||
@ -1533,7 +1544,7 @@ public:
|
||||
// A FramedPad is constructed always with a viewport window. This viewport
|
||||
// will be framed (by a box() command) and the interior of the box is the
|
||||
// viewport subwindow. On the frame we display scrollbar sliders.
|
||||
class NCURSES_IMPEXP NCursesFramedPad : public NCursesPad
|
||||
class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad
|
||||
{
|
||||
protected:
|
||||
virtual void OnOperation(int pad_req);
|
||||
|
@ -32,17 +32,17 @@
|
||||
* Author: Juergen Pfeifer, 1997 *
|
||||
****************************************************************************/
|
||||
|
||||
// $Id: cursslk.h,v 1.16 2020/02/29 15:46:00 anonymous.maarten Exp $
|
||||
// $Id: cursslk.h,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
|
||||
#ifndef NCURSES_CURSSLK_H_incl
|
||||
#define NCURSES_CURSSLK_H_incl
|
||||
|
||||
#include <cursesw.h>
|
||||
|
||||
class NCURSES_IMPEXP Soft_Label_Key_Set {
|
||||
class NCURSES_CXX_IMPEXP Soft_Label_Key_Set {
|
||||
public:
|
||||
// This inner class represents the attributes of a Soft Label Key (SLK)
|
||||
class NCURSES_IMPEXP Soft_Label_Key {
|
||||
class NCURSES_CXX_IMPEXP Soft_Label_Key {
|
||||
friend class Soft_Label_Key_Set;
|
||||
public:
|
||||
typedef enum { Left=0, Center=1, Right=2 } Justification;
|
||||
|
@ -36,7 +36,7 @@
|
||||
* Demo code for NCursesMenu and NCursesForm written by
|
||||
* Juergen Pfeifer
|
||||
*
|
||||
* $Id: demo.cc,v 1.45 2020/02/02 23:34:34 tom Exp $
|
||||
* $Id: demo.cc,v 1.46 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
@ -187,7 +187,7 @@ public:
|
||||
};
|
||||
|
||||
template class MyAction<UserData>;
|
||||
template class NCURSES_IMPEXP NCursesUserItem<UserData>;
|
||||
template class NCURSES_CXX_IMPEXP NCursesUserItem<UserData>;
|
||||
|
||||
class QuitItem : public NCursesMenuItem
|
||||
{
|
||||
|
@ -32,7 +32,7 @@
|
||||
* Author: Juergen Pfeifer, 1997 *
|
||||
****************************************************************************/
|
||||
|
||||
// $Id: etip.h.in,v 1.44 2020/02/29 15:46:00 anonymous.maarten Exp $
|
||||
// $Id: etip.h.in,v 1.45 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
|
||||
#ifndef NCURSES_ETIP_H_incl
|
||||
#define NCURSES_ETIP_H_incl 1
|
||||
@ -140,11 +140,11 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// Forward Declarations
|
||||
class NCURSES_IMPEXP NCursesPanel;
|
||||
class NCURSES_IMPEXP NCursesMenu;
|
||||
class NCURSES_IMPEXP NCursesForm;
|
||||
class NCURSES_CXX_IMPEXP NCursesPanel;
|
||||
class NCURSES_CXX_IMPEXP NCursesMenu;
|
||||
class NCURSES_CXX_IMPEXP NCursesForm;
|
||||
|
||||
class NCURSES_IMPEXP NCursesException
|
||||
class NCURSES_CXX_IMPEXP NCursesException
|
||||
{
|
||||
public:
|
||||
const char *message;
|
||||
@ -178,7 +178,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP NCursesPanelException : public NCursesException
|
||||
class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException
|
||||
{
|
||||
public:
|
||||
const NCursesPanel* p;
|
||||
@ -229,7 +229,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP NCursesMenuException : public NCursesException
|
||||
class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException
|
||||
{
|
||||
public:
|
||||
const NCursesMenu* m;
|
||||
@ -280,7 +280,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NCURSES_IMPEXP NCursesFormException : public NCursesException
|
||||
class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException
|
||||
{
|
||||
public:
|
||||
const NCursesForm* f;
|
||||
|
2
configure
vendored
2
configure
vendored
@ -24971,7 +24971,7 @@ test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
|
||||
echo "$as_me:24971: checking if GNAT supports generics" >&5
|
||||
echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
|
||||
case $cf_cv_gnat_version in
|
||||
(3.[1-9]*|[4-9].*|[1-9][0-9].*)
|
||||
(3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
(*)
|
||||
|
4
dist.mk
4
dist.mk
@ -26,7 +26,7 @@
|
||||
# use or other dealings in this Software without prior written #
|
||||
# authorization. #
|
||||
##############################################################################
|
||||
# $Id: dist.mk,v 1.1358 2020/06/27 11:12:35 tom Exp $
|
||||
# $Id: dist.mk,v 1.1359 2020/07/04 13:08:52 tom Exp $
|
||||
# Makefile for creating ncurses distributions.
|
||||
#
|
||||
# This only needs to be used directly as a makefile by developers, but
|
||||
@ -38,7 +38,7 @@ SHELL = /bin/sh
|
||||
# These define the major/minor/patch versions of ncurses.
|
||||
NCURSES_MAJOR = 6
|
||||
NCURSES_MINOR = 2
|
||||
NCURSES_PATCH = 20200627
|
||||
NCURSES_PATCH = 20200704
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.in,v 1.67 2020/02/22 16:32:11 tom Exp $
|
||||
# $Id: Makefile.in,v 1.68 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
##############################################################################
|
||||
# Copyright 2020 Thomas E. Dickey #
|
||||
# Copyright 1998-2015,2018 Free Software Foundation, Inc. #
|
||||
@ -94,12 +94,12 @@ CFLAGS = @CFLAGS@
|
||||
|
||||
INCDIR = $(top_srcdir)/include
|
||||
BASE_DIR = $(top_srcdir)/ncurses
|
||||
CPPFLAGS = -I$(BASE_DIR) -DHAVE_CONFIG_H @CPPFLAGS@
|
||||
CPPFLAGS = -I$(BASE_DIR) -DHAVE_CONFIG_H -DBUILDING_FORM @CPPFLAGS@
|
||||
|
||||
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS)
|
||||
CFLAGS_NORMAL = $(CCFLAGS)
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
|
||||
CFLAGS_PROFILE = $(CCFLAGS) -pg
|
||||
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
|
||||
|
@ -33,37 +33,37 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: f_trace.c,v 1.5 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: f_trace.c,v 1.6 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
NCURSES_EXPORT(FIELD **)
|
||||
FORM_EXPORT(FIELD **)
|
||||
_nc_retrace_field_ptr(FIELD **code)
|
||||
{
|
||||
T((T_RETURN("%p"), (void *)code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(FIELD *)
|
||||
FORM_EXPORT(FIELD *)
|
||||
_nc_retrace_field(FIELD *code)
|
||||
{
|
||||
T((T_RETURN("%p"), (void *)code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_retrace_field_type(FIELDTYPE *code)
|
||||
{
|
||||
T((T_RETURN("%p"), (void *)code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(FORM *)
|
||||
FORM_EXPORT(FORM *)
|
||||
_nc_retrace_form(FORM *code)
|
||||
{
|
||||
T((T_RETURN("%p"), (void *)code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(Form_Hook)
|
||||
FORM_EXPORT(Form_Hook)
|
||||
_nc_retrace_form_hook(Form_Hook code)
|
||||
{
|
||||
TR_FUNC_BFR(1);
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_arg.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_arg.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -61,7 +61,7 @@ MODULE_ID("$Id: fld_arg.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid argument
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_fieldtype_arg(FIELDTYPE *typ,
|
||||
void *(*const make_arg)(va_list *),
|
||||
void *(*const copy_arg)(const void *),
|
||||
@ -94,7 +94,7 @@ set_fieldtype_arg(FIELDTYPE *typ,
|
||||
|
|
||||
| Return Values : Pointer to structure or NULL if none is defined.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void *)
|
||||
FORM_EXPORT(void *)
|
||||
field_arg(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_arg(%p)"), (const void *)field));
|
||||
|
@ -33,14 +33,14 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_attr.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_attr.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Field-Attribute manipulation routines
|
||||
--------------------------------------------------------------------------*/
|
||||
/* "Template" macro to generate a function to set a fields attribute */
|
||||
#define GEN_FIELD_ATTR_SET_FCT( name ) \
|
||||
NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
|
||||
FORM_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
|
||||
{\
|
||||
int res = E_BAD_ARGUMENT;\
|
||||
T((T_CALLED("set_field_" #name "(%p,%s)"), (void *)field, _traceattr(attr)));\
|
||||
@ -65,7 +65,7 @@ NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
|
||||
|
||||
/* "Template" macro to generate a function to get a fields attribute */
|
||||
#define GEN_FIELD_ATTR_GET_FCT( name ) \
|
||||
NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\
|
||||
FORM_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\
|
||||
{\
|
||||
T((T_CALLED("field_" #name "(%p)"), (const void *) field));\
|
||||
returnAttr( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_current.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_current.c,v 1.16 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_current.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_INVALID_FIELD - current field can't be left
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_current_field(FORM *form, FIELD *field)
|
||||
{
|
||||
int err = E_OK;
|
||||
@ -113,7 +113,7 @@ set_current_field(FORM *form, FIELD *field)
|
||||
| E_BAD_ARGUMENT - invalid form pointer
|
||||
| E_REQUEST_DENIED - there is no current field to unfocus
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
unfocus_current_field(FORM *const form)
|
||||
{
|
||||
T((T_CALLED("unfocus_current_field(%p)"), (const void *)form));
|
||||
@ -137,7 +137,7 @@ unfocus_current_field(FORM *const form)
|
||||
|
|
||||
| Return Values : Pointer to the current field.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELD *)
|
||||
FORM_EXPORT(FIELD *)
|
||||
current_field(const FORM *form)
|
||||
{
|
||||
T((T_CALLED("current_field(%p)"), (const void *)form));
|
||||
@ -154,7 +154,7 @@ current_field(const FORM *form)
|
||||
| Return Values : >= 0 : field index
|
||||
| -1 : fieldpointer invalid or field not connected
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
field_index(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_index(%p)"), (const void *)field));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_def.c,v 1.42 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_def.c,v 1.43 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/* this can't be readonly */
|
||||
static FIELD default_field =
|
||||
@ -66,7 +66,7 @@ static FIELD default_field =
|
||||
NCURSES_FIELD_EXTENSION
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
|
||||
FORM_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -82,7 +82,7 @@ NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
|
||||
| Return Values : Pointer to argument structure. Maybe NULL.
|
||||
| In case of an error in *err an error counter is increased.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(TypeArgument *)
|
||||
FORM_EXPORT(TypeArgument *)
|
||||
_nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
|
||||
{
|
||||
TypeArgument *res = (TypeArgument *)0;
|
||||
@ -130,7 +130,7 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
|
||||
| Return Values : Pointer to argument structure. Maybe NULL.
|
||||
| In case of an error in *err an error counter is increased.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(TypeArgument *)
|
||||
FORM_EXPORT(TypeArgument *)
|
||||
_nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err)
|
||||
{
|
||||
TypeArgument *res = (TypeArgument *)0;
|
||||
@ -179,7 +179,7 @@ _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
FORM_EXPORT(void)
|
||||
_nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp)
|
||||
{
|
||||
if (typ != 0 && (typ->status & _HAS_ARGS) != 0)
|
||||
@ -212,7 +212,7 @@ _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp)
|
||||
| Return Values : TRUE - copy worked
|
||||
| FALSE - error occurred
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
FORM_EXPORT(bool)
|
||||
_nc_Copy_Type(FIELD *dst, FIELD const *src)
|
||||
{
|
||||
int err = 0;
|
||||
@ -247,7 +247,7 @@ _nc_Copy_Type(FIELD *dst, FIELD const *src)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
FORM_EXPORT(void)
|
||||
_nc_Free_Type(FIELD *field)
|
||||
{
|
||||
assert(field != 0);
|
||||
@ -274,7 +274,7 @@ _nc_Free_Type(FIELD *field)
|
||||
|
|
||||
| Return Values : Pointer to the new field or NULL if failure.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELD *)
|
||||
FORM_EXPORT(FIELD *)
|
||||
new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
|
||||
{
|
||||
static const FIELD_CELL blank = BLANK;
|
||||
@ -354,7 +354,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
|
||||
| E_BAD_ARGUMENT - invalid field pointer
|
||||
| E_CONNECTED - field is connected
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
free_field(FIELD *field)
|
||||
{
|
||||
T((T_CALLED("free_field(%p)"), (void *)field));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_dup.c,v 1.17 2020/03/29 00:39:41 tom Exp $")
|
||||
MODULE_ID("$Id: fld_dup.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_dup.c,v 1.17 2020/03/29 00:39:41 tom Exp $")
|
||||
|
|
||||
| Return Values : Pointer to the new field or NULL if failure
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELD *)
|
||||
FORM_EXPORT(FIELD *)
|
||||
dup_field(FIELD *field, int frow, int fcol)
|
||||
{
|
||||
FIELD *New_Field = (FIELD *)0;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_ftchoice.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_ftchoice.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_ftchoice.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid arguments
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_fieldtype_choice(FIELDTYPE *typ,
|
||||
bool (*const next_choice) (FIELD *, const void *),
|
||||
bool (*const prev_choice) (FIELD *, const void *))
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_ftlink.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_ftlink.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_ftlink.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : Fieldtype pointer or NULL if error occurred.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2)
|
||||
{
|
||||
FIELDTYPE *nftyp = (FIELDTYPE *)0;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_info.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_info.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_info.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid field pointer
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
field_info(const FIELD *field,
|
||||
int *rows, int *cols,
|
||||
int *frow, int *fcol,
|
||||
@ -89,7 +89,7 @@ field_info(const FIELD *field,
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid argument
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
dynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow)
|
||||
{
|
||||
T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"),
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_just.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_just.c,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_just.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - one of the arguments was incorrect
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_field_just(FIELD *field, int just)
|
||||
{
|
||||
int res = E_BAD_ARGUMENT;
|
||||
@ -77,7 +77,7 @@ set_field_just(FIELD *field, int just)
|
||||
|
|
||||
| Return Values : The justification type.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
field_just(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_just(%p)"), (const void *)field));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_link.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_link.c,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_link.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : Pointer to the new field or NULL if failure
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELD *)
|
||||
FORM_EXPORT(FIELD *)
|
||||
link_field(FIELD *field, int frow, int fcol)
|
||||
{
|
||||
FIELD *New_Field = (FIELD *)0;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_max.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_max.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_max.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid argument
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_max_field(FIELD *field, int maxgrow)
|
||||
{
|
||||
T((T_CALLED("set_max_field(%p,%d)"), (void *)field, maxgrow));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_move.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - invalid argument passed
|
||||
| E_CONNECTED - field is connected
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
move_field(FIELD *field, int frow, int fcol)
|
||||
{
|
||||
T((T_CALLED("move_field(%p,%d,%d)"), (void *)field, frow, fcol));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_newftyp.c,v 1.22 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_newftyp.c,v 1.23 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
static FIELDTYPE default_fieldtype =
|
||||
{
|
||||
@ -53,7 +53,7 @@ static FIELDTYPE default_fieldtype =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE *)
|
||||
FORM_EXPORT_VAR(FIELDTYPE *)
|
||||
_nc_Default_FieldType = &default_fieldtype;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
@ -71,7 +71,7 @@ NCURSES_EXPORT_VAR(FIELDTYPE *)
|
||||
|
|
||||
| Return Values : Fieldtype pointer or NULL if error occurred
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
new_fieldtype(bool (*const field_check) (FIELD *, const void *),
|
||||
bool (*const char_check) (int, const void *))
|
||||
{
|
||||
@ -121,7 +121,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *),
|
||||
| E_CONNECTED - there are fields referencing the type
|
||||
| E_BAD_ARGUMENT - invalid fieldtype pointer
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
free_fieldtype(FIELDTYPE *typ)
|
||||
{
|
||||
T((T_CALLED("free_fieldtype(%p)"), (void *)typ));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_opts.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_opts.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Field-Options manipulation routines
|
||||
@ -51,7 +51,7 @@ MODULE_ID("$Id: fld_opts.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_field_opts(FIELD *field, Field_Options opts)
|
||||
{
|
||||
int res = E_BAD_ARGUMENT;
|
||||
@ -72,7 +72,7 @@ set_field_opts(FIELD *field, Field_Options opts)
|
||||
|
|
||||
| Return Values : The options.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(Field_Options)
|
||||
FORM_EXPORT(Field_Options)
|
||||
field_opts(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_opts(%p)"), (const void *)field));
|
||||
@ -92,7 +92,7 @@ field_opts(const FIELD *field)
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
field_opts_on(FIELD *field, Field_Options opts)
|
||||
{
|
||||
int res = E_BAD_ARGUMENT;
|
||||
@ -120,7 +120,7 @@ field_opts_on(FIELD *field, Field_Options opts)
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
field_opts_off(FIELD *field, Field_Options opts)
|
||||
{
|
||||
int res = E_BAD_ARGUMENT;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_pad.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_pad.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_pad.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - invalid field pointer or pad character
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_field_pad(FIELD *field, int ch)
|
||||
{
|
||||
int res = E_BAD_ARGUMENT;
|
||||
@ -75,7 +75,7 @@ set_field_pad(FIELD *field, int ch)
|
||||
|
|
||||
| Return Values : The pad character.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
field_pad(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_pad(%p)"), (const void *)field));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_page.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_CONNECTED - field is connected
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_new_page(FIELD *field, bool new_page_flag)
|
||||
{
|
||||
T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag));
|
||||
@ -72,7 +72,7 @@ set_new_page(FIELD *field, bool new_page_flag)
|
||||
| Return Values : TRUE - field starts a new page
|
||||
| FALSE - field doesn't start a new page
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
FORM_EXPORT(bool)
|
||||
new_page(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("new_page(%p)"), (const void *)field));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_stat.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_stat.c,v 1.16 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -44,7 +44,7 @@ MODULE_ID("$Id: fld_stat.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_field_status(FIELD *field, bool status)
|
||||
{
|
||||
T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
|
||||
@ -69,7 +69,7 @@ set_field_status(FIELD *field, bool status)
|
||||
| Return Values : TRUE - buffer has been changed
|
||||
| FALSE - buffer has not been changed
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
FORM_EXPORT(bool)
|
||||
field_status(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_status(%p)"), (const void *)field));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_type.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_type.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_type.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_field_type(FIELD *field, FIELDTYPE *type,...)
|
||||
{
|
||||
va_list ap;
|
||||
@ -88,7 +88,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...)
|
||||
|
|
||||
| Return Values : Pointer to fieldtype of NULL if none is defined.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
field_type(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_type(%p)"), (const void *)field));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fld_user.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fld_user.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -44,7 +44,7 @@ MODULE_ID("$Id: fld_user.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : E_OK - on success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_field_userptr(FIELD *field, void *usrptr)
|
||||
{
|
||||
T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr));
|
||||
@ -63,7 +63,7 @@ set_field_userptr(FIELD *field, void *usrptr)
|
||||
| Return Values : Value of pointer. If no such pointer has been set,
|
||||
| NULL is returned
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void *)
|
||||
FORM_EXPORT(void *)
|
||||
field_userptr(const FIELD *field)
|
||||
{
|
||||
T((T_CALLED("field_userptr(%p)"), (const void *)field));
|
||||
|
179
form/form.h
179
form/form.h
@ -31,7 +31,7 @@
|
||||
* Author: Juergen Pfeifer, 1995,1997 *
|
||||
****************************************************************************/
|
||||
|
||||
/* $Id: form.h,v 0.30 2020/02/02 23:34:34 tom Exp $ */
|
||||
/* $Id: form.h,v 0.31 2020/07/04 20:38:43 tom Exp $ */
|
||||
|
||||
#ifndef FORM_H
|
||||
#define FORM_H
|
||||
@ -44,6 +44,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(BUILDING_FORM)
|
||||
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
||||
#else
|
||||
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
||||
#endif
|
||||
|
||||
#define FORM_WRAPPED_VAR(type,name) extern FORM_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
||||
|
||||
#define FORM_EXPORT(type) FORM_IMPEXP type NCURSES_API
|
||||
#define FORM_EXPORT_VAR(type) FORM_IMPEXP type
|
||||
|
||||
#ifndef FORM_PRIV_H
|
||||
typedef void *FIELD_CELL;
|
||||
#endif
|
||||
@ -309,136 +320,136 @@ typedef void (*Form_Hook)(FORM *);
|
||||
/*************************
|
||||
* standard field types *
|
||||
*************************/
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
|
||||
|
||||
/************************************
|
||||
* built-in additional field types *
|
||||
* They are not defined in SVr4 *
|
||||
************************************/
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
|
||||
|
||||
/***********************
|
||||
* FIELDTYPE routines *
|
||||
***********************/
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) new_fieldtype (
|
||||
extern FORM_EXPORT(FIELDTYPE *) new_fieldtype (
|
||||
bool (* const field_check)(FIELD *,const void *),
|
||||
bool (* const char_check)(int,const void *));
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) link_fieldtype(
|
||||
extern FORM_EXPORT(FIELDTYPE *) link_fieldtype(
|
||||
FIELDTYPE *, FIELDTYPE *);
|
||||
|
||||
extern NCURSES_EXPORT(int) free_fieldtype (FIELDTYPE *);
|
||||
extern NCURSES_EXPORT(int) set_fieldtype_arg (FIELDTYPE *,
|
||||
extern FORM_EXPORT(int) free_fieldtype (FIELDTYPE *);
|
||||
extern FORM_EXPORT(int) set_fieldtype_arg (FIELDTYPE *,
|
||||
void * (* const make_arg)(va_list *),
|
||||
void * (* const copy_arg)(const void *),
|
||||
void (* const free_arg)(void *));
|
||||
extern NCURSES_EXPORT(int) set_fieldtype_choice (FIELDTYPE *,
|
||||
extern FORM_EXPORT(int) set_fieldtype_choice (FIELDTYPE *,
|
||||
bool (* const next_choice)(FIELD *,const void *),
|
||||
bool (* const prev_choice)(FIELD *,const void *));
|
||||
|
||||
/*******************
|
||||
* FIELD routines *
|
||||
*******************/
|
||||
extern NCURSES_EXPORT(FIELD *) new_field (int,int,int,int,int,int);
|
||||
extern NCURSES_EXPORT(FIELD *) dup_field (FIELD *,int,int);
|
||||
extern NCURSES_EXPORT(FIELD *) link_field (FIELD *,int,int);
|
||||
extern FORM_EXPORT(FIELD *) new_field (int,int,int,int,int,int);
|
||||
extern FORM_EXPORT(FIELD *) dup_field (FIELD *,int,int);
|
||||
extern FORM_EXPORT(FIELD *) link_field (FIELD *,int,int);
|
||||
|
||||
extern NCURSES_EXPORT(int) free_field (FIELD *);
|
||||
extern NCURSES_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *);
|
||||
extern NCURSES_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *);
|
||||
extern NCURSES_EXPORT(int) set_max_field ( FIELD *,int);
|
||||
extern NCURSES_EXPORT(int) move_field (FIELD *,int,int);
|
||||
extern NCURSES_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...);
|
||||
extern NCURSES_EXPORT(int) set_new_page (FIELD *,bool);
|
||||
extern NCURSES_EXPORT(int) set_field_just (FIELD *,int);
|
||||
extern NCURSES_EXPORT(int) field_just (const FIELD *);
|
||||
extern NCURSES_EXPORT(int) set_field_fore (FIELD *,chtype);
|
||||
extern NCURSES_EXPORT(int) set_field_back (FIELD *,chtype);
|
||||
extern NCURSES_EXPORT(int) set_field_pad (FIELD *,int);
|
||||
extern NCURSES_EXPORT(int) field_pad (const FIELD *);
|
||||
extern NCURSES_EXPORT(int) set_field_buffer (FIELD *,int,const char *);
|
||||
extern NCURSES_EXPORT(int) set_field_status (FIELD *,bool);
|
||||
extern NCURSES_EXPORT(int) set_field_userptr (FIELD *, void *);
|
||||
extern NCURSES_EXPORT(int) set_field_opts (FIELD *,Field_Options);
|
||||
extern NCURSES_EXPORT(int) field_opts_on (FIELD *,Field_Options);
|
||||
extern NCURSES_EXPORT(int) field_opts_off (FIELD *,Field_Options);
|
||||
extern FORM_EXPORT(int) free_field (FIELD *);
|
||||
extern FORM_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *);
|
||||
extern FORM_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *);
|
||||
extern FORM_EXPORT(int) set_max_field ( FIELD *,int);
|
||||
extern FORM_EXPORT(int) move_field (FIELD *,int,int);
|
||||
extern FORM_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...);
|
||||
extern FORM_EXPORT(int) set_new_page (FIELD *,bool);
|
||||
extern FORM_EXPORT(int) set_field_just (FIELD *,int);
|
||||
extern FORM_EXPORT(int) field_just (const FIELD *);
|
||||
extern FORM_EXPORT(int) set_field_fore (FIELD *,chtype);
|
||||
extern FORM_EXPORT(int) set_field_back (FIELD *,chtype);
|
||||
extern FORM_EXPORT(int) set_field_pad (FIELD *,int);
|
||||
extern FORM_EXPORT(int) field_pad (const FIELD *);
|
||||
extern FORM_EXPORT(int) set_field_buffer (FIELD *,int,const char *);
|
||||
extern FORM_EXPORT(int) set_field_status (FIELD *,bool);
|
||||
extern FORM_EXPORT(int) set_field_userptr (FIELD *, void *);
|
||||
extern FORM_EXPORT(int) set_field_opts (FIELD *,Field_Options);
|
||||
extern FORM_EXPORT(int) field_opts_on (FIELD *,Field_Options);
|
||||
extern FORM_EXPORT(int) field_opts_off (FIELD *,Field_Options);
|
||||
|
||||
extern NCURSES_EXPORT(chtype) field_fore (const FIELD *);
|
||||
extern NCURSES_EXPORT(chtype) field_back (const FIELD *);
|
||||
extern FORM_EXPORT(chtype) field_fore (const FIELD *);
|
||||
extern FORM_EXPORT(chtype) field_back (const FIELD *);
|
||||
|
||||
extern NCURSES_EXPORT(bool) new_page (const FIELD *);
|
||||
extern NCURSES_EXPORT(bool) field_status (const FIELD *);
|
||||
extern FORM_EXPORT(bool) new_page (const FIELD *);
|
||||
extern FORM_EXPORT(bool) field_status (const FIELD *);
|
||||
|
||||
extern NCURSES_EXPORT(void *) field_arg (const FIELD *);
|
||||
extern FORM_EXPORT(void *) field_arg (const FIELD *);
|
||||
|
||||
extern NCURSES_EXPORT(void *) field_userptr (const FIELD *);
|
||||
extern FORM_EXPORT(void *) field_userptr (const FIELD *);
|
||||
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) field_type (const FIELD *);
|
||||
extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *);
|
||||
|
||||
extern NCURSES_EXPORT(char *) field_buffer (const FIELD *,int);
|
||||
extern FORM_EXPORT(char *) field_buffer (const FIELD *,int);
|
||||
|
||||
extern NCURSES_EXPORT(Field_Options) field_opts (const FIELD *);
|
||||
extern FORM_EXPORT(Field_Options) field_opts (const FIELD *);
|
||||
|
||||
/******************
|
||||
* FORM routines *
|
||||
******************/
|
||||
|
||||
extern NCURSES_EXPORT(FORM *) new_form (FIELD **);
|
||||
extern FORM_EXPORT(FORM *) new_form (FIELD **);
|
||||
|
||||
extern NCURSES_EXPORT(FIELD **) form_fields (const FORM *);
|
||||
extern NCURSES_EXPORT(FIELD *) current_field (const FORM *);
|
||||
extern FORM_EXPORT(FIELD **) form_fields (const FORM *);
|
||||
extern FORM_EXPORT(FIELD *) current_field (const FORM *);
|
||||
|
||||
extern NCURSES_EXPORT(WINDOW *) form_win (const FORM *);
|
||||
extern NCURSES_EXPORT(WINDOW *) form_sub (const FORM *);
|
||||
extern FORM_EXPORT(WINDOW *) form_win (const FORM *);
|
||||
extern FORM_EXPORT(WINDOW *) form_sub (const FORM *);
|
||||
|
||||
extern NCURSES_EXPORT(Form_Hook) form_init (const FORM *);
|
||||
extern NCURSES_EXPORT(Form_Hook) form_term (const FORM *);
|
||||
extern NCURSES_EXPORT(Form_Hook) field_init (const FORM *);
|
||||
extern NCURSES_EXPORT(Form_Hook) field_term (const FORM *);
|
||||
extern FORM_EXPORT(Form_Hook) form_init (const FORM *);
|
||||
extern FORM_EXPORT(Form_Hook) form_term (const FORM *);
|
||||
extern FORM_EXPORT(Form_Hook) field_init (const FORM *);
|
||||
extern FORM_EXPORT(Form_Hook) field_term (const FORM *);
|
||||
|
||||
extern NCURSES_EXPORT(int) free_form (FORM *);
|
||||
extern NCURSES_EXPORT(int) set_form_fields (FORM *,FIELD **);
|
||||
extern NCURSES_EXPORT(int) field_count (const FORM *);
|
||||
extern NCURSES_EXPORT(int) set_form_win (FORM *,WINDOW *);
|
||||
extern NCURSES_EXPORT(int) set_form_sub (FORM *,WINDOW *);
|
||||
extern NCURSES_EXPORT(int) set_current_field (FORM *,FIELD *);
|
||||
extern NCURSES_EXPORT(int) unfocus_current_field (FORM *);
|
||||
extern NCURSES_EXPORT(int) field_index (const FIELD *);
|
||||
extern NCURSES_EXPORT(int) set_form_page (FORM *,int);
|
||||
extern NCURSES_EXPORT(int) form_page (const FORM *);
|
||||
extern NCURSES_EXPORT(int) scale_form (const FORM *,int *,int *);
|
||||
extern NCURSES_EXPORT(int) set_form_init (FORM *,Form_Hook);
|
||||
extern NCURSES_EXPORT(int) set_form_term (FORM *,Form_Hook);
|
||||
extern NCURSES_EXPORT(int) set_field_init (FORM *,Form_Hook);
|
||||
extern NCURSES_EXPORT(int) set_field_term (FORM *,Form_Hook);
|
||||
extern NCURSES_EXPORT(int) post_form (FORM *);
|
||||
extern NCURSES_EXPORT(int) unpost_form (FORM *);
|
||||
extern NCURSES_EXPORT(int) pos_form_cursor (FORM *);
|
||||
extern NCURSES_EXPORT(int) form_driver (FORM *,int);
|
||||
extern FORM_EXPORT(int) free_form (FORM *);
|
||||
extern FORM_EXPORT(int) set_form_fields (FORM *,FIELD **);
|
||||
extern FORM_EXPORT(int) field_count (const FORM *);
|
||||
extern FORM_EXPORT(int) set_form_win (FORM *,WINDOW *);
|
||||
extern FORM_EXPORT(int) set_form_sub (FORM *,WINDOW *);
|
||||
extern FORM_EXPORT(int) set_current_field (FORM *,FIELD *);
|
||||
extern FORM_EXPORT(int) unfocus_current_field (FORM *);
|
||||
extern FORM_EXPORT(int) field_index (const FIELD *);
|
||||
extern FORM_EXPORT(int) set_form_page (FORM *,int);
|
||||
extern FORM_EXPORT(int) form_page (const FORM *);
|
||||
extern FORM_EXPORT(int) scale_form (const FORM *,int *,int *);
|
||||
extern FORM_EXPORT(int) set_form_init (FORM *,Form_Hook);
|
||||
extern FORM_EXPORT(int) set_form_term (FORM *,Form_Hook);
|
||||
extern FORM_EXPORT(int) set_field_init (FORM *,Form_Hook);
|
||||
extern FORM_EXPORT(int) set_field_term (FORM *,Form_Hook);
|
||||
extern FORM_EXPORT(int) post_form (FORM *);
|
||||
extern FORM_EXPORT(int) unpost_form (FORM *);
|
||||
extern FORM_EXPORT(int) pos_form_cursor (FORM *);
|
||||
extern FORM_EXPORT(int) form_driver (FORM *,int);
|
||||
# if NCURSES_WIDECHAR
|
||||
extern NCURSES_EXPORT(int) form_driver_w (FORM *,int,wchar_t);
|
||||
extern FORM_EXPORT(int) form_driver_w (FORM *,int,wchar_t);
|
||||
# endif
|
||||
extern NCURSES_EXPORT(int) set_form_userptr (FORM *,void *);
|
||||
extern NCURSES_EXPORT(int) set_form_opts (FORM *,Form_Options);
|
||||
extern NCURSES_EXPORT(int) form_opts_on (FORM *,Form_Options);
|
||||
extern NCURSES_EXPORT(int) form_opts_off (FORM *,Form_Options);
|
||||
extern NCURSES_EXPORT(int) form_request_by_name (const char *);
|
||||
extern FORM_EXPORT(int) set_form_userptr (FORM *,void *);
|
||||
extern FORM_EXPORT(int) set_form_opts (FORM *,Form_Options);
|
||||
extern FORM_EXPORT(int) form_opts_on (FORM *,Form_Options);
|
||||
extern FORM_EXPORT(int) form_opts_off (FORM *,Form_Options);
|
||||
extern FORM_EXPORT(int) form_request_by_name (const char *);
|
||||
|
||||
extern NCURSES_EXPORT(const char *) form_request_name (int);
|
||||
extern FORM_EXPORT(const char *) form_request_name (int);
|
||||
|
||||
extern NCURSES_EXPORT(void *) form_userptr (const FORM *);
|
||||
extern FORM_EXPORT(void *) form_userptr (const FORM *);
|
||||
|
||||
extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *);
|
||||
extern FORM_EXPORT(Form_Options) form_opts (const FORM *);
|
||||
|
||||
extern NCURSES_EXPORT(bool) data_ahead (const FORM *);
|
||||
extern NCURSES_EXPORT(bool) data_behind (const FORM *);
|
||||
extern FORM_EXPORT(bool) data_ahead (const FORM *);
|
||||
extern FORM_EXPORT(bool) data_behind (const FORM *);
|
||||
|
||||
#if NCURSES_SP_FUNCS
|
||||
extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
|
||||
extern FORM_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -31,7 +31,7 @@
|
||||
* Author: Juergen Pfeifer, 1995,1997 *
|
||||
****************************************************************************/
|
||||
|
||||
/* $Id: form.priv.h,v 0.45 2020/02/02 23:34:34 tom Exp $ */
|
||||
/* $Id: form.priv.h,v 0.46 2020/05/24 01:40:20 anonymous.maarten Exp $ */
|
||||
|
||||
#ifndef FORM_PRIV_H
|
||||
#define FORM_PRIV_H 1
|
||||
@ -69,9 +69,9 @@
|
||||
/***********************
|
||||
* Default objects *
|
||||
***********************/
|
||||
extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form;
|
||||
extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field;
|
||||
extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
|
||||
extern FORM_EXPORT_VAR(FORM *) _nc_Default_Form;
|
||||
extern FORM_EXPORT_VAR(FIELD *) _nc_Default_Field;
|
||||
extern FORM_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
|
||||
|
||||
/* form status values */
|
||||
#define _OVLMODE (0x04U) /* Form is in overlay mode */
|
||||
@ -176,32 +176,32 @@ TypeArgument;
|
||||
|
||||
#define C_ZEROS '\0'
|
||||
|
||||
extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*);
|
||||
extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*);
|
||||
extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*);
|
||||
extern NCURSES_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *);
|
||||
extern NCURSES_EXPORT(void) _nc_Free_Type (FIELD *);
|
||||
extern FORM_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*);
|
||||
extern FORM_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*);
|
||||
extern FORM_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*);
|
||||
extern FORM_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *);
|
||||
extern FORM_EXPORT(void) _nc_Free_Type (FIELD *);
|
||||
|
||||
extern NCURSES_EXPORT(int) _nc_Synchronize_Attributes (FIELD*);
|
||||
extern NCURSES_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options);
|
||||
extern NCURSES_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*);
|
||||
extern NCURSES_EXPORT(int) _nc_Refresh_Current_Field (FORM*);
|
||||
extern NCURSES_EXPORT(FIELD *) _nc_First_Active_Field (FORM*);
|
||||
extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*);
|
||||
extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*);
|
||||
extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*);
|
||||
extern NCURSES_EXPORT(void) _nc_Unset_Current_Field(FORM *form);
|
||||
extern FORM_EXPORT(int) _nc_Synchronize_Attributes (FIELD*);
|
||||
extern FORM_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options);
|
||||
extern FORM_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*);
|
||||
extern FORM_EXPORT(int) _nc_Refresh_Current_Field (FORM*);
|
||||
extern FORM_EXPORT(FIELD *) _nc_First_Active_Field (FORM*);
|
||||
extern FORM_EXPORT(bool) _nc_Internal_Validation (FORM*);
|
||||
extern FORM_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*);
|
||||
extern FORM_EXPORT(int) _nc_Position_Form_Cursor (FORM*);
|
||||
extern FORM_EXPORT(void) _nc_Unset_Current_Field(FORM *form);
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void);
|
||||
|
||||
extern NCURSES_EXPORT(FIELDTYPE *)
|
||||
extern FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_generic_fieldtype(bool (*const field_check) (FORM*,
|
||||
FIELD *,
|
||||
const void *),
|
||||
@ -212,18 +212,18 @@ _nc_generic_fieldtype(bool (*const field_check) (FORM*,
|
||||
bool (*const next)(FORM*,FIELD*,const void*),
|
||||
bool (*const prev)(FORM*,FIELD*,const void*),
|
||||
void (*freecallback)(void*));
|
||||
extern NCURSES_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**));
|
||||
extern NCURSES_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* );
|
||||
extern FORM_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**));
|
||||
extern FORM_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* );
|
||||
|
||||
#define INIT_FT_FUNC(func) {func}
|
||||
#else
|
||||
#define INIT_FT_FUNC(func) func
|
||||
#endif
|
||||
|
||||
extern NCURSES_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*);
|
||||
extern FORM_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*);
|
||||
|
||||
#if USE_WIDEC_SUPPORT
|
||||
extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
|
||||
extern FORM_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
|
||||
#endif
|
||||
|
||||
#ifdef TRACE
|
||||
@ -234,11 +234,11 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
|
||||
#define returnFieldType(code) TRACE_RETURN1(code,field_type)
|
||||
#define returnFormHook(code) TRACE_RETURN1(code,form_hook)
|
||||
|
||||
extern NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **);
|
||||
extern NCURSES_EXPORT(FIELD *) _nc_retrace_field (FIELD *);
|
||||
extern NCURSES_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *);
|
||||
extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *);
|
||||
extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook);
|
||||
extern FORM_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **);
|
||||
extern FORM_EXPORT(FIELD *) _nc_retrace_field (FIELD *);
|
||||
extern FORM_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *);
|
||||
extern FORM_EXPORT(FORM *) _nc_retrace_form (FORM *);
|
||||
extern FORM_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook);
|
||||
|
||||
#else /* !TRACE */
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_cursor.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_cursor.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: frm_cursor.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - Invalid form pointer
|
||||
| E_NOT_POSTED - Form is not posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
pos_form_cursor(FORM *form)
|
||||
{
|
||||
int res;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_data.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_data.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_data.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : TRUE - there are off-screen data behind
|
||||
| FALSE - there are no off-screen data behind
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
FORM_EXPORT(bool)
|
||||
data_behind(const FORM *form)
|
||||
{
|
||||
bool result = FALSE;
|
||||
@ -132,7 +132,7 @@ Only_Padding(WINDOW *w, int len, int pad)
|
||||
| Return Values : TRUE - there are off-screen data ahead
|
||||
| FALSE - there are no off-screen data ahead
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
FORM_EXPORT(bool)
|
||||
data_ahead(const FORM *form)
|
||||
{
|
||||
bool result = FALSE;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_def.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_def.c,v 1.28 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/* this can't be readonly */
|
||||
static FORM default_form =
|
||||
@ -62,7 +62,7 @@ static FORM default_form =
|
||||
NULL /* fieldterm */
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form;
|
||||
FORM_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -295,7 +295,7 @@ Associate_Fields(FORM *form, FIELD **fields)
|
||||
| E_CONNECTED - a field is already connected
|
||||
| E_SYSTEM_ERROR - not enough memory
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FORM *)
|
||||
FORM_EXPORT(FORM *)
|
||||
NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
|
||||
{
|
||||
int err = E_SYSTEM_ERROR;
|
||||
@ -344,7 +344,7 @@ NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
|
||||
| E_SYSTEM_ERROR - not enough memory
|
||||
+--------------------------------------------------------------------------*/
|
||||
#if NCURSES_SP_FUNCS
|
||||
NCURSES_EXPORT(FORM *)
|
||||
FORM_EXPORT(FORM *)
|
||||
new_form(FIELD **fields)
|
||||
{
|
||||
return NCURSES_SP_NAME(new_form) (CURRENT_SCREEN, fields);
|
||||
@ -361,7 +361,7 @@ new_form(FIELD **fields)
|
||||
| E_BAD_ARGUMENT - invalid form pointer
|
||||
| E_POSTED - form is posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
free_form(FORM *form)
|
||||
{
|
||||
T((T_CALLED("free_form(%p)"), (void *)form));
|
||||
@ -392,7 +392,7 @@ free_form(FORM *form)
|
||||
| E_POSTED - form is posted
|
||||
| E_SYSTEM_ERROR - not enough memory
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_form_fields(FORM *form, FIELD **fields)
|
||||
{
|
||||
FIELD **old;
|
||||
@ -423,7 +423,7 @@ set_form_fields(FORM *form, FIELD **fields)
|
||||
|
|
||||
| Return Values : Pointer to field array
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELD **)
|
||||
FORM_EXPORT(FIELD **)
|
||||
form_fields(const FORM *form)
|
||||
{
|
||||
T((T_CALLED("form_field(%p)"), (const void *)form));
|
||||
@ -438,7 +438,7 @@ form_fields(const FORM *form)
|
||||
|
|
||||
| Return Values : Number of fields, -1 if none are defined
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
field_count(const FORM *form)
|
||||
{
|
||||
T((T_CALLED("field_count(%p)"), (const void *)form));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_driver.c,v 1.129 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_driver.c,v 1.130 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
This is the core module of the form library. It contains the majority
|
||||
@ -548,7 +548,7 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
FORM_EXPORT(void)
|
||||
_nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf)
|
||||
{
|
||||
int pad;
|
||||
@ -826,7 +826,7 @@ Field_encloses(FIELD *field, int ry, int rx)
|
||||
| E_SYSTEM_ERROR - form has no current field or
|
||||
| field-window
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
_nc_Position_Form_Cursor(FORM *form)
|
||||
{
|
||||
FIELD *field;
|
||||
@ -868,7 +868,7 @@ _nc_Position_Form_Cursor(FORM *form)
|
||||
| E_SYSTEM_ERROR - general error
|
||||
+--------------------------------------------------------------------------*/
|
||||
static bool move_after_insert = TRUE;
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
_nc_Refresh_Current_Field(FORM *form)
|
||||
{
|
||||
WINDOW *formwin;
|
||||
@ -1271,7 +1271,7 @@ Synchronize_Linked_Fields(FIELD *field)
|
||||
| E_BAD_ARGUMENT - invalid field pointer
|
||||
| E_SYSTEM_ERROR - some severe basic error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
_nc_Synchronize_Attributes(FIELD *field)
|
||||
{
|
||||
FORM *form;
|
||||
@ -1338,7 +1338,7 @@ _nc_Synchronize_Attributes(FIELD *field)
|
||||
| E_CURRENT - field is the current one
|
||||
| E_SYSTEM_ERROR - some severe basic error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
_nc_Synchronize_Options(FIELD *field, Field_Options newopts)
|
||||
{
|
||||
Field_Options oldopts;
|
||||
@ -1491,7 +1491,7 @@ _nc_Unset_Current_Field(FORM *form)
|
||||
| E_SYSTEM_ERROR - some severe basic error
|
||||
| E_NOT_CONNECTED - no fields are connected to the form
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
_nc_Set_Current_Field(FORM *form, FIELD *newfield)
|
||||
{
|
||||
FIELD *field;
|
||||
@ -3225,7 +3225,7 @@ Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
|
||||
| Return Values : TRUE - field is valid
|
||||
| FALSE - field is invalid
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
FORM_EXPORT(bool)
|
||||
_nc_Internal_Validation(FORM *form)
|
||||
{
|
||||
FIELD *field;
|
||||
@ -3319,7 +3319,7 @@ Next_Field_On_Page(FIELD *field)
|
||||
|
|
||||
| Return Values : Pointer to calculated field.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELD *)
|
||||
FORM_EXPORT(FIELD *)
|
||||
_nc_First_Active_Field(FORM *form)
|
||||
{
|
||||
FIELD **last_on_page = &form->field[form->page[form->curpage].pmax];
|
||||
@ -3873,7 +3873,7 @@ FN_Down_Field(FORM *form)
|
||||
| E_BAD_ARGUMENT - invalid field pointer
|
||||
| E_SYSTEM_ERROR - some severe basic error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
_nc_Set_Form_Page(FORM *form, int page, FIELD *field)
|
||||
{
|
||||
int res = E_OK;
|
||||
@ -4354,7 +4354,7 @@ static const Binding_Info bindings[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
|
||||
| E_NOT_CONNECTED - no fields are connected to the form
|
||||
| E_UNKNOWN_COMMAND - command not known
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
form_driver(FORM *form, int c)
|
||||
{
|
||||
const Binding_Info *BI = (Binding_Info *) 0;
|
||||
@ -4561,7 +4561,7 @@ form_driver(FORM *form, int c)
|
||||
| E_NOT_CONNECTED - no fields are connected to the form
|
||||
| E_UNKNOWN_COMMAND - command not known
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
form_driver_w(FORM *form, int type, wchar_t c)
|
||||
{
|
||||
const Binding_Info *BI = (Binding_Info *) 0;
|
||||
@ -4743,7 +4743,7 @@ form_driver_w(FORM *form, int type, wchar_t c)
|
||||
| E_BAD_ARGUMENT - invalid argument
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_field_buffer(FIELD *field, int buffer, const char *value)
|
||||
{
|
||||
FIELD_CELL *p;
|
||||
@ -4860,7 +4860,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
|
||||
|
|
||||
| Return Values : Pointer to buffer or NULL if arguments were invalid.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(char *)
|
||||
FORM_EXPORT(char *)
|
||||
field_buffer(const FIELD *field, int buffer)
|
||||
{
|
||||
char *result = 0;
|
||||
@ -4928,7 +4928,7 @@ field_buffer(const FIELD *field, int buffer)
|
||||
| Convert a multibyte string to a wide-character string. The result must be
|
||||
| freed by the caller.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(wchar_t *)
|
||||
FORM_EXPORT(wchar_t *)
|
||||
_nc_Widen_String(char *source, int *lengthp)
|
||||
{
|
||||
wchar_t *result = 0;
|
||||
|
@ -33,11 +33,11 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_hook.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_hook.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/* "Template" macro to generate function to set application specific hook */
|
||||
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
|
||||
NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\
|
||||
FORM_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\
|
||||
{\
|
||||
TR_FUNC_BFR(1); \
|
||||
T((T_CALLED("set_" #typ"_"#name"(%p,%s)"), (void *) form, TR_FUNC_ARG(0, func)));\
|
||||
@ -47,7 +47,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook f
|
||||
|
||||
/* "Template" macro to generate function to get application specific hook */
|
||||
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
|
||||
NCURSES_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\
|
||||
FORM_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\
|
||||
{\
|
||||
T((T_CALLED(#typ "_" #name "(%p)"), (const void *) form));\
|
||||
returnFormHook( Normalize_Form( form ) -> typ ## name );\
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_opts.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_opts.c,v 1.19 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_opts.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_form_opts(FORM *form, Form_Options opts)
|
||||
{
|
||||
T((T_CALLED("set_form_opts(%p,%d)"), (void *)form, opts));
|
||||
@ -68,7 +68,7 @@ set_form_opts(FORM *form, Form_Options opts)
|
||||
|
|
||||
| Return Values : The option flags.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(Form_Options)
|
||||
FORM_EXPORT(Form_Options)
|
||||
form_opts(const FORM *form)
|
||||
{
|
||||
T((T_CALLED("form_opts(%p)"), (const void *)form));
|
||||
@ -85,7 +85,7 @@ form_opts(const FORM *form)
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
form_opts_on(FORM *form, Form_Options opts)
|
||||
{
|
||||
T((T_CALLED("form_opts_on(%p,%d)"), (void *)form, opts));
|
||||
@ -110,7 +110,7 @@ form_opts_on(FORM *form, Form_Options opts)
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
form_opts_off(FORM *form, Form_Options opts)
|
||||
{
|
||||
T((T_CALLED("form_opts_off(%p,%d)"), (void *)form, opts));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_page.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -47,7 +47,7 @@ MODULE_ID("$Id: frm_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_INVALID_FIELD - current field can't be left
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_form_page(FORM *form, int page)
|
||||
{
|
||||
int err = E_OK;
|
||||
@ -96,7 +96,7 @@ set_form_page(FORM *form, int page)
|
||||
| Return Values : >= 0 : current page number
|
||||
| -1 : invalid form pointer
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
form_page(const FORM *form)
|
||||
{
|
||||
T((T_CALLED("form_page(%p)"), (const void *)form));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_post.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_post.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -48,7 +48,7 @@ MODULE_ID("$Id: frm_post.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_NO_ROOM - form doesn't fit into subwindow
|
||||
| E_SYSTEM_ERROR - system error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
post_form(FORM *form)
|
||||
{
|
||||
WINDOW *formwin;
|
||||
@ -98,7 +98,7 @@ post_form(FORM *form)
|
||||
| E_NOT_POSTED - form isn't posted
|
||||
| E_BAD_STATE - called from a hook routine
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
unpost_form(FORM *form)
|
||||
{
|
||||
T((T_CALLED("unpost_form(%p)"), (void *)form));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_req_name.c,v 1.20 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_req_name.c,v 1.21 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#define DATA(s) { s }
|
||||
|
||||
@ -120,7 +120,7 @@ static const char request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1][13] =
|
||||
| Return Values : Pointer to name - on success
|
||||
| NULL - on invalid request code
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(const char *)
|
||||
FORM_EXPORT(const char *)
|
||||
form_request_name(int request)
|
||||
{
|
||||
T((T_CALLED("form_request_name(%d)"), request));
|
||||
@ -143,7 +143,7 @@ form_request_name(int request)
|
||||
| Return Values : Request Id - on success
|
||||
| E_NO_MATCH - request not found
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
form_request_by_name(const char *str)
|
||||
{
|
||||
/* because the table is so small, it doesn't really hurt
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_scale.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - invalid form pointer
|
||||
| E_NOT_CONNECTED - no fields connected to form
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
scale_form(const FORM *form, int *rows, int *cols)
|
||||
{
|
||||
T((T_CALLED("scale_form(%p,%p,%p)"),
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_sub.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_POSTED - form is posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_form_sub(FORM *form, WINDOW *win)
|
||||
{
|
||||
T((T_CALLED("set_form_sub(%p,%p)"), (void *)form, (void *)win));
|
||||
@ -73,7 +73,7 @@ set_form_sub(FORM *form, WINDOW *win)
|
||||
|
|
||||
| Return Values : The pointer to the Subwindow.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(WINDOW *)
|
||||
FORM_EXPORT(WINDOW *)
|
||||
form_sub(const FORM *form)
|
||||
{
|
||||
const FORM *f;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_user.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_user.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_user.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : E_OK - on success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_form_userptr(FORM *form, void *usrptr)
|
||||
{
|
||||
T((T_CALLED("set_form_userptr(%p,%p)"), (void *)form, (void *)usrptr));
|
||||
@ -63,7 +63,7 @@ set_form_userptr(FORM *form, void *usrptr)
|
||||
| Return Values : Value of pointer. If no such pointer has been set,
|
||||
| NULL is returned
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void *)
|
||||
FORM_EXPORT(void *)
|
||||
form_userptr(const FORM *form)
|
||||
{
|
||||
T((T_CALLED("form_userptr(%p)"), (const void *)form));
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: frm_win.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: frm_win.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_win.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_POSTED - form is posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
set_form_win(FORM *form, WINDOW *win)
|
||||
{
|
||||
T((T_CALLED("set_form_win(%p,%p)"), (void *)form, (void *)win));
|
||||
@ -73,7 +73,7 @@ set_form_win(FORM *form, WINDOW *win)
|
||||
|
|
||||
| Return Values : The pointer to the Window or stdscr if there is none.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(WINDOW *)
|
||||
FORM_EXPORT(WINDOW *)
|
||||
form_win(const FORM *form)
|
||||
{
|
||||
WINDOW *result;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_alnum.c,v 1.25 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fty_alnum.c,v 1.26 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#define thisARG alnumARG
|
||||
|
||||
@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS;
|
||||
FORM_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS;
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
/* The next routines are to simplify the use of ncurses from
|
||||
programming languages with restictions on interop with C level
|
||||
constructs (e.g. variable access or va_list + ellipsis constructs)
|
||||
*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_TYPE_ALNUM(void)
|
||||
{
|
||||
return TYPE_ALNUM;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_alpha.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fty_alpha.c,v 1.28 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#define thisARG alphaARG
|
||||
|
||||
@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS;
|
||||
FORM_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS;
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
/* The next routines are to simplify the use of ncurses from
|
||||
programming languages with restictions on interop with C level
|
||||
constructs (e.g. variable access or va_list + ellipsis constructs)
|
||||
*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_TYPE_ALPHA(void)
|
||||
{
|
||||
return TYPE_ALPHA;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_enum.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fty_enum.c,v 1.28 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -425,7 +425,7 @@ static FIELDTYPE typeENUM =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE *)
|
||||
FORM_EXPORT_VAR(FIELDTYPE *)
|
||||
TYPE_ENUM = &typeENUM;
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
@ -433,7 +433,7 @@ TYPE_ENUM = &typeENUM;
|
||||
programming languages with restictions on interop with C level
|
||||
constructs (e.g. variable access or va_list + ellipsis constructs)
|
||||
*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_TYPE_ENUM(void)
|
||||
{
|
||||
return TYPE_ENUM;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_generic.c,v 1.10 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fty_generic.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*
|
||||
* This is not a full implementation of a field type, but adds some
|
||||
@ -99,7 +99,7 @@ Generic_This_Type(void *arg)
|
||||
|
|
||||
| Return Values : Fieldtype pointer or NULL if error occurred
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *),
|
||||
bool (*const char_check) (int, FORM *, FIELD *, const
|
||||
void *),
|
||||
@ -220,7 +220,7 @@ GenericArgument(const FIELDTYPE *typ,
|
||||
| Return Values : E_OK if all went well
|
||||
| E_SYSTEM_ERROR if an error occurred
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
FORM_EXPORT(int)
|
||||
_nc_set_generic_fieldtype(FIELD *field,
|
||||
FIELDTYPE *ftyp,
|
||||
int (*argiterator) (void **))
|
||||
@ -275,7 +275,7 @@ _nc_set_generic_fieldtype(FIELD *field,
|
||||
|
|
||||
| Return Values : The fields Window or NULL on error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(WINDOW *)
|
||||
FORM_EXPORT(WINDOW *)
|
||||
_nc_form_cursor(const FORM *form, int *pRow, int *pCol)
|
||||
{
|
||||
int code = E_SYSTEM_ERROR;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_int.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fty_int.c,v 1.28 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#if USE_WIDEC_SUPPORT
|
||||
#define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c)))
|
||||
@ -278,14 +278,14 @@ static FIELDTYPE typeTHIS =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS;
|
||||
FORM_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS;
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
/* The next routines are to simplify the use of ncurses from
|
||||
programming languages with restictions on interop with C level
|
||||
constructs (e.g. variable access or va_list + ellipsis constructs)
|
||||
*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_TYPE_INTEGER(void)
|
||||
{
|
||||
return TYPE_INTEGER;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_ipv4.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fty_ipv4.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnform
|
||||
@ -104,14 +104,14 @@ static FIELDTYPE typeIPV4 =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
|
||||
FORM_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
/* The next routines are to simplify the use of ncurses from
|
||||
programming languages with restictions on interop with C level
|
||||
constructs (e.g. variable access or va_list + ellipsis constructs)
|
||||
*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_TYPE_IPV4(void)
|
||||
{
|
||||
return TYPE_IPV4;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_num.c,v 1.32 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: fty_num.c,v 1.33 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
@ -324,14 +324,14 @@ static FIELDTYPE typeTHIS =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS;
|
||||
FORM_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS;
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
/* The next routines are to simplify the use of ncurses from
|
||||
programming languages with restictions on interop with C level
|
||||
constructs (e.g. variable access or va_list + ellipsis constructs)
|
||||
*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_TYPE_NUMERIC(void)
|
||||
{
|
||||
return TYPE_NUMERIC;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "form.priv.h"
|
||||
|
||||
MODULE_ID("$Id: fty_regex.c,v 1.29 2020/02/29 15:46:00 anonymous.maarten Exp $")
|
||||
MODULE_ID("$Id: fty_regex.c,v 1.30 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */
|
||||
|
||||
@ -340,14 +340,14 @@ static FIELDTYPE typeREGEXP =
|
||||
#endif
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP;
|
||||
FORM_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP;
|
||||
|
||||
#if NCURSES_INTEROP_FUNCS
|
||||
/* The next routines are to simplify the use of ncurses from
|
||||
programming languages with restictions on interop with C level
|
||||
constructs (e.g. variable access or va_list + ellipsis constructs)
|
||||
*/
|
||||
NCURSES_EXPORT(FIELDTYPE *)
|
||||
FORM_EXPORT(FIELDTYPE *)
|
||||
_nc_TYPE_REGEXP(void)
|
||||
{
|
||||
return TYPE_REGEXP;
|
||||
|
@ -30,7 +30,7 @@
|
||||
/****************************************************************************
|
||||
* Author: Thomas E. Dickey 1996-on *
|
||||
****************************************************************************/
|
||||
/* $Id: nc_alloc.h,v 1.26 2020/02/02 23:34:34 tom Exp $ */
|
||||
/* $Id: nc_alloc.h,v 1.27 2020/07/04 20:01:13 tom Exp $ */
|
||||
|
||||
#ifndef NC_ALLOC_included
|
||||
#define NC_ALLOC_included 1
|
||||
@ -78,7 +78,7 @@ extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN GCC_DEPRECATED("use
|
||||
#ifdef NCURSES_INTERNALS
|
||||
extern NCURSES_EXPORT(void) _nc_free_tic(int) GCC_NORETURN;
|
||||
extern NCURSES_EXPORT(void) _nc_free_tparm(void);
|
||||
extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
|
||||
extern void _nc_leaks_dump_entry(void);
|
||||
extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
|
||||
|
||||
#if NCURSES_SP_FUNCS
|
||||
|
@ -26,7 +26,7 @@
|
||||
* sale, use or other dealings in this Software without prior written *
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/* $Id: ncurses_dll.h.in,v 1.15 2020/04/04 23:37:36 tom Exp $ */
|
||||
/* $Id: ncurses_dll.h.in,v 1.16 2020/07/04 23:07:54 tom Exp $ */
|
||||
|
||||
#ifndef NCURSES_DLL_H_incl
|
||||
#define NCURSES_DLL_H_incl 1
|
||||
@ -66,60 +66,34 @@
|
||||
* using functions to access them.
|
||||
*/
|
||||
#define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name
|
||||
|
||||
#if defined(BUILDING_NCURSES)
|
||||
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
||||
#else
|
||||
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
||||
#endif
|
||||
|
||||
#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
||||
|
||||
/* no longer needed on cygwin or mingw, thanks to auto-import */
|
||||
/* but this structure may be useful at some point for an MSVC build */
|
||||
/* so, for now unconditionally define the important flags */
|
||||
/* "the right way" for proper static and dll+auto-import behavior */
|
||||
#undef NCURSES_DLL
|
||||
#define NCURSES_STATIC
|
||||
#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
|
||||
#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
|
||||
|
||||
/*
|
||||
* These are configurable:
|
||||
* These symbols hide dllimport/dllexport, for compilers which care about it.
|
||||
*/
|
||||
#undef NCURSES_API
|
||||
#undef NCURSES_CXX_IMPEXP
|
||||
#undef NCURSES_EXPORT
|
||||
#undef NCURSES_EXPORT_VAR
|
||||
#undef NCURSES_IMPEXP
|
||||
|
||||
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||
# if defined(NCURSES_DLL)
|
||||
# if defined(NCURSES_STATIC)
|
||||
# undef NCURSES_STATIC
|
||||
# endif
|
||||
# endif
|
||||
# if defined(NCURSES_DLL)
|
||||
/* building a DLL */
|
||||
# define NCURSES_IMPEXP __declspec(dllexport)
|
||||
# elif defined(NCURSES_STATIC)
|
||||
/* building or linking to a static library */
|
||||
# define NCURSES_IMPEXP /* nothing */
|
||||
# else
|
||||
/* linking to the DLL */
|
||||
# define NCURSES_IMPEXP __declspec(dllimport)
|
||||
# endif
|
||||
# define NCURSES_API __cdecl
|
||||
# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
|
||||
# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
|
||||
#endif
|
||||
|
||||
/* Take care of non-Windows platforms */
|
||||
#if !defined(NCURSES_IMPEXP)
|
||||
# define NCURSES_IMPEXP @NCURSES_IMPEXP@
|
||||
#endif
|
||||
#if !defined(NCURSES_CXX_IMPEXP)
|
||||
# define NCURSES_CXX_IMPEXP @NCURSES_CXX_IMPEXP@
|
||||
#endif
|
||||
#if !defined(NCURSES_API)
|
||||
# define NCURSES_API /* nothing */
|
||||
#endif
|
||||
#if !defined(NCURSES_EXPORT)
|
||||
# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
|
||||
#endif
|
||||
#if !defined(NCURSES_EXPORT_VAR)
|
||||
# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
|
||||
# if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */
|
||||
# define NCURSES_EXPORT_GENERAL_IMPORT
|
||||
# define NCURSES_EXPORT_GENERAL_EXPORT
|
||||
# else
|
||||
# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
|
||||
# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
|
||||
# endif
|
||||
# define NCURSES_API __cdecl
|
||||
#else
|
||||
# define NCURSES_EXPORT_GENERAL_IMPORT
|
||||
# define NCURSES_EXPORT_GENERAL_EXPORT
|
||||
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
|
||||
#endif
|
||||
|
||||
#endif /* NCURSES_DLL_H_incl */
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.in,v 1.67 2020/02/22 16:35:47 tom Exp $
|
||||
# $Id: Makefile.in,v 1.68 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
##############################################################################
|
||||
# Copyright 2020 Thomas E. Dickey #
|
||||
# Copyright 1998-2015,2018 Free Software Foundation, Inc. #
|
||||
@ -94,12 +94,12 @@ CFLAGS = @CFLAGS@
|
||||
|
||||
INCDIR = $(top_srcdir)/include
|
||||
BASE_DIR = $(top_srcdir)/ncurses
|
||||
CPPFLAGS = -I$(BASE_DIR) -DHAVE_CONFIG_H @CPPFLAGS@
|
||||
CPPFLAGS = -I$(BASE_DIR) -DHAVE_CONFIG_H -DBUILDING_MENU @CPPFLAGS@
|
||||
|
||||
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS)
|
||||
CFLAGS_NORMAL = $(CCFLAGS)
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
|
||||
CFLAGS_PROFILE = $(CCFLAGS) -pg
|
||||
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_attribs.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_attribs.c,v 1.19 2020/07/04 19:44:58 tom Exp $")
|
||||
|
||||
/* Macro to redraw menu if it is posted and changed */
|
||||
#define Refresh_Menu(menu) \
|
||||
@ -50,7 +50,7 @@ MODULE_ID("$Id: m_attribs.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
|
||||
/* "Template" macro to generate a function to set a menus attribute */
|
||||
#define GEN_MENU_ATTR_SET_FCT( name ) \
|
||||
NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU* menu, chtype attr) \
|
||||
MENU_EXPORT(int) NCURSES_API set_menu_ ## name (MENU* menu, chtype attr) \
|
||||
{\
|
||||
T((T_CALLED("set_menu_" #name "(%p,%s)"), (void *) menu, _traceattr(attr))); \
|
||||
if (!(attr==A_NORMAL || (attr & A_ATTRIBUTES)==attr))\
|
||||
@ -66,7 +66,7 @@ NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU* menu, chtype attr) \
|
||||
|
||||
/* "Template" macro to generate a function to get a menu's attribute */
|
||||
#define GEN_MENU_ATTR_GET_FCT( name ) \
|
||||
NCURSES_IMPEXP chtype NCURSES_API menu_ ## name (const MENU * menu)\
|
||||
MENU_EXPORT(chtype) NCURSES_API menu_ ## name (const MENU * menu)\
|
||||
{\
|
||||
T((T_CALLED("menu_" #name "(%p)"), (const void *) menu));\
|
||||
returnAttr(Normalize_Menu( menu ) -> name);\
|
||||
|
@ -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.24 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -50,7 +50,7 @@ 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)
|
||||
MENU_EXPORT(int)
|
||||
_nc_menu_cursor_pos(const MENU * menu, const ITEM * item, int *pY, int *pX)
|
||||
{
|
||||
if (!menu || !pX || !pY)
|
||||
@ -80,7 +80,7 @@ _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)
|
||||
MENU_EXPORT(int)
|
||||
pos_menu_cursor(const MENU * menu)
|
||||
{
|
||||
WINDOW *win, *sub;
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_driver.c,v 1.34 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_driver.c,v 1.35 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/* Macros */
|
||||
|
||||
@ -115,7 +115,7 @@ Is_Sub_String(
|
||||
| Return Values : E_OK - an item matching the pattern was found
|
||||
| E_NO_MATCH - nothing found
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
_nc_Match_Next_Character_In_Item_Name
|
||||
(MENU * menu, int ch, ITEM ** item)
|
||||
{
|
||||
@ -209,7 +209,7 @@ _nc_Match_Next_Character_In_Item_Name
|
||||
| E_BAD_STATE - menu is in user hook routine
|
||||
| E_NOT_POSTED - menu is not posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
menu_driver(MENU * menu, int c)
|
||||
{
|
||||
#define NAVIGATE(dir) \
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_format.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_format.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#define minimum(a,b) ((a)<(b) ? (a): (b))
|
||||
|
||||
@ -56,7 +56,7 @@ MODULE_ID("$Id: m_format.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_NOT_CONNECTED - there are no items connected
|
||||
| E_POSTED - the menu is already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_format(MENU * menu, int rows, int cols)
|
||||
{
|
||||
int total_rows, total_cols;
|
||||
@ -120,7 +120,7 @@ set_menu_format(MENU * menu, int rows, int cols)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
menu_format(const MENU * menu, int *rows, int *cols)
|
||||
{
|
||||
if (rows)
|
||||
|
@ -38,11 +38,11 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_global.c,v 1.30 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_global.c,v 1.31 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
static char mark[] = "-";
|
||||
/* *INDENT-OFF* */
|
||||
NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = {
|
||||
MENU_EXPORT_VAR(MENU) _nc_Default_Menu = {
|
||||
16, /* Nr. of chars high */
|
||||
1, /* Nr. of chars wide */
|
||||
16, /* Nr. of items high */
|
||||
@ -81,7 +81,7 @@ NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = {
|
||||
0 /* status */
|
||||
};
|
||||
|
||||
NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = {
|
||||
MENU_EXPORT_VAR(ITEM) _nc_Default_Item = {
|
||||
{ (char *)0, 0 }, /* name */
|
||||
{ (char *)0, 0 }, /* description */
|
||||
(MENU *)0, /* Pointer to parent menu */
|
||||
@ -171,7 +171,7 @@ ResetConnectionInfo(MENU * menu, ITEM ** items)
|
||||
| Return Values : TRUE - successful connection
|
||||
| FALSE - connection failed
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
MENU_EXPORT(bool)
|
||||
_nc_Connect_Items(MENU * menu, ITEM ** items)
|
||||
{
|
||||
ITEM **item;
|
||||
@ -233,7 +233,7 @@ _nc_Connect_Items(MENU * menu, ITEM ** items)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
_nc_Disconnect_Items(MENU * menu)
|
||||
{
|
||||
if (menu && menu->items)
|
||||
@ -248,7 +248,7 @@ _nc_Disconnect_Items(MENU * menu)
|
||||
|
|
||||
| Return Values : the width
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
_nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ )
|
||||
{
|
||||
#if USE_WIDEC_SUPPORT
|
||||
@ -337,7 +337,7 @@ calculate_actual_width(MENU * menu, bool name)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
_nc_Calculate_Item_Length_and_Width(MENU * menu)
|
||||
{
|
||||
int l;
|
||||
@ -376,7 +376,7 @@ _nc_Calculate_Item_Length_and_Width(MENU * menu)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
_nc_Link_Items(MENU * menu)
|
||||
{
|
||||
if (menu && menu->items && *(menu->items))
|
||||
@ -503,7 +503,7 @@ _nc_Link_Items(MENU * menu)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
_nc_Show_Menu(const MENU * menu)
|
||||
{
|
||||
WINDOW *win;
|
||||
@ -543,7 +543,7 @@ _nc_Show_Menu(const MENU * menu)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
_nc_New_TopRow_and_CurrentItem(
|
||||
MENU * menu,
|
||||
int new_toprow,
|
||||
|
@ -38,11 +38,11 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_hook.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_hook.c,v 1.20 2020/07/04 19:45:16 tom Exp $")
|
||||
|
||||
/* "Template" macro to generate function to set application specific hook */
|
||||
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
|
||||
NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook func )\
|
||||
MENU_EXPORT(int) NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook func )\
|
||||
{\
|
||||
TR_FUNC_BFR(1);\
|
||||
T((T_CALLED("set_" #typ "_" #name "(%p,%s)"), (void *) menu, TR_FUNC_ARG(0, func)));\
|
||||
@ -52,7 +52,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook f
|
||||
|
||||
/* "Template" macro to generate function to get application specific hook */
|
||||
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
|
||||
NCURSES_IMPEXP Menu_Hook NCURSES_API typ ## _ ## name ( const MENU *menu )\
|
||||
MENU_EXPORT(Menu_Hook) NCURSES_API typ ## _ ## name ( const MENU *menu )\
|
||||
{\
|
||||
T((T_CALLED(#typ "_" #name "(%p)"), (const void *) menu));\
|
||||
returnMenuHook(Normalize_Menu(menu) -> typ ## name);\
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_item_cur.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_cur.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -48,7 +48,7 @@ MODULE_ID("$Id: m_item_cur.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_current_item(MENU * menu, ITEM * item)
|
||||
{
|
||||
T((T_CALLED("set_current_item(%p,%p)"), (void *)menu, (void *)item));
|
||||
@ -89,7 +89,7 @@ set_current_item(MENU * menu, ITEM * item)
|
||||
|
|
||||
| Return Values : Item pointer or NULL if failure
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(ITEM *)
|
||||
MENU_EXPORT(ITEM *)
|
||||
current_item(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("current_item(%p)"), (const void *)menu));
|
||||
@ -104,7 +104,7 @@ current_item(const MENU * menu)
|
||||
|
|
||||
| Return Values : The index or ERR if this is an invalid item pointer
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
item_index(const ITEM * item)
|
||||
{
|
||||
T((T_CALLED("item_index(%p)"), (const void *)item));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_item_nam.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_nam.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -48,7 +48,7 @@ MODULE_ID("$Id: m_item_nam.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : See above; returns NULL if item is invalid
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(const char *)
|
||||
MENU_EXPORT(const char *)
|
||||
item_name(const ITEM * item)
|
||||
{
|
||||
T((T_CALLED("item_name(%p)"), (const void *)item));
|
||||
@ -63,7 +63,7 @@ item_name(const ITEM * item)
|
||||
|
|
||||
| Return Values : See above; Returns NULL if item is invalid
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(const char *)
|
||||
MENU_EXPORT(const char *)
|
||||
item_description(const ITEM * item)
|
||||
{
|
||||
T((T_CALLED("item_description(%p)"), (const void *)item));
|
||||
|
@ -45,7 +45,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
MODULE_ID("$Id: m_item_new.c,v 1.34 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_new.c,v 1.35 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -107,7 +107,7 @@ Is_Printable_String(const char *s)
|
||||
|
|
||||
| Return Values : The item pointer or NULL if creation failed.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(ITEM *)
|
||||
MENU_EXPORT(ITEM *)
|
||||
new_item(const char *name, const char *description)
|
||||
{
|
||||
ITEM *item;
|
||||
@ -160,7 +160,7 @@ new_item(const char *name, const char *description)
|
||||
| E_BAD_ARGUMENT - invalid value has been passed
|
||||
| E_CONNECTED - item is still connected to a menu
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
free_item(ITEM * item)
|
||||
{
|
||||
T((T_CALLED("free_item(%p)"), (void *)item));
|
||||
@ -193,7 +193,7 @@ free_item(ITEM * item)
|
||||
| E_BAD_ARGUMENT - an invalid value has been passed
|
||||
| E_SYSTEM_ERROR - no memory to store mark
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_mark(MENU * menu, const char *mark)
|
||||
{
|
||||
short l;
|
||||
@ -265,7 +265,7 @@ set_menu_mark(MENU * menu, const char *mark)
|
||||
|
|
||||
| Return Values : The marker string pointer or NULL if no marker defined
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(const char *)
|
||||
MENU_EXPORT(const char *)
|
||||
menu_mark(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("menu_mark(%p)"), (const void *)menu));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_item_opt.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_opt.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -51,7 +51,7 @@ MODULE_ID("$Id: m_item_opt.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid item options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_item_opts(ITEM * item, Item_Options opts)
|
||||
{
|
||||
T((T_CALLED("set_menu_opts(%p,%d)"), (void *)item, opts));
|
||||
@ -94,7 +94,7 @@ set_item_opts(ITEM * item, Item_Options opts)
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
item_opts_off(ITEM * item, Item_Options opts)
|
||||
{
|
||||
ITEM *citem = item; /* use a copy because set_item_opts must detect
|
||||
@ -122,7 +122,7 @@ item_opts_off(ITEM * item, Item_Options opts)
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
item_opts_on(ITEM * item, Item_Options opts)
|
||||
{
|
||||
ITEM *citem = item; /* use a copy because set_item_opts must detect
|
||||
@ -150,7 +150,7 @@ item_opts_on(ITEM * item, Item_Options opts)
|
||||
|
|
||||
| Return Values : Items options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(Item_Options)
|
||||
MENU_EXPORT(Item_Options)
|
||||
item_opts(const ITEM * item)
|
||||
{
|
||||
T((T_CALLED("item_opts(%p)"), (const void *)item));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_item_top.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_top.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_top.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - not a menu pointer or invalid row
|
||||
| E_NOT_CONNECTED - there are no items for the menu
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_top_row(MENU * menu, int row)
|
||||
{
|
||||
ITEM *item;
|
||||
@ -92,7 +92,7 @@ set_top_row(MENU * menu, int row)
|
||||
|
|
||||
| Return Values : The row number or ERR if there is no row
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
top_row(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("top_row(%p)"), (const void *)menu));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_item_use.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_use.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: m_item_use.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_item_userptr(ITEM * item, void *userptr)
|
||||
{
|
||||
T((T_CALLED("set_item_userptr(%p,%p)"), (void *)item, (void *)userptr));
|
||||
@ -67,7 +67,7 @@ set_item_userptr(ITEM * item, void *userptr)
|
||||
| Return Values : Value of the pointer. If no such pointer has been set,
|
||||
| NULL is returned.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void *)
|
||||
MENU_EXPORT(void *)
|
||||
item_userptr(const ITEM * item)
|
||||
{
|
||||
T((T_CALLED("item_userptr(%p)"), (const void *)item));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_item_val.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_val.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -53,7 +53,7 @@ MODULE_ID("$Id: m_item_val.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_REQUEST_DENIED - not selectable or single valued menu
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_item_value(ITEM * item, bool value)
|
||||
{
|
||||
MENU *menu;
|
||||
@ -95,7 +95,7 @@ set_item_value(ITEM * item, bool value)
|
||||
| Return Values : TRUE - if item is selected
|
||||
| FALSE - if item is not selected
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
MENU_EXPORT(bool)
|
||||
item_value(const ITEM * item)
|
||||
{
|
||||
T((T_CALLED("item_value(%p)"), (const void *)item));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_item_vis.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_item_vis.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_vis.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : TRUE if visible
|
||||
| FALSE if invisible
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(bool)
|
||||
MENU_EXPORT(bool)
|
||||
item_visible(const ITEM * item)
|
||||
{
|
||||
MENU *menu;
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_items.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_items.c,v 1.19 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -53,7 +53,7 @@ MODULE_ID("$Id: m_items.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - An incorrect menu or item array was
|
||||
| passed to the function
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_items(MENU * menu, ITEM ** items)
|
||||
{
|
||||
T((T_CALLED("set_menu_items(%p,%p)"), (void *)menu, (void *)items));
|
||||
@ -85,7 +85,7 @@ set_menu_items(MENU * menu, ITEM ** items)
|
||||
|
|
||||
| Return Values : NULL on error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(ITEM **)
|
||||
MENU_EXPORT(ITEM **)
|
||||
menu_items(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("menu_items(%p)"), (const void *)menu));
|
||||
@ -101,7 +101,7 @@ menu_items(const MENU * menu)
|
||||
|
|
||||
| Return Values : Number of items or -1 to indicate error.
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
item_count(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("item_count(%p)"), (const void *)menu));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_new.c,v 1.22 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_new.c,v 1.23 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -51,7 +51,7 @@ MODULE_ID("$Id: m_new.c,v 1.22 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : NULL on error
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(MENU *)
|
||||
MENU_EXPORT(MENU *)
|
||||
NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
|
||||
{
|
||||
int err = E_SYSTEM_ERROR;
|
||||
@ -102,7 +102,7 @@ NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
|
||||
| Return Values : NULL on error
|
||||
+--------------------------------------------------------------------------*/
|
||||
#if NCURSES_SP_FUNCS
|
||||
NCURSES_EXPORT(MENU *)
|
||||
MENU_EXPORT(MENU *)
|
||||
new_menu(ITEM ** items)
|
||||
{
|
||||
return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items);
|
||||
@ -120,7 +120,7 @@ new_menu(ITEM ** items)
|
||||
| E_BAD_ARGUMENT - Invalid menu pointer passed
|
||||
| E_POSTED - Menu is already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
free_menu(MENU * menu)
|
||||
{
|
||||
T((T_CALLED("free_menu(%p)"), (void *)menu));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_opts.c,v 1.21 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_opts.c,v 1.22 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -53,7 +53,7 @@ MODULE_ID("$Id: m_opts.c,v 1.21 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - invalid menu options
|
||||
| E_POSTED - menu is already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_opts(MENU * menu, Menu_Options opts)
|
||||
{
|
||||
T((T_CALLED("set_menu_opts(%p,%d)"), (void *)menu, opts));
|
||||
@ -113,7 +113,7 @@ set_menu_opts(MENU * menu, Menu_Options opts)
|
||||
| E_BAD_ARGUMENT - invalid options
|
||||
| E_POSTED - menu is already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
menu_opts_off(MENU * menu, Menu_Options opts)
|
||||
{
|
||||
MENU *cmenu = menu; /* use a copy because set_menu_opts must detect
|
||||
@ -146,7 +146,7 @@ menu_opts_off(MENU * menu, Menu_Options opts)
|
||||
| E_BAD_ARGUMENT - invalid menu options
|
||||
| E_POSTED - menu is already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
menu_opts_on(MENU * menu, Menu_Options opts)
|
||||
{
|
||||
MENU *cmenu = menu; /* use a copy because set_menu_opts must detect
|
||||
@ -174,7 +174,7 @@ menu_opts_on(MENU * menu, Menu_Options opts)
|
||||
|
|
||||
| Return Values : Menu options
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(Menu_Options)
|
||||
MENU_EXPORT(Menu_Options)
|
||||
menu_opts(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("menu_opts(%p)"), (const void *)menu));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_pad.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_pad.c,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/* Macro to redraw menu if it is posted and changed */
|
||||
#define Refresh_Menu(menu) \
|
||||
@ -59,7 +59,7 @@ MODULE_ID("$Id: m_pad.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_BAD_ARGUMENT - an invalid value has been passed
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_pad(MENU * menu, int pad)
|
||||
{
|
||||
bool do_refresh = (menu != (MENU *) 0);
|
||||
@ -86,7 +86,7 @@ set_menu_pad(MENU * menu, int pad)
|
||||
|
|
||||
| Return Values : The pad character
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
menu_pad(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("menu_pad(%p)"), (const void *)menu));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_pattern.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_pattern.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -51,7 +51,7 @@ MODULE_ID("$Id: m_pattern.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
|
||||
| pattern is stored
|
||||
| PatternString - as expected
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(char *)
|
||||
MENU_EXPORT(char *)
|
||||
menu_pattern(const MENU * menu)
|
||||
{
|
||||
static char empty[] = "";
|
||||
@ -73,7 +73,7 @@ menu_pattern(const MENU * menu)
|
||||
| E_NOT_CONNECTED - no items connected to menu
|
||||
| E_NO_MATCH - no item matches pattern
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_pattern(MENU * menu, const char *p)
|
||||
{
|
||||
ITEM *matchitem;
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_post.c,v 1.32 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_post.c,v 1.33 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: m_post.c,v 1.32 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
_nc_Post_Item(const MENU * menu, const ITEM * item)
|
||||
{
|
||||
int i;
|
||||
@ -197,7 +197,7 @@ _nc_Post_Item(const MENU * menu, const ITEM * item)
|
||||
|
|
||||
| Return Values : -
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void)
|
||||
MENU_EXPORT(void)
|
||||
_nc_Draw_Menu(const MENU * menu)
|
||||
{
|
||||
ITEM *item = menu->items[0];
|
||||
@ -267,7 +267,7 @@ _nc_Draw_Menu(const MENU * menu)
|
||||
| E_BAD_STATE - Menu in userexit routine
|
||||
| E_POSTED - Menu already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
post_menu(MENU * menu)
|
||||
{
|
||||
T((T_CALLED("post_menu(%p)"), (void *)menu));
|
||||
@ -339,7 +339,7 @@ post_menu(MENU * menu)
|
||||
| E_BAD_STATE - menu in userexit routine
|
||||
| E_NOT_POSTED - menu is not posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
unpost_menu(MENU * menu)
|
||||
{
|
||||
WINDOW *win;
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_req_name.c,v 1.24 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_req_name.c,v 1.25 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#define DATA(s) { s }
|
||||
|
||||
@ -74,7 +74,7 @@ static const char request_names[MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1][14] =
|
||||
| Return Values : Pointer to name - on success
|
||||
| NULL - on invalid request code
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(const char *)
|
||||
MENU_EXPORT(const char *)
|
||||
menu_request_name(int request)
|
||||
{
|
||||
T((T_CALLED("menu_request_name(%d)"), request));
|
||||
@ -96,7 +96,7 @@ menu_request_name(int request)
|
||||
| Return Values : Request Id - on success
|
||||
| E_NO_MATCH - request not found
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
menu_request_by_name(const char *str)
|
||||
{
|
||||
/* because the table is so small, it doesn't really hurt
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_scale.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -51,7 +51,7 @@ MODULE_ID("$Id: m_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
|
||||
| E_BAD_ARGUMENT - invalid menu pointer
|
||||
| E_NOT_CONNECTED - no items are connected to menu
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
scale_menu(const MENU * menu, int *rows, int *cols)
|
||||
{
|
||||
T((T_CALLED("scale_menu(%p,%p,%p)"),
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_spacing.c,v 1.20 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_spacing.c,v 1.21 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
#define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8)
|
||||
#define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8)
|
||||
@ -52,7 +52,7 @@ MODULE_ID("$Id: m_spacing.c,v 1.20 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : E_OK - on success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col)
|
||||
{
|
||||
MENU *m; /* split for ATAC workaround */
|
||||
@ -87,7 +87,7 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col)
|
||||
|
|
||||
| Return Values : E_OK - on success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col)
|
||||
{
|
||||
const MENU *m; /* split for ATAC workaround */
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_sub.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: m_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_POSTED - menu is already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_sub(MENU * menu, WINDOW *win)
|
||||
{
|
||||
T((T_CALLED("set_menu_sub(%p,%p)"), (void *)menu, (void *)win));
|
||||
@ -89,7 +89,7 @@ set_menu_sub(MENU * menu, WINDOW *win)
|
||||
|
|
||||
| Return Values : NULL on error, otherwise a pointer to the window
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(WINDOW *)
|
||||
MENU_EXPORT(WINDOW *)
|
||||
menu_sub(const MENU * menu)
|
||||
{
|
||||
const MENU *m = Normalize_Menu(menu);
|
||||
|
@ -33,37 +33,37 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_trace.c,v 1.7 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_trace.c,v 1.8 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
NCURSES_EXPORT(ITEM *)
|
||||
MENU_EXPORT(ITEM *)
|
||||
_nc_retrace_item(ITEM * code)
|
||||
{
|
||||
T((T_RETURN("%p"), (void *)code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(ITEM **)
|
||||
MENU_EXPORT(ITEM **)
|
||||
_nc_retrace_item_ptr(ITEM ** code)
|
||||
{
|
||||
T((T_RETURN("%p"), (void *)code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(Item_Options)
|
||||
MENU_EXPORT(Item_Options)
|
||||
_nc_retrace_item_opts(Item_Options code)
|
||||
{
|
||||
T((T_RETURN("%d"), code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(MENU *)
|
||||
MENU_EXPORT(MENU *)
|
||||
_nc_retrace_menu(MENU * code)
|
||||
{
|
||||
T((T_RETURN("%p"), (void *)code));
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(Menu_Hook)
|
||||
MENU_EXPORT(Menu_Hook)
|
||||
_nc_retrace_menu_hook(Menu_Hook code)
|
||||
{
|
||||
TR_FUNC_BFR(1);
|
||||
@ -71,7 +71,7 @@ _nc_retrace_menu_hook(Menu_Hook code)
|
||||
return code;
|
||||
}
|
||||
|
||||
NCURSES_EXPORT(Menu_Options)
|
||||
MENU_EXPORT(Menu_Options)
|
||||
_nc_retrace_menu_opts(Menu_Options code)
|
||||
{
|
||||
T((T_RETURN("%d"), code));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_userptr.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_userptr.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: m_userptr.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
|
||||
|
|
||||
| Return Values : E_OK - success
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_userptr(MENU * menu, void *userptr)
|
||||
{
|
||||
T((T_CALLED("set_menu_userptr(%p,%p)"), (void *)menu, (void *)userptr));
|
||||
@ -67,7 +67,7 @@ set_menu_userptr(MENU * menu, void *userptr)
|
||||
| Return Values : Value of the pointer. If no such pointer has been set,
|
||||
| NULL is returned
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(void *)
|
||||
MENU_EXPORT(void *)
|
||||
menu_userptr(const MENU * menu)
|
||||
{
|
||||
T((T_CALLED("menu_userptr(%p)"), (const void *)menu));
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "menu.priv.h"
|
||||
|
||||
MODULE_ID("$Id: m_win.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
MODULE_ID("$Id: m_win.c,v 1.19 2020/05/24 01:40:20 anonymous.maarten Exp $")
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Facility : libnmenu
|
||||
@ -49,7 +49,7 @@ MODULE_ID("$Id: m_win.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
|
||||
| Return Values : E_OK - success
|
||||
| E_POSTED - menu is already posted
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(int)
|
||||
MENU_EXPORT(int)
|
||||
set_menu_win(MENU * menu, WINDOW *win)
|
||||
{
|
||||
T((T_CALLED("set_menu_win(%p,%p)"), (void *)menu, (void *)win));
|
||||
@ -89,7 +89,7 @@ set_menu_win(MENU * menu, WINDOW *win)
|
||||
|
|
||||
| Return Values : NULL on error, otherwise pointer to window
|
||||
+--------------------------------------------------------------------------*/
|
||||
NCURSES_EXPORT(WINDOW *)
|
||||
MENU_EXPORT(WINDOW *)
|
||||
menu_win(const MENU * menu)
|
||||
{
|
||||
const MENU *m = Normalize_Menu(menu);
|
||||
|
143
menu/menu.h
143
menu/menu.h
@ -31,7 +31,7 @@
|
||||
* Author: Juergen Pfeifer, 1995,1997 *
|
||||
****************************************************************************/
|
||||
|
||||
/* $Id: menu.h,v 1.24 2020/02/02 23:34:34 tom Exp $ */
|
||||
/* $Id: menu.h,v 1.25 2020/07/04 20:38:43 tom Exp $ */
|
||||
|
||||
#ifndef ETI_MENU
|
||||
#define ETI_MENU
|
||||
@ -47,6 +47,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(BUILDING_MENU)
|
||||
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
||||
#else
|
||||
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
||||
#endif
|
||||
|
||||
#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
||||
|
||||
#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API
|
||||
#define MENU_EXPORT_VAR(type) MENU_IMPEXP type
|
||||
|
||||
typedef int Menu_Options;
|
||||
typedef int Item_Options;
|
||||
|
||||
@ -183,85 +194,85 @@ MENU;
|
||||
|
||||
/* --------- prototypes for libmenu functions ----------------------------- */
|
||||
|
||||
extern NCURSES_EXPORT(ITEM **) menu_items (const MENU *);
|
||||
extern NCURSES_EXPORT(ITEM *) current_item (const MENU *);
|
||||
extern NCURSES_EXPORT(ITEM *) new_item (const char *,const char *);
|
||||
extern MENU_EXPORT(ITEM **) menu_items (const MENU *);
|
||||
extern MENU_EXPORT(ITEM *) current_item (const MENU *);
|
||||
extern MENU_EXPORT(ITEM *) new_item (const char *,const char *);
|
||||
|
||||
extern NCURSES_EXPORT(MENU *) new_menu (ITEM **);
|
||||
extern MENU_EXPORT(MENU *) new_menu (ITEM **);
|
||||
|
||||
extern NCURSES_EXPORT(Item_Options) item_opts (const ITEM *);
|
||||
extern NCURSES_EXPORT(Menu_Options) menu_opts (const MENU *);
|
||||
extern MENU_EXPORT(Item_Options) item_opts (const ITEM *);
|
||||
extern MENU_EXPORT(Menu_Options) menu_opts (const MENU *);
|
||||
|
||||
extern NCURSES_EXPORT(Menu_Hook) item_init (const MENU *);
|
||||
extern NCURSES_EXPORT(Menu_Hook) item_term (const MENU *);
|
||||
extern NCURSES_EXPORT(Menu_Hook) menu_init (const MENU *);
|
||||
extern NCURSES_EXPORT(Menu_Hook) menu_term (const MENU *);
|
||||
extern MENU_EXPORT(Menu_Hook) item_init (const MENU *);
|
||||
extern MENU_EXPORT(Menu_Hook) item_term (const MENU *);
|
||||
extern MENU_EXPORT(Menu_Hook) menu_init (const MENU *);
|
||||
extern MENU_EXPORT(Menu_Hook) menu_term (const MENU *);
|
||||
|
||||
extern NCURSES_EXPORT(WINDOW *) menu_sub (const MENU *);
|
||||
extern NCURSES_EXPORT(WINDOW *) menu_win (const MENU *);
|
||||
extern MENU_EXPORT(WINDOW *) menu_sub (const MENU *);
|
||||
extern MENU_EXPORT(WINDOW *) menu_win (const MENU *);
|
||||
|
||||
extern NCURSES_EXPORT(const char *) item_description (const ITEM *);
|
||||
extern NCURSES_EXPORT(const char *) item_name (const ITEM *);
|
||||
extern NCURSES_EXPORT(const char *) menu_mark (const MENU *);
|
||||
extern NCURSES_EXPORT(const char *) menu_request_name (int);
|
||||
extern MENU_EXPORT(const char *) item_description (const ITEM *);
|
||||
extern MENU_EXPORT(const char *) item_name (const ITEM *);
|
||||
extern MENU_EXPORT(const char *) menu_mark (const MENU *);
|
||||
extern MENU_EXPORT(const char *) menu_request_name (int);
|
||||
|
||||
extern NCURSES_EXPORT(char *) menu_pattern (const MENU *);
|
||||
extern MENU_EXPORT(char *) menu_pattern (const MENU *);
|
||||
|
||||
extern NCURSES_EXPORT(void *) menu_userptr (const MENU *);
|
||||
extern NCURSES_EXPORT(void *) item_userptr (const ITEM *);
|
||||
extern MENU_EXPORT(void *) menu_userptr (const MENU *);
|
||||
extern MENU_EXPORT(void *) item_userptr (const ITEM *);
|
||||
|
||||
extern NCURSES_EXPORT(chtype) menu_back (const MENU *);
|
||||
extern NCURSES_EXPORT(chtype) menu_fore (const MENU *);
|
||||
extern NCURSES_EXPORT(chtype) menu_grey (const MENU *);
|
||||
extern MENU_EXPORT(chtype) menu_back (const MENU *);
|
||||
extern MENU_EXPORT(chtype) menu_fore (const MENU *);
|
||||
extern MENU_EXPORT(chtype) menu_grey (const MENU *);
|
||||
|
||||
extern NCURSES_EXPORT(int) free_item (ITEM *);
|
||||
extern NCURSES_EXPORT(int) free_menu (MENU *);
|
||||
extern NCURSES_EXPORT(int) item_count (const MENU *);
|
||||
extern NCURSES_EXPORT(int) item_index (const ITEM *);
|
||||
extern NCURSES_EXPORT(int) item_opts_off (ITEM *,Item_Options);
|
||||
extern NCURSES_EXPORT(int) item_opts_on (ITEM *,Item_Options);
|
||||
extern NCURSES_EXPORT(int) menu_driver (MENU *,int);
|
||||
extern NCURSES_EXPORT(int) menu_opts_off (MENU *,Menu_Options);
|
||||
extern NCURSES_EXPORT(int) menu_opts_on (MENU *,Menu_Options);
|
||||
extern NCURSES_EXPORT(int) menu_pad (const MENU *);
|
||||
extern NCURSES_EXPORT(int) pos_menu_cursor (const MENU *);
|
||||
extern NCURSES_EXPORT(int) post_menu (MENU *);
|
||||
extern NCURSES_EXPORT(int) scale_menu (const MENU *,int *,int *);
|
||||
extern NCURSES_EXPORT(int) set_current_item (MENU *menu,ITEM *item);
|
||||
extern NCURSES_EXPORT(int) set_item_init (MENU *, Menu_Hook);
|
||||
extern NCURSES_EXPORT(int) set_item_opts (ITEM *,Item_Options);
|
||||
extern NCURSES_EXPORT(int) set_item_term (MENU *, Menu_Hook);
|
||||
extern NCURSES_EXPORT(int) set_item_userptr (ITEM *, void *);
|
||||
extern NCURSES_EXPORT(int) set_item_value (ITEM *,bool);
|
||||
extern NCURSES_EXPORT(int) set_menu_back (MENU *,chtype);
|
||||
extern NCURSES_EXPORT(int) set_menu_fore (MENU *,chtype);
|
||||
extern NCURSES_EXPORT(int) set_menu_format (MENU *,int,int);
|
||||
extern NCURSES_EXPORT(int) set_menu_grey (MENU *,chtype);
|
||||
extern NCURSES_EXPORT(int) set_menu_init (MENU *, Menu_Hook);
|
||||
extern NCURSES_EXPORT(int) set_menu_items (MENU *,ITEM **);
|
||||
extern NCURSES_EXPORT(int) set_menu_mark (MENU *, const char *);
|
||||
extern NCURSES_EXPORT(int) set_menu_opts (MENU *,Menu_Options);
|
||||
extern NCURSES_EXPORT(int) set_menu_pad (MENU *,int);
|
||||
extern NCURSES_EXPORT(int) set_menu_pattern (MENU *,const char *);
|
||||
extern NCURSES_EXPORT(int) set_menu_sub (MENU *,WINDOW *);
|
||||
extern NCURSES_EXPORT(int) set_menu_term (MENU *, Menu_Hook);
|
||||
extern NCURSES_EXPORT(int) set_menu_userptr (MENU *,void *);
|
||||
extern NCURSES_EXPORT(int) set_menu_win (MENU *,WINDOW *);
|
||||
extern NCURSES_EXPORT(int) set_top_row (MENU *,int);
|
||||
extern NCURSES_EXPORT(int) top_row (const MENU *);
|
||||
extern NCURSES_EXPORT(int) unpost_menu (MENU *);
|
||||
extern NCURSES_EXPORT(int) menu_request_by_name (const char *);
|
||||
extern NCURSES_EXPORT(int) set_menu_spacing (MENU *,int,int,int);
|
||||
extern NCURSES_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *);
|
||||
extern MENU_EXPORT(int) free_item (ITEM *);
|
||||
extern MENU_EXPORT(int) free_menu (MENU *);
|
||||
extern MENU_EXPORT(int) item_count (const MENU *);
|
||||
extern MENU_EXPORT(int) item_index (const ITEM *);
|
||||
extern MENU_EXPORT(int) item_opts_off (ITEM *,Item_Options);
|
||||
extern MENU_EXPORT(int) item_opts_on (ITEM *,Item_Options);
|
||||
extern MENU_EXPORT(int) menu_driver (MENU *,int);
|
||||
extern MENU_EXPORT(int) menu_opts_off (MENU *,Menu_Options);
|
||||
extern MENU_EXPORT(int) menu_opts_on (MENU *,Menu_Options);
|
||||
extern MENU_EXPORT(int) menu_pad (const MENU *);
|
||||
extern MENU_EXPORT(int) pos_menu_cursor (const MENU *);
|
||||
extern MENU_EXPORT(int) post_menu (MENU *);
|
||||
extern MENU_EXPORT(int) scale_menu (const MENU *,int *,int *);
|
||||
extern MENU_EXPORT(int) set_current_item (MENU *menu,ITEM *item);
|
||||
extern MENU_EXPORT(int) set_item_init (MENU *, Menu_Hook);
|
||||
extern MENU_EXPORT(int) set_item_opts (ITEM *,Item_Options);
|
||||
extern MENU_EXPORT(int) set_item_term (MENU *, Menu_Hook);
|
||||
extern MENU_EXPORT(int) set_item_userptr (ITEM *, void *);
|
||||
extern MENU_EXPORT(int) set_item_value (ITEM *,bool);
|
||||
extern MENU_EXPORT(int) set_menu_back (MENU *,chtype);
|
||||
extern MENU_EXPORT(int) set_menu_fore (MENU *,chtype);
|
||||
extern MENU_EXPORT(int) set_menu_format (MENU *,int,int);
|
||||
extern MENU_EXPORT(int) set_menu_grey (MENU *,chtype);
|
||||
extern MENU_EXPORT(int) set_menu_init (MENU *, Menu_Hook);
|
||||
extern MENU_EXPORT(int) set_menu_items (MENU *,ITEM **);
|
||||
extern MENU_EXPORT(int) set_menu_mark (MENU *, const char *);
|
||||
extern MENU_EXPORT(int) set_menu_opts (MENU *,Menu_Options);
|
||||
extern MENU_EXPORT(int) set_menu_pad (MENU *,int);
|
||||
extern MENU_EXPORT(int) set_menu_pattern (MENU *,const char *);
|
||||
extern MENU_EXPORT(int) set_menu_sub (MENU *,WINDOW *);
|
||||
extern MENU_EXPORT(int) set_menu_term (MENU *, Menu_Hook);
|
||||
extern MENU_EXPORT(int) set_menu_userptr (MENU *,void *);
|
||||
extern MENU_EXPORT(int) set_menu_win (MENU *,WINDOW *);
|
||||
extern MENU_EXPORT(int) set_top_row (MENU *,int);
|
||||
extern MENU_EXPORT(int) top_row (const MENU *);
|
||||
extern MENU_EXPORT(int) unpost_menu (MENU *);
|
||||
extern MENU_EXPORT(int) menu_request_by_name (const char *);
|
||||
extern MENU_EXPORT(int) set_menu_spacing (MENU *,int,int,int);
|
||||
extern MENU_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *);
|
||||
|
||||
|
||||
extern NCURSES_EXPORT(bool) item_value (const ITEM *);
|
||||
extern NCURSES_EXPORT(bool) item_visible (const ITEM *);
|
||||
extern MENU_EXPORT(bool) item_value (const ITEM *);
|
||||
extern MENU_EXPORT(bool) item_visible (const ITEM *);
|
||||
|
||||
extern NCURSES_EXPORT(void) menu_format (const MENU *,int *,int *);
|
||||
extern MENU_EXPORT(void) menu_format (const MENU *,int *,int *);
|
||||
|
||||
#if NCURSES_SP_FUNCS
|
||||
extern NCURSES_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **);
|
||||
extern MENU_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -31,7 +31,7 @@
|
||||
* Author: Juergen Pfeifer, 1995,1997 *
|
||||
****************************************************************************/
|
||||
|
||||
/* $Id: menu.priv.h,v 1.28 2020/02/02 23:34:34 tom Exp $ */
|
||||
/* $Id: menu.priv.h,v 1.29 2020/05/24 01:40:20 anonymous.maarten Exp $ */
|
||||
|
||||
/***************************************************************************
|
||||
* Module menu.priv.h *
|
||||
@ -52,8 +52,8 @@
|
||||
/* Backspace code */
|
||||
#define BS (8)
|
||||
|
||||
extern NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item;
|
||||
extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu;
|
||||
extern MENU_EXPORT_VAR(ITEM) _nc_Default_Item;
|
||||
extern MENU_EXPORT_VAR(MENU) _nc_Default_Menu;
|
||||
|
||||
/* Normalize item to default if none was given */
|
||||
#define Normalize_Item( item ) ((item)=(item)?(item):&_nc_Default_Item)
|
||||
@ -120,17 +120,17 @@ extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu;
|
||||
#define UChar(c) ((unsigned char)(c))
|
||||
|
||||
/* Internal functions. */
|
||||
extern NCURSES_EXPORT(void) _nc_Draw_Menu (const MENU *);
|
||||
extern NCURSES_EXPORT(void) _nc_Show_Menu (const MENU *);
|
||||
extern NCURSES_EXPORT(void) _nc_Calculate_Item_Length_and_Width (MENU *);
|
||||
extern NCURSES_EXPORT(int) _nc_Calculate_Text_Width(const TEXT *);
|
||||
extern NCURSES_EXPORT(void) _nc_Post_Item (const MENU *, const ITEM *);
|
||||
extern NCURSES_EXPORT(bool) _nc_Connect_Items (MENU *, ITEM **);
|
||||
extern NCURSES_EXPORT(void) _nc_Disconnect_Items (MENU *);
|
||||
extern NCURSES_EXPORT(void) _nc_New_TopRow_and_CurrentItem (MENU *,int, ITEM *);
|
||||
extern NCURSES_EXPORT(void) _nc_Link_Items (MENU *);
|
||||
extern NCURSES_EXPORT(int) _nc_Match_Next_Character_In_Item_Name (MENU*,int,ITEM**);
|
||||
extern NCURSES_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* item,
|
||||
extern MENU_EXPORT(void) _nc_Draw_Menu (const MENU *);
|
||||
extern MENU_EXPORT(void) _nc_Show_Menu (const MENU *);
|
||||
extern MENU_EXPORT(void) _nc_Calculate_Item_Length_and_Width (MENU *);
|
||||
extern MENU_EXPORT(int) _nc_Calculate_Text_Width(const TEXT *);
|
||||
extern MENU_EXPORT(void) _nc_Post_Item (const MENU *, const ITEM *);
|
||||
extern MENU_EXPORT(bool) _nc_Connect_Items (MENU *, ITEM **);
|
||||
extern MENU_EXPORT(void) _nc_Disconnect_Items (MENU *);
|
||||
extern MENU_EXPORT(void) _nc_New_TopRow_and_CurrentItem (MENU *,int, ITEM *);
|
||||
extern MENU_EXPORT(void) _nc_Link_Items (MENU *);
|
||||
extern MENU_EXPORT(int) _nc_Match_Next_Character_In_Item_Name (MENU*,int,ITEM**);
|
||||
extern MENU_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* item,
|
||||
int* pY, int* pX);
|
||||
|
||||
#ifdef TRACE
|
||||
@ -142,12 +142,12 @@ extern NCURSES_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* i
|
||||
#define returnMenuHook(code) TRACE_RETURN1(code,menu_hook)
|
||||
#define returnMenuOpts(code) TRACE_RETURN1(code,menu_opts)
|
||||
|
||||
extern NCURSES_EXPORT(ITEM *) _nc_retrace_item (ITEM *);
|
||||
extern NCURSES_EXPORT(ITEM **) _nc_retrace_item_ptr (ITEM **);
|
||||
extern NCURSES_EXPORT(Item_Options) _nc_retrace_item_opts (Item_Options);
|
||||
extern NCURSES_EXPORT(MENU *) _nc_retrace_menu (MENU *);
|
||||
extern NCURSES_EXPORT(Menu_Hook) _nc_retrace_menu_hook (Menu_Hook);
|
||||
extern NCURSES_EXPORT(Menu_Options) _nc_retrace_menu_opts (Menu_Options);
|
||||
extern MENU_EXPORT(ITEM *) _nc_retrace_item (ITEM *);
|
||||
extern MENU_EXPORT(ITEM **) _nc_retrace_item_ptr (ITEM **);
|
||||
extern MENU_EXPORT(Item_Options) _nc_retrace_item_opts (Item_Options);
|
||||
extern MENU_EXPORT(MENU *) _nc_retrace_menu (MENU *);
|
||||
extern MENU_EXPORT(Menu_Hook) _nc_retrace_menu_hook (Menu_Hook);
|
||||
extern MENU_EXPORT(Menu_Options) _nc_retrace_menu_opts (Menu_Options);
|
||||
|
||||
#else /* !TRACE */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.in,v 1.169 2020/02/22 15:45:23 tom Exp $
|
||||
# $Id: Makefile.in,v 1.170 2020/05/24 01:40:20 anonymous.maarten Exp $
|
||||
##############################################################################
|
||||
# Copyright 2018-2019,2020 Thomas E. Dickey #
|
||||
# Copyright 1998-2017,2018 Free Software Foundation, Inc. #
|
||||
@ -102,11 +102,11 @@ CPP = @CPP@
|
||||
CFLAGS = @CFLAGS@
|
||||
|
||||
INCDIR = $(srcdir)/../include
|
||||
CPPFLAGS = -DHAVE_CONFIG_H -I../ncurses @CPPFLAGS@
|
||||
CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES -I../ncurses @CPPFLAGS@
|
||||
|
||||
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@
|
||||
BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@
|
||||
BUILD_CC = @BUILD_CC@
|
||||
BUILD_CCFLAGS = @BUILD_CFLAGS@
|
||||
BUILD_LDFLAGS = @BUILD_LDFLAGS@
|
||||
@ -118,8 +118,8 @@ BUILD_LIBS = @BUILD_LIBS@
|
||||
BUILD_EXEEXT = @BUILD_EXEEXT@
|
||||
x = @EXEEXT@
|
||||
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS)
|
||||
CFLAGS_NORMAL = $(CCFLAGS)
|
||||
CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
|
||||
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
|
||||
CFLAGS_PROFILE = $(CCFLAGS) -pg
|
||||
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.2+20200627) unstable; urgency=low
|
||||
ncurses6 (6.2+20200704) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Jun 2020 07:12:35 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 04 Jul 2020 09:08:52 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.2+20200627) unstable; urgency=low
|
||||
ncurses6 (6.2+20200704) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Jun 2020 07:12:35 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 04 Jul 2020 09:08:52 -0400
|
||||
|
||||
ncurses6 (5.9-20131005) unstable; urgency=low
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
ncurses6 (6.2+20200627) unstable; urgency=low
|
||||
ncurses6 (6.2+20200704) unstable; urgency=low
|
||||
|
||||
* latest weekly patch
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Jun 2020 07:12:35 -0400
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 04 Jul 2020 09:08:52 -0400
|
||||
|
||||
ncurses6 (5.9-20120608) unstable; urgency=low
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; $Id: mingw-ncurses.nsi,v 1.402 2020/06/27 11:12:35 tom Exp $
|
||||
; $Id: mingw-ncurses.nsi,v 1.403 2020/07/04 13:08:52 tom Exp $
|
||||
|
||||
; TODO add examples
|
||||
; TODO bump ABI to 6
|
||||
@ -10,7 +10,7 @@
|
||||
!define VERSION_MAJOR "6"
|
||||
!define VERSION_MINOR "2"
|
||||
!define VERSION_YYYY "2020"
|
||||
!define VERSION_MMDD "0627"
|
||||
!define VERSION_MMDD "0704"
|
||||
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
|
||||
|
||||
!define MY_ABI "5"
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: mingw32-ncurses6
|
||||
Version: 6.2
|
||||
Release: 20200627
|
||||
Release: 20200704
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: shared libraries for terminal handling
|
||||
Name: ncurses6
|
||||
Version: 6.2
|
||||
Release: 20200627
|
||||
Release: 20200704
|
||||
License: X11
|
||||
Group: Development/Libraries
|
||||
Source: ncurses-%{version}-%{release}.tgz
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user