From 04d942c3d98cf0a929c6afb17be8c10d4ae39af0 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 5 Jul 2020 01:11:37 +0000 Subject: [PATCH] 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++. --- Ada95/aclocal.m4 | 6 +- Ada95/configure | 2 +- NEWS | 10 +- VERSION | 2 +- aclocal.m4 | 6 +- c++/Makefile.in | 8 +- c++/cursesapp.h | 4 +- c++/cursesf.h | 32 ++--- c++/cursesm.h | 12 +- c++/cursesmain.cc | 4 +- c++/cursesp.h | 4 +- c++/cursesw.h | 21 +++- c++/cursslk.h | 6 +- c++/demo.cc | 4 +- c++/etip.h.in | 16 +-- configure | 2 +- dist.mk | 4 +- form/Makefile.in | 8 +- form/f_trace.c | 12 +- form/fld_arg.c | 6 +- form/fld_attr.c | 6 +- form/fld_current.c | 10 +- form/fld_def.c | 18 +-- form/fld_dup.c | 4 +- form/fld_ftchoice.c | 4 +- form/fld_ftlink.c | 4 +- form/fld_info.c | 6 +- form/fld_just.c | 6 +- form/fld_link.c | 4 +- form/fld_max.c | 4 +- form/fld_move.c | 4 +- form/fld_newftyp.c | 8 +- form/fld_opts.c | 10 +- form/fld_pad.c | 6 +- form/fld_page.c | 6 +- form/fld_stat.c | 6 +- form/fld_type.c | 6 +- form/fld_user.c | 6 +- form/form.h | 203 ++++++++++++++++--------------- form/form.priv.h | 74 +++++------ form/frm_cursor.c | 4 +- form/frm_data.c | 6 +- form/frm_def.c | 16 +-- form/frm_driver.c | 30 ++--- form/frm_hook.c | 6 +- form/frm_opts.c | 10 +- form/frm_page.c | 6 +- form/frm_post.c | 6 +- form/frm_req_name.c | 6 +- form/frm_scale.c | 4 +- form/frm_sub.c | 6 +- form/frm_user.c | 6 +- form/frm_win.c | 6 +- form/fty_alnum.c | 6 +- form/fty_alpha.c | 6 +- form/fty_enum.c | 6 +- form/fty_generic.c | 8 +- form/fty_int.c | 6 +- form/fty_ipv4.c | 6 +- form/fty_num.c | 6 +- form/fty_regex.c | 6 +- include/nc_alloc.h | 4 +- include/ncurses_dll.h.in | 72 ++++------- menu/Makefile.in | 8 +- menu/m_attribs.c | 6 +- menu/m_cursor.c | 6 +- menu/m_driver.c | 6 +- menu/m_format.c | 6 +- menu/m_global.c | 20 +-- menu/m_hook.c | 6 +- menu/m_item_cur.c | 8 +- menu/m_item_nam.c | 6 +- menu/m_item_new.c | 10 +- menu/m_item_opt.c | 10 +- menu/m_item_top.c | 6 +- menu/m_item_use.c | 6 +- menu/m_item_val.c | 6 +- menu/m_item_vis.c | 4 +- menu/m_items.c | 8 +- menu/m_new.c | 8 +- menu/m_opts.c | 10 +- menu/m_pad.c | 6 +- menu/m_pattern.c | 6 +- menu/m_post.c | 10 +- menu/m_req_name.c | 6 +- menu/m_scale.c | 4 +- menu/m_spacing.c | 6 +- menu/m_sub.c | 6 +- menu/m_trace.c | 14 +-- menu/m_userptr.c | 6 +- menu/m_win.c | 6 +- menu/menu.h | 167 +++++++++++++------------ menu/menu.priv.h | 40 +++--- ncurses/Makefile.in | 10 +- package/debian-mingw/changelog | 4 +- package/debian-mingw64/changelog | 4 +- package/debian/changelog | 4 +- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- panel/Makefile.in | 8 +- panel/p_above.c | 6 +- panel/p_below.c | 6 +- panel/p_bottom.c | 4 +- panel/p_delete.c | 4 +- panel/p_hidden.c | 4 +- panel/p_hide.c | 4 +- panel/p_move.c | 4 +- panel/p_new.c | 4 +- panel/p_replace.c | 4 +- panel/p_show.c | 4 +- panel/p_top.c | 4 +- panel/p_update.c | 6 +- panel/p_user.c | 6 +- panel/p_win.c | 4 +- panel/panel.c | 16 +-- panel/panel.h | 49 +++++--- panel/panel.priv.h | 18 +-- progs/Makefile.in | 6 +- progs/dump_entry.c | 2 +- 121 files changed, 720 insertions(+), 694 deletions(-) diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index 24f69deb..2857a780 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -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 ;; (*) diff --git a/Ada95/configure b/Ada95/configure index 61a921f1..31055527 100755 --- a/Ada95/configure +++ b/Ada95/configure @@ -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 ;; (*) diff --git a/NEWS b/NEWS index c2ad772f..fb669838 100644 --- a/NEWS +++ b/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. diff --git a/VERSION b/VERSION index 17e8fdcf..b2cb5b29 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20200627 +5:0:10 6.2 20200704 diff --git a/aclocal.m4 b/aclocal.m4 index 09260c46..269b4791 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 ;; (*) diff --git a/c++/Makefile.in b/c++/Makefile.in index 4444aa6f..5d864238 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -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@ diff --git a/c++/cursesapp.h b/c++/cursesapp.h index a09a3b63..bafc95a8 100644 --- a/c++/cursesapp.h +++ b/c++/cursesapp.h @@ -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 -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 diff --git a/c++/cursesf.h b/c++/cursesf.h index 17d4c70e..d5d2ec0e 100644 --- a/c++/cursesf.h +++ b/c++/cursesf.h @@ -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 NCURSES_IMPEXP NCursesUserField : public NCursesFormField +template 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 NCURSES_IMPEXP NCursesUserForm : public NCursesForm +template 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: diff --git a/c++/cursesm.h b/c++/cursesm.h index 413da764..383c7e12 100644 --- a/c++/cursesm.h +++ b/c++/cursesm.h @@ -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 // ------------------------------------------------------------------------- // -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 // ------------------------------------------------------------------------- // -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 NCURSES_IMPEXP NCursesUserItem : public NCursesMenuItem +template 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 NCURSES_IMPEXP NCursesUserMenu : public NCursesMenu +template class NCURSES_CXX_IMPEXP NCursesUserMenu : public NCursesMenu { protected: NCursesUserMenu( int nlines, diff --git a/c++/cursesmain.cc b/c++/cursesmain.cc index 9c11c993..a45ec8b4 100644 --- a/c++/cursesmain.cc +++ b/c++/cursesmain.cc @@ -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 @@ -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, ""); diff --git a/c++/cursesp.h b/c++/cursesp.h index d1eea968..eb9111b7 100644 --- a/c++/cursesp.h +++ b/c++/cursesp.h @@ -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 @@ -43,7 +43,7 @@ extern "C" { # include } -class NCURSES_IMPEXP NCursesPanel +class NCURSES_CXX_IMPEXP NCursesPanel : public NCursesWindow { protected: diff --git a/c++/cursesw.h b/c++/cursesw.h index 10a2da7e..602b7a96 100644 --- a/c++/cursesw.h +++ b/c++/cursesw.h @@ -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 } +#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 /* 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); diff --git a/c++/cursslk.h b/c++/cursslk.h index 6451d440..f93d0d85 100644 --- a/c++/cursslk.h +++ b/c++/cursslk.h @@ -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 -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; diff --git a/c++/demo.cc b/c++/demo.cc index 2b5451a4..f651e18e 100644 --- a/c++/demo.cc +++ b/c++/demo.cc @@ -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; -template class NCURSES_IMPEXP NCursesUserItem; +template class NCURSES_CXX_IMPEXP NCursesUserItem; class QuitItem : public NCursesMenuItem { diff --git a/c++/etip.h.in b/c++/etip.h.in index 6235965e..6dc41042 100644 --- a/c++/etip.h.in +++ b/c++/etip.h.in @@ -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; diff --git a/configure b/configure index b3b29cef..26b29bd1 100755 --- a/configure +++ b/configure @@ -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 ;; (*) diff --git a/dist.mk b/dist.mk index 5b40be7c..3a617749 100644 --- a/dist.mk +++ b/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) diff --git a/form/Makefile.in b/form/Makefile.in index d6f83af8..b70feab8 100644 --- a/form/Makefile.in +++ b/form/Makefile.in @@ -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@ diff --git a/form/f_trace.c b/form/f_trace.c index d24708ce..c8df81a5 100644 --- a/form/f_trace.c +++ b/form/f_trace.c @@ -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); diff --git a/form/fld_arg.c b/form/fld_arg.c index e7555f65..b9248487 100644 --- a/form/fld_arg.c +++ b/form/fld_arg.c @@ -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)); diff --git a/form/fld_attr.c b/form/fld_attr.c index 50e2c73d..bcfc918e 100644 --- a/form/fld_attr.c +++ b/form/fld_attr.c @@ -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) );\ diff --git a/form/fld_current.c b/form/fld_current.c index 75e68edd..264007ef 100644 --- a/form/fld_current.c +++ b/form/fld_current.c @@ -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)); diff --git a/form/fld_def.c b/form/fld_def.c index e529b3c0..de664eb5 100644 --- a/form/fld_def.c +++ b/form/fld_def.c @@ -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)); diff --git a/form/fld_dup.c b/form/fld_dup.c index cd100ef3..e195df95 100644 --- a/form/fld_dup.c +++ b/form/fld_dup.c @@ -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; diff --git a/form/fld_ftchoice.c b/form/fld_ftchoice.c index 5dc5f4a9..265f94f8 100644 --- a/form/fld_ftchoice.c +++ b/form/fld_ftchoice.c @@ -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 *)) diff --git a/form/fld_ftlink.c b/form/fld_ftlink.c index afa488b3..3d8af84d 100644 --- a/form/fld_ftlink.c +++ b/form/fld_ftlink.c @@ -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; diff --git a/form/fld_info.c b/form/fld_info.c index 9963b5b3..ae5a961d 100644 --- a/form/fld_info.c +++ b/form/fld_info.c @@ -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)"), diff --git a/form/fld_just.c b/form/fld_just.c index 8097019d..98e4649d 100644 --- a/form/fld_just.c +++ b/form/fld_just.c @@ -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)); diff --git a/form/fld_link.c b/form/fld_link.c index cb67ac07..5d5cd251 100644 --- a/form/fld_link.c +++ b/form/fld_link.c @@ -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; diff --git a/form/fld_max.c b/form/fld_max.c index 7d0e146d..bfeadf9b 100644 --- a/form/fld_max.c +++ b/form/fld_max.c @@ -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)); diff --git a/form/fld_move.c b/form/fld_move.c index 0d6692f3..af90e2b9 100644 --- a/form/fld_move.c +++ b/form/fld_move.c @@ -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)); diff --git a/form/fld_newftyp.c b/form/fld_newftyp.c index 18a7c073..c5848d5f 100644 --- a/form/fld_newftyp.c +++ b/form/fld_newftyp.c @@ -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)); diff --git a/form/fld_opts.c b/form/fld_opts.c index fee5804a..3b07e215 100644 --- a/form/fld_opts.c +++ b/form/fld_opts.c @@ -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; diff --git a/form/fld_pad.c b/form/fld_pad.c index b6d59e2c..f6292f24 100644 --- a/form/fld_pad.c +++ b/form/fld_pad.c @@ -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)); diff --git a/form/fld_page.c b/form/fld_page.c index c6fb37c8..cffbdaef 100644 --- a/form/fld_page.c +++ b/form/fld_page.c @@ -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)); diff --git a/form/fld_stat.c b/form/fld_stat.c index 487a21dc..43e71b55 100644 --- a/form/fld_stat.c +++ b/form/fld_stat.c @@ -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)); diff --git a/form/fld_type.c b/form/fld_type.c index a445fa4d..e9547ea5 100644 --- a/form/fld_type.c +++ b/form/fld_type.c @@ -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)); diff --git a/form/fld_user.c b/form/fld_user.c index 5cd165c8..307451cc 100644 --- a/form/fld_user.c +++ b/form/fld_user.c @@ -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)); diff --git a/form/form.h b/form/form.h index dabe6764..59a97a3d 100644 --- a/form/form.h +++ b/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 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 NCURSES_EXPORT(chtype) field_fore (const FIELD *); -extern NCURSES_EXPORT(chtype) field_back (const FIELD *); - -extern NCURSES_EXPORT(bool) new_page (const FIELD *); -extern NCURSES_EXPORT(bool) field_status (const FIELD *); - -extern NCURSES_EXPORT(void *) field_arg (const FIELD *); - -extern NCURSES_EXPORT(void *) field_userptr (const FIELD *); - -extern NCURSES_EXPORT(FIELDTYPE *) field_type (const FIELD *); - -extern NCURSES_EXPORT(char *) field_buffer (const FIELD *,int); - -extern NCURSES_EXPORT(Field_Options) field_opts (const FIELD *); +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 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 FORM_EXPORT(chtype) field_fore (const FIELD *); +extern FORM_EXPORT(chtype) field_back (const FIELD *); + +extern FORM_EXPORT(bool) new_page (const FIELD *); +extern FORM_EXPORT(bool) field_status (const FIELD *); + +extern FORM_EXPORT(void *) field_arg (const FIELD *); + +extern FORM_EXPORT(void *) field_userptr (const FIELD *); + +extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *); + +extern FORM_EXPORT(char *) field_buffer (const FIELD *,int); + +extern FORM_EXPORT(Field_Options) field_opts (const FIELD *); /****************** * FORM routines * ******************/ -extern NCURSES_EXPORT(FORM *) new_form (FIELD **); - -extern NCURSES_EXPORT(FIELD **) form_fields (const FORM *); -extern NCURSES_EXPORT(FIELD *) current_field (const FORM *); - -extern NCURSES_EXPORT(WINDOW *) form_win (const FORM *); -extern NCURSES_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 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(FORM *) new_form (FIELD **); + +extern FORM_EXPORT(FIELD **) form_fields (const FORM *); +extern FORM_EXPORT(FIELD *) current_field (const FORM *); + +extern FORM_EXPORT(WINDOW *) form_win (const FORM *); +extern FORM_EXPORT(WINDOW *) form_sub (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 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 diff --git a/form/form.priv.h b/form/form.priv.h index 53c717c6..482e928c 100644 --- a/form/form.priv.h +++ b/form/form.priv.h @@ -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 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(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 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 NCURSES_EXPORT(FIELDTYPE *) +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 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 */ diff --git a/form/frm_cursor.c b/form/frm_cursor.c index 8ff42bf8..daa6c5b7 100644 --- a/form/frm_cursor.c +++ b/form/frm_cursor.c @@ -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; diff --git a/form/frm_data.c b/form/frm_data.c index 5c3b2a04..61ee30bb 100644 --- a/form/frm_data.c +++ b/form/frm_data.c @@ -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; diff --git a/form/frm_def.c b/form/frm_def.c index 0722d517..8661c074 100644 --- a/form/frm_def.c +++ b/form/frm_def.c @@ -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)); diff --git a/form/frm_driver.c b/form/frm_driver.c index b9f91e12..90770861 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -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; diff --git a/form/frm_hook.c b/form/frm_hook.c index 3051cddc..39d4d22f 100644 --- a/form/frm_hook.c +++ b/form/frm_hook.c @@ -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 );\ diff --git a/form/frm_opts.c b/form/frm_opts.c index 18ab2938..a0e8b1c7 100644 --- a/form/frm_opts.c +++ b/form/frm_opts.c @@ -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)); diff --git a/form/frm_page.c b/form/frm_page.c index c8569eef..a4030a2b 100644 --- a/form/frm_page.c +++ b/form/frm_page.c @@ -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)); diff --git a/form/frm_post.c b/form/frm_post.c index 2f1ad813..ab880894 100644 --- a/form/frm_post.c +++ b/form/frm_post.c @@ -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)); diff --git a/form/frm_req_name.c b/form/frm_req_name.c index 1e56c3dc..27d46966 100644 --- a/form/frm_req_name.c +++ b/form/frm_req_name.c @@ -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 diff --git a/form/frm_scale.c b/form/frm_scale.c index 34c3611d..833f74eb 100644 --- a/form/frm_scale.c +++ b/form/frm_scale.c @@ -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)"), diff --git a/form/frm_sub.c b/form/frm_sub.c index 9621e302..f718ea46 100644 --- a/form/frm_sub.c +++ b/form/frm_sub.c @@ -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; diff --git a/form/frm_user.c b/form/frm_user.c index e1210f2d..78ac01c2 100644 --- a/form/frm_user.c +++ b/form/frm_user.c @@ -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)); diff --git a/form/frm_win.c b/form/frm_win.c index b7d1272d..5f3bc3c6 100644 --- a/form/frm_win.c +++ b/form/frm_win.c @@ -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; diff --git a/form/fty_alnum.c b/form/fty_alnum.c index a2ca3514..e02105b1 100644 --- a/form/fty_alnum.c +++ b/form/fty_alnum.c @@ -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; diff --git a/form/fty_alpha.c b/form/fty_alpha.c index 7dec23f5..2de39bb5 100644 --- a/form/fty_alpha.c +++ b/form/fty_alpha.c @@ -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; diff --git a/form/fty_enum.c b/form/fty_enum.c index 71978e3a..4b953dfa 100644 --- a/form/fty_enum.c +++ b/form/fty_enum.c @@ -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; diff --git a/form/fty_generic.c b/form/fty_generic.c index 159d3059..a3277901 100644 --- a/form/fty_generic.c +++ b/form/fty_generic.c @@ -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; diff --git a/form/fty_int.c b/form/fty_int.c index 71056404..bca3e1cd 100644 --- a/form/fty_int.c +++ b/form/fty_int.c @@ -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; diff --git a/form/fty_ipv4.c b/form/fty_ipv4.c index 37133770..9a9a185a 100644 --- a/form/fty_ipv4.c +++ b/form/fty_ipv4.c @@ -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; diff --git a/form/fty_num.c b/form/fty_num.c index b4dfeb97..021adf66 100644 --- a/form/fty_num.c +++ b/form/fty_num.c @@ -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 @@ -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; diff --git a/form/fty_regex.c b/form/fty_regex.c index 65405621..3a8b4047 100644 --- a/form/fty_regex.c +++ b/form/fty_regex.c @@ -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; diff --git a/include/nc_alloc.h b/include/nc_alloc.h index ca63e78c..8d19f98e 100644 --- a/include/nc_alloc.h +++ b/include/nc_alloc.h @@ -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 diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in index 469ab580..ac351e7c 100644 --- a/include/ncurses_dll.h.in +++ b/include/ncurses_dll.h.in @@ -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 */ diff --git a/menu/Makefile.in b/menu/Makefile.in index f9b4060d..ba9c96b8 100644 --- a/menu/Makefile.in +++ b/menu/Makefile.in @@ -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@ diff --git a/menu/m_attribs.c b/menu/m_attribs.c index e3c88ac4..5cd94d34 100644 --- a/menu/m_attribs.c +++ b/menu/m_attribs.c @@ -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);\ diff --git a/menu/m_cursor.c b/menu/m_cursor.c index 3f8e5480..fe50667c 100644 --- a/menu/m_cursor.c +++ b/menu/m_cursor.c @@ -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; diff --git a/menu/m_driver.c b/menu/m_driver.c index e592bab4..9ae7aaa5 100644 --- a/menu/m_driver.c +++ b/menu/m_driver.c @@ -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) \ diff --git a/menu/m_format.c b/menu/m_format.c index 9738dbf2..20c4454a 100644 --- a/menu/m_format.c +++ b/menu/m_format.c @@ -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) diff --git a/menu/m_global.c b/menu/m_global.c index 489987fe..044958c5 100644 --- a/menu/m_global.c +++ b/menu/m_global.c @@ -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, diff --git a/menu/m_hook.c b/menu/m_hook.c index c98aede7..916b9fc7 100644 --- a/menu/m_hook.c +++ b/menu/m_hook.c @@ -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);\ diff --git a/menu/m_item_cur.c b/menu/m_item_cur.c index c09bf311..f0da8b06 100644 --- a/menu/m_item_cur.c +++ b/menu/m_item_cur.c @@ -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)); diff --git a/menu/m_item_nam.c b/menu/m_item_nam.c index aaf54e0a..7d11fe5d 100644 --- a/menu/m_item_nam.c +++ b/menu/m_item_nam.c @@ -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)); diff --git a/menu/m_item_new.c b/menu/m_item_new.c index 1e7950db..403a470c 100644 --- a/menu/m_item_new.c +++ b/menu/m_item_new.c @@ -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)); diff --git a/menu/m_item_opt.c b/menu/m_item_opt.c index f8df2205..c40eb3ab 100644 --- a/menu/m_item_opt.c +++ b/menu/m_item_opt.c @@ -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)); diff --git a/menu/m_item_top.c b/menu/m_item_top.c index 9417e72b..57f1a431 100644 --- a/menu/m_item_top.c +++ b/menu/m_item_top.c @@ -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)); diff --git a/menu/m_item_use.c b/menu/m_item_use.c index 30814327..6bf738a4 100644 --- a/menu/m_item_use.c +++ b/menu/m_item_use.c @@ -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)); diff --git a/menu/m_item_val.c b/menu/m_item_val.c index d8d11f21..c62a4e17 100644 --- a/menu/m_item_val.c +++ b/menu/m_item_val.c @@ -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)); diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c index 8e993413..628396e7 100644 --- a/menu/m_item_vis.c +++ b/menu/m_item_vis.c @@ -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; diff --git a/menu/m_items.c b/menu/m_items.c index 9f46c8be..a539fddd 100644 --- a/menu/m_items.c +++ b/menu/m_items.c @@ -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)); diff --git a/menu/m_new.c b/menu/m_new.c index cf89196a..c1133896 100644 --- a/menu/m_new.c +++ b/menu/m_new.c @@ -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)); diff --git a/menu/m_opts.c b/menu/m_opts.c index 4c29f333..5f4cd76c 100644 --- a/menu/m_opts.c +++ b/menu/m_opts.c @@ -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)); diff --git a/menu/m_pad.c b/menu/m_pad.c index 3d5702ae..6c87992a 100644 --- a/menu/m_pad.c +++ b/menu/m_pad.c @@ -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)); diff --git a/menu/m_pattern.c b/menu/m_pattern.c index 9ff02304..469a0021 100644 --- a/menu/m_pattern.c +++ b/menu/m_pattern.c @@ -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; diff --git a/menu/m_post.c b/menu/m_post.c index 2cc0ea09..c8ccab2d 100644 --- a/menu/m_post.c +++ b/menu/m_post.c @@ -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; diff --git a/menu/m_req_name.c b/menu/m_req_name.c index d3f04c1d..7d1e7bf5 100644 --- a/menu/m_req_name.c +++ b/menu/m_req_name.c @@ -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 diff --git a/menu/m_scale.c b/menu/m_scale.c index e013acd8..3021b3e2 100644 --- a/menu/m_scale.c +++ b/menu/m_scale.c @@ -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)"), diff --git a/menu/m_spacing.c b/menu/m_spacing.c index 9bb746a0..ff32c86b 100644 --- a/menu/m_spacing.c +++ b/menu/m_spacing.c @@ -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 */ diff --git a/menu/m_sub.c b/menu/m_sub.c index 4658e90e..9f2fc139 100644 --- a/menu/m_sub.c +++ b/menu/m_sub.c @@ -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); diff --git a/menu/m_trace.c b/menu/m_trace.c index f5332b18..b0ab45ee 100644 --- a/menu/m_trace.c +++ b/menu/m_trace.c @@ -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)); diff --git a/menu/m_userptr.c b/menu/m_userptr.c index df3a45f8..dc87da12 100644 --- a/menu/m_userptr.c +++ b/menu/m_userptr.c @@ -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)); diff --git a/menu/m_win.c b/menu/m_win.c index f06c5808..d4a9f75d 100644 --- a/menu/m_win.c +++ b/menu/m_win.c @@ -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); diff --git a/menu/menu.h b/menu/menu.h index b2e845c6..bef5a5cb 100644 --- a/menu/menu.h +++ b/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 NCURSES_EXPORT(MENU *) new_menu (ITEM **); - -extern NCURSES_EXPORT(Item_Options) item_opts (const ITEM *); -extern NCURSES_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 NCURSES_EXPORT(WINDOW *) menu_sub (const MENU *); -extern NCURSES_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 NCURSES_EXPORT(char *) menu_pattern (const MENU *); - -extern NCURSES_EXPORT(void *) menu_userptr (const MENU *); -extern NCURSES_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 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 NCURSES_EXPORT(bool) item_value (const ITEM *); -extern NCURSES_EXPORT(bool) item_visible (const ITEM *); - -extern NCURSES_EXPORT(void) menu_format (const MENU *,int *,int *); +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 MENU_EXPORT(MENU *) new_menu (ITEM **); + +extern MENU_EXPORT(Item_Options) item_opts (const ITEM *); +extern MENU_EXPORT(Menu_Options) menu_opts (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 MENU_EXPORT(WINDOW *) menu_sub (const MENU *); +extern MENU_EXPORT(WINDOW *) menu_win (const MENU *); + +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 MENU_EXPORT(char *) menu_pattern (const MENU *); + +extern MENU_EXPORT(void *) menu_userptr (const MENU *); +extern MENU_EXPORT(void *) item_userptr (const ITEM *); + +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 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 MENU_EXPORT(bool) item_value (const ITEM *); +extern MENU_EXPORT(bool) item_visible (const ITEM *); + +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 diff --git a/menu/menu.priv.h b/menu/menu.priv.h index d084565a..0bc6147e 100644 --- a/menu/menu.priv.h +++ b/menu/menu.priv.h @@ -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 */ diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in index 3969b2c1..6d55ce58 100644 --- a/ncurses/Makefile.in +++ b/ncurses/Makefile.in @@ -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@ diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index e123a54d..b88f5bd6 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200627) unstable; urgency=low +ncurses6 (6.2+20200704) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 27 Jun 2020 07:12:35 -0400 + -- Thomas E. Dickey Sat, 04 Jul 2020 09:08:52 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index e123a54d..b88f5bd6 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200627) unstable; urgency=low +ncurses6 (6.2+20200704) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 27 Jun 2020 07:12:35 -0400 + -- Thomas E. Dickey Sat, 04 Jul 2020 09:08:52 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 17af906e..06e29d3b 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200627) unstable; urgency=low +ncurses6 (6.2+20200704) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 27 Jun 2020 07:12:35 -0400 + -- Thomas E. Dickey Sat, 04 Jul 2020 09:08:52 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index e792caf6..52c4fb71 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -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" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 0888c4e1..7c6f24fc 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -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 diff --git a/package/ncurses.spec b/package/ncurses.spec index aef78fc6..d64a7b56 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -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 diff --git a/package/ncursest.spec b/package/ncursest.spec index 03deff38..e50ea65a 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.2 -Release: 20200627 +Release: 20200704 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/panel/Makefile.in b/panel/Makefile.in index f4717a31..1cba313c 100644 --- a/panel/Makefile.in +++ b/panel/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.72 2020/02/22 16:40:36 tom Exp $ +# $Id: Makefile.in,v 1.73 2020/05/24 01:40:20 anonymous.maarten Exp $ ############################################################################## # Copyright 2020 Thomas E. Dickey # # Copyright 1998-2015,2018 Free Software Foundation, Inc. # @@ -96,12 +96,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_PANEL @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@ diff --git a/panel/p_above.c b/panel/p_above.c index 12b5b87b..2a6fde55 100644 --- a/panel/p_above.c +++ b/panel/p_above.c @@ -37,10 +37,10 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_above.c,v 1.10 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_above.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $") #if NCURSES_SP_FUNCS -NCURSES_EXPORT(PANEL *) +PANEL_EXPORT(PANEL *) ground_panel(SCREEN * sp) { T((T_CALLED("ground_panel(%p)"), (void *)sp)); @@ -63,7 +63,7 @@ ground_panel(SCREEN * sp) } #endif -NCURSES_EXPORT(PANEL *) +PANEL_EXPORT(PANEL *) panel_above(const PANEL * pan) { PANEL *result; diff --git a/panel/p_below.c b/panel/p_below.c index a8b1ef47..100393d5 100644 --- a/panel/p_below.c +++ b/panel/p_below.c @@ -37,10 +37,10 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_below.c,v 1.10 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_below.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $") #if NCURSES_SP_FUNCS -NCURSES_EXPORT(PANEL *) +PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN * sp) { T((T_CALLED("ceiling_panel(%p)"), (void *)sp)); @@ -61,7 +61,7 @@ ceiling_panel(SCREEN * sp) } #endif -NCURSES_EXPORT(PANEL *) +PANEL_EXPORT(PANEL *) panel_below(const PANEL * pan) { PANEL *result; diff --git a/panel/p_bottom.c b/panel/p_bottom.c index a69ac9f4..9b22f045 100644 --- a/panel/p_bottom.c +++ b/panel/p_bottom.c @@ -38,9 +38,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_bottom.c,v 1.14 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_bottom.c,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) bottom_panel(PANEL * pan) { int err = OK; diff --git a/panel/p_delete.c b/panel/p_delete.c index 6b122a6c..2c311ca0 100644 --- a/panel/p_delete.c +++ b/panel/p_delete.c @@ -38,9 +38,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_delete.c,v 1.11 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_delete.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) del_panel(PANEL * pan) { int err = OK; diff --git a/panel/p_hidden.c b/panel/p_hidden.c index ddb23b13..43057fa5 100644 --- a/panel/p_hidden.c +++ b/panel/p_hidden.c @@ -38,9 +38,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_hidden.c,v 1.10 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_hidden.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) panel_hidden(const PANEL * pan) { int rc = ERR; diff --git a/panel/p_hide.c b/panel/p_hide.c index fc26f752..c3bcc8a7 100644 --- a/panel/p_hide.c +++ b/panel/p_hide.c @@ -37,9 +37,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_hide.c,v 1.12 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_hide.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) hide_panel(register PANEL * pan) { int err = ERR; diff --git a/panel/p_move.c b/panel/p_move.c index 02830bf5..7ff6fa7e 100644 --- a/panel/p_move.c +++ b/panel/p_move.c @@ -38,9 +38,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_move.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) move_panel(PANEL * pan, int starty, int startx) { int rc = ERR; diff --git a/panel/p_new.c b/panel/p_new.c index d2f8d036..1adb15f2 100644 --- a/panel/p_new.c +++ b/panel/p_new.c @@ -39,7 +39,7 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_new.c,v 1.17 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_new.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $") #ifdef TRACE static char *stdscr_id; @@ -89,7 +89,7 @@ root_panel(NCURSES_SP_DCL0) return _nc_stdscr_pseudo_panel; } -NCURSES_EXPORT(PANEL *) +PANEL_EXPORT(PANEL *) new_panel(WINDOW *win) { PANEL *pan = (PANEL *) 0; diff --git a/panel/p_replace.c b/panel/p_replace.c index 5acbccf8..a2d56ae6 100644 --- a/panel/p_replace.c +++ b/panel/p_replace.c @@ -37,9 +37,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_replace.c,v 1.12 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_replace.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) replace_panel(PANEL * pan, WINDOW *win) { int rc = ERR; diff --git a/panel/p_show.c b/panel/p_show.c index 933bf5aa..0b835e3c 100644 --- a/panel/p_show.c +++ b/panel/p_show.c @@ -37,9 +37,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_show.c,v 1.14 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_show.c,v 1.15 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) show_panel(PANEL * pan) { int err = ERR; diff --git a/panel/p_top.c b/panel/p_top.c index 09e89fcc..17abd768 100644 --- a/panel/p_top.c +++ b/panel/p_top.c @@ -37,9 +37,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_top.c,v 1.7 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_top.c,v 1.8 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) top_panel(PANEL * pan) { T((T_CALLED("top_panel(%p)"), (void *)pan)); diff --git a/panel/p_update.c b/panel/p_update.c index 3fe4770b..40212965 100644 --- a/panel/p_update.c +++ b/panel/p_update.c @@ -38,9 +38,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_update.c,v 1.12 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_update.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(void) +PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0) { PANEL *pan; @@ -71,7 +71,7 @@ NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0) } #if NCURSES_SP_FUNCS -NCURSES_EXPORT(void) +PANEL_EXPORT(void) update_panels(void) { NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN); diff --git a/panel/p_user.c b/panel/p_user.c index 633431ea..9eec8ba1 100644 --- a/panel/p_user.c +++ b/panel/p_user.c @@ -37,9 +37,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_user.c,v 1.9 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_user.c,v 1.10 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr) { T((T_CALLED("set_panel_userptr(%p,%p)"), (void *)pan, (NCURSES_CONST void *)uptr)); @@ -49,7 +49,7 @@ set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr) returnCode(OK); } -NCURSES_EXPORT(NCURSES_CONST void *) +PANEL_EXPORT(NCURSES_CONST void *) panel_userptr(const PANEL * pan) { T((T_CALLED("panel_userptr(%p)"), (const void *)pan)); diff --git a/panel/p_win.c b/panel/p_win.c index 023a71c9..d1889885 100644 --- a/panel/p_win.c +++ b/panel/p_win.c @@ -37,9 +37,9 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_win.c,v 1.7 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: p_win.c,v 1.8 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(WINDOW *) +PANEL_EXPORT(WINDOW *) panel_window(const PANEL * pan) { T((T_CALLED("panel_window(%p)"), (const void *)pan)); diff --git a/panel/panel.c b/panel/panel.c index a0e632d2..0d152056 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -37,13 +37,13 @@ /* panel.c -- implementation of panels library, some core routines */ #include "panel.priv.h" -MODULE_ID("$Id: panel.c,v 1.27 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: panel.c,v 1.28 2020/05/24 01:40:20 anonymous.maarten Exp $") /*+------------------------------------------------------------------------- _nc_retrace_panel (pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(PANEL *) +PANEL_EXPORT(PANEL *) _nc_retrace_panel(PANEL * pan) { T((T_RETURN("%p"), (void *)pan)); @@ -56,7 +56,7 @@ _nc_retrace_panel(PANEL * pan) --------------------------------------------------------------------------*/ #ifdef TRACE #ifndef TRACE_TXT -NCURSES_EXPORT(const char *) +PANEL_EXPORT(const char *) _nc_my_visbuf(const void *ptr) { char temp[32]; @@ -74,7 +74,7 @@ _nc_my_visbuf(const void *ptr) dPanel(text,pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_dPanel(const char *text, const PANEL * pan) { _tracef("%s id=%s b=%s a=%s y=%d x=%d", @@ -89,7 +89,7 @@ _nc_dPanel(const char *text, const PANEL * pan) dStack(fmt,num,pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_dStack(const char *fmt, int num, const PANEL * pan) { char s80[80]; @@ -115,7 +115,7 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan) Wnoutrefresh(pan) - debugging hook for wnoutrefresh --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_Wnoutrefresh(const PANEL * pan) { dPanel("wnoutrefresh", pan); @@ -127,7 +127,7 @@ _nc_Wnoutrefresh(const PANEL * pan) Touchpan(pan) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_Touchpan(const PANEL * pan) { dPanel("Touchpan", pan); @@ -139,7 +139,7 @@ _nc_Touchpan(const PANEL * pan) Touchline(pan,start,count) --------------------------------------------------------------------------*/ #ifdef TRACE -NCURSES_EXPORT(void) +PANEL_EXPORT(void) _nc_Touchline(const PANEL * pan, int start, int count) { char s80[80]; diff --git a/panel/panel.h b/panel/panel.h index 2eebe178..62acc8ff 100644 --- a/panel/panel.h +++ b/panel/panel.h @@ -33,7 +33,7 @@ * and: Juergen Pfeifer 1996-1999,2008 * ****************************************************************************/ -/* $Id: panel.h,v 1.13 2020/02/02 23:34:34 tom Exp $ */ +/* $Id: panel.h,v 1.14 2020/07/04 20:38:43 tom Exp $ */ /* panel.h -- interface file for panels library */ @@ -57,27 +57,38 @@ PANEL; extern "C" { #endif -extern NCURSES_EXPORT(WINDOW*) panel_window (const PANEL *); -extern NCURSES_EXPORT(void) update_panels (void); -extern NCURSES_EXPORT(int) hide_panel (PANEL *); -extern NCURSES_EXPORT(int) show_panel (PANEL *); -extern NCURSES_EXPORT(int) del_panel (PANEL *); -extern NCURSES_EXPORT(int) top_panel (PANEL *); -extern NCURSES_EXPORT(int) bottom_panel (PANEL *); -extern NCURSES_EXPORT(PANEL*) new_panel (WINDOW *); -extern NCURSES_EXPORT(PANEL*) panel_above (const PANEL *); -extern NCURSES_EXPORT(PANEL*) panel_below (const PANEL *); -extern NCURSES_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *); -extern NCURSES_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *); -extern NCURSES_EXPORT(int) move_panel (PANEL *, int, int); -extern NCURSES_EXPORT(int) replace_panel (PANEL *,WINDOW *); -extern NCURSES_EXPORT(int) panel_hidden (const PANEL *); +#if defined(BUILDING_PANEL) +# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT +#else +# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT +#endif + +#define PANEL_WRAPPED_VAR(type,name) extern PANEL_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) + +#define PANEL_EXPORT(type) PANEL_IMPEXP type NCURSES_API +#define PANEL_EXPORT_VAR(type) PANEL_IMPEXP type + +extern PANEL_EXPORT(WINDOW*) panel_window (const PANEL *); +extern PANEL_EXPORT(void) update_panels (void); +extern PANEL_EXPORT(int) hide_panel (PANEL *); +extern PANEL_EXPORT(int) show_panel (PANEL *); +extern PANEL_EXPORT(int) del_panel (PANEL *); +extern PANEL_EXPORT(int) top_panel (PANEL *); +extern PANEL_EXPORT(int) bottom_panel (PANEL *); +extern PANEL_EXPORT(PANEL*) new_panel (WINDOW *); +extern PANEL_EXPORT(PANEL*) panel_above (const PANEL *); +extern PANEL_EXPORT(PANEL*) panel_below (const PANEL *); +extern PANEL_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *); +extern PANEL_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *); +extern PANEL_EXPORT(int) move_panel (PANEL *, int, int); +extern PANEL_EXPORT(int) replace_panel (PANEL *,WINDOW *); +extern PANEL_EXPORT(int) panel_hidden (const PANEL *); #if NCURSES_SP_FUNCS -extern NCURSES_EXPORT(PANEL *) ground_panel(SCREEN *); -extern NCURSES_EXPORT(PANEL *) ceiling_panel(SCREEN *); +extern PANEL_EXPORT(PANEL *) ground_panel(SCREEN *); +extern PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN *); -extern NCURSES_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*); +extern PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*); #endif #if defined(__cplusplus) diff --git a/panel/panel.priv.h b/panel/panel.priv.h index c8e3ea79..a11c87be 100644 --- a/panel/panel.priv.h +++ b/panel/panel.priv.h @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ -/* $Id: panel.priv.h,v 1.28 2020/02/02 23:34:34 tom Exp $ */ +/* $Id: panel.priv.h,v 1.29 2020/05/24 01:40:20 anonymous.maarten Exp $ */ #ifndef NCURSES_PANEL_PRIV_H #define NCURSES_PANEL_PRIV_H 1 @@ -50,7 +50,7 @@ struct screen; /* forward declaration */ #include "panel.h" #ifdef TRACE - extern NCURSES_EXPORT(const char *) _nc_my_visbuf (const void *); + extern PANEL_EXPORT(const char *) _nc_my_visbuf (const void *); # ifdef TRACE_TXT # define USER_PTR(ptr) _nc_visbuf((const char *)ptr) # else @@ -59,12 +59,12 @@ struct screen; /* forward declaration */ # define returnPanel(code) TRACE_RETURN1(code,panel) - extern NCURSES_EXPORT(PANEL *) _nc_retrace_panel (PANEL *); - extern NCURSES_EXPORT(void) _nc_dPanel (const char*, const PANEL*); - extern NCURSES_EXPORT(void) _nc_dStack (const char*, int, const PANEL*); - extern NCURSES_EXPORT(void) _nc_Wnoutrefresh (const PANEL*); - extern NCURSES_EXPORT(void) _nc_Touchpan (const PANEL*); - extern NCURSES_EXPORT(void) _nc_Touchline (const PANEL*, int, int); + extern PANEL_EXPORT(PANEL *) _nc_retrace_panel (PANEL *); + extern PANEL_EXPORT(void) _nc_dPanel (const char*, const PANEL*); + extern PANEL_EXPORT(void) _nc_dStack (const char*, int, const PANEL*); + extern PANEL_EXPORT(void) _nc_Wnoutrefresh (const PANEL*); + extern PANEL_EXPORT(void) _nc_Touchpan (const PANEL*); + extern PANEL_EXPORT(void) _nc_Touchline (const PANEL*, int, int); # define dBug(x) _tracef x # define dPanel(text,pan) _nc_dPanel(text,pan) @@ -205,7 +205,7 @@ struct screen; /* forward declaration */ #if NCURSES_SP_FUNCS /* These may become later renamed and part of panel.h and the public API */ -extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*); +extern PANEL_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*); #endif /* *INDENT-ON* */ diff --git a/progs/Makefile.in b/progs/Makefile.in index 79cbc99e..4606b25c 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.103 2020/02/02 23:34:34 tom Exp $ +# $Id: Makefile.in,v 1.104 2020/05/24 01:40:20 anonymous.maarten Exp $ ############################################################################## # Copyright 2020 Thomas E. Dickey # # Copyright 1998-2016,2018 Free Software Foundation, Inc. # @@ -97,8 +97,8 @@ CPPFLAGS = -DHAVE_CONFIG_H -I../progs @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@ diff --git a/progs/dump_entry.c b/progs/dump_entry.c index 85d56eb9..b644e8e7 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -40,7 +40,7 @@ #include "termsort.c" /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.176 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.178 2020/07/04 20:00:29 tom Exp $") #define DISCARD(string) string = ABSENT_STRING #define PRINTF (void) printf -- 2.44.0