summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/menu
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerpeter <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commitb7ada7f2444f41b672faef4f93e446bdf8584cf9 (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/menu
parenta81407a537bfd1ab9e48c69007eb6b30e66d271b (diff)
downloadFreeBSD-src-b7ada7f2444f41b672faef4f93e446bdf8584cf9.zip
FreeBSD-src-b7ada7f2444f41b672faef4f93e446bdf8584cf9.tar.gz
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Diffstat (limited to 'contrib/ncurses/menu')
-rw-r--r--contrib/ncurses/menu/Makefile.in14
-rw-r--r--contrib/ncurses/menu/eti.h4
-rw-r--r--contrib/ncurses/menu/m_attribs.c8
-rw-r--r--contrib/ncurses/menu/m_cursor.c13
-rw-r--r--contrib/ncurses/menu/m_driver.c11
-rw-r--r--contrib/ncurses/menu/m_format.c10
-rw-r--r--contrib/ncurses/menu/m_global.c28
-rw-r--r--contrib/ncurses/menu/m_hook.c8
-rw-r--r--contrib/ncurses/menu/m_item_cur.c13
-rw-r--r--contrib/ncurses/menu/m_item_nam.c10
-rw-r--r--contrib/ncurses/menu/m_item_new.c16
-rw-r--r--contrib/ncurses/menu/m_item_opt.c16
-rw-r--r--contrib/ncurses/menu/m_item_top.c10
-rw-r--r--contrib/ncurses/menu/m_item_use.c10
-rw-r--r--contrib/ncurses/menu/m_item_val.c10
-rw-r--r--contrib/ncurses/menu/m_item_vis.c7
-rw-r--r--contrib/ncurses/menu/m_items.c13
-rw-r--r--contrib/ncurses/menu/m_new.c10
-rw-r--r--contrib/ncurses/menu/m_opts.c16
-rw-r--r--contrib/ncurses/menu/m_pad.c10
-rw-r--r--contrib/ncurses/menu/m_pattern.c12
-rw-r--r--contrib/ncurses/menu/m_post.c16
-rw-r--r--contrib/ncurses/menu/m_req_name.c10
-rw-r--r--contrib/ncurses/menu/m_scale.c7
-rw-r--r--contrib/ncurses/menu/m_spacing.c11
-rw-r--r--contrib/ncurses/menu/m_sub.c10
-rw-r--r--contrib/ncurses/menu/m_userptr.c10
-rw-r--r--contrib/ncurses/menu/m_win.c10
-rw-r--r--contrib/ncurses/menu/menu.h154
-rw-r--r--contrib/ncurses/menu/menu.priv.h26
30 files changed, 284 insertions, 219 deletions
diff --git a/contrib/ncurses/menu/Makefile.in b/contrib/ncurses/menu/Makefile.in
index 322e94e..b27651c 100644
--- a/contrib/ncurses/menu/Makefile.in
+++ b/contrib/ncurses/menu/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.30 2000/08/26 21:51:35 tom Exp $
+# $Id: Makefile.in,v 1.32 2001/03/24 19:53:31 tom Exp $
##############################################################################
-# Copyright (c) 1998-2000 Free Software Foundation, Inc. #
+# Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -53,6 +53,8 @@ exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
+LIBTOOL = @LIBTOOL@
+
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
INSTALL_DATA = @INSTALL_DATA@
@@ -72,15 +74,15 @@ CPPFLAGS = @CPPFLAGS@ \
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
+CFLAGS_LIBTOOL = $(CCFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
-
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
-LINK = $(CC)
+LINK = $(LIBTOOL) $(CC)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib -L$(libdir)
@@ -88,6 +90,8 @@ SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
+NCURSES_MAJOR = @NCURSES_MAJOR@
+NCURSES_MINOR = @NCURSES_MINOR@
REL_VERSION = @cf_cv_rel_version@
ABI_VERSION = @cf_cv_abi_version@
@@ -138,7 +142,7 @@ tags:
@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
- -rm -f core tags TAGS *~ *.ln *.atac trace
+ -rm -f core tags TAGS *~ *.i *.ln *.atac trace
clean :: mostlyclean
-rm -f $(AUTO_SRC)
diff --git a/contrib/ncurses/menu/eti.h b/contrib/ncurses/menu/eti.h
index cc1c830..4561fa441 100644
--- a/contrib/ncurses/menu/eti.h
+++ b/contrib/ncurses/menu/eti.h
@@ -30,8 +30,8 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 *
****************************************************************************/
-#ifndef _ETI_ERRNO_H_
-#define _ETI_ERRNO_H_
+#ifndef NCURSES_ETI_H_incl
+#define NCURSES_ETI_H_incl 1
#define E_OK (0)
#define E_SYSTEM_ERROR (-1)
diff --git a/contrib/ncurses/menu/m_attribs.c b/contrib/ncurses/menu/m_attribs.c
index 3cf2a11..4c87a94 100644
--- a/contrib/ncurses/menu/m_attribs.c
+++ b/contrib/ncurses/menu/m_attribs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_attribs.c,v 1.8 1999/05/16 17:24:24 juergen Exp $")
+MODULE_ID("$Id: m_attribs.c,v 1.9 2000/12/10 02:16:48 tom Exp $")
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_attribs.c,v 1.8 1999/05/16 17:24:24 juergen Exp $")
/* "Template" macro to generate a function to set a menus attribute */
#define GEN_MENU_ATTR_SET_FCT( name ) \
-int set_menu_ ## name (MENU * menu, chtype attr)\
+NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU * menu, chtype attr)\
{\
if (!(attr==A_NORMAL || (attr & A_ATTRIBUTES)==attr))\
RETURN(E_BAD_ARGUMENT);\
@@ -64,7 +64,7 @@ int set_menu_ ## name (MENU * menu, chtype attr)\
/* "Template" macro to generate a function to get a menus attribute */
#define GEN_MENU_ATTR_GET_FCT( name ) \
-chtype menu_ ## name (const MENU * menu)\
+NCURSES_IMPEXP chtype NCURSES_API menu_ ## name (const MENU * menu)\
{\
return (Normalize_Menu( menu ) -> name);\
}
diff --git a/contrib/ncurses/menu/m_cursor.c b/contrib/ncurses/menu/m_cursor.c
index a463089..ccca36c 100644
--- a/contrib/ncurses/menu/m_cursor.c
+++ b/contrib/ncurses/menu/m_cursor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_cursor.c,v 1.13 1999/05/16 17:24:43 juergen Exp $")
+MODULE_ID("$Id: m_cursor.c,v 1.14 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -49,9 +49,9 @@ MODULE_ID("$Id: m_cursor.c,v 1.13 1999/05/16 17:24:43 juergen Exp $")
| E_BAD_ARGUMENT - invalid menu
| E_NOT_POSTED - Menu is not posted
+--------------------------------------------------------------------------*/
-int _nc_menu_cursor_pos(const MENU* menu,
- const ITEM* item,
- int* pY, int* pX)
+NCURSES_EXPORT(int)
+_nc_menu_cursor_pos
+(const MENU* menu, const ITEM* item, int* pY, int* pX)
{
if (!menu || !pX || !pY)
return(E_BAD_ARGUMENT);
@@ -80,7 +80,8 @@ int _nc_menu_cursor_pos(const MENU* menu,
| E_BAD_ARGUMENT - invalid menu
| E_NOT_POSTED - Menu is not posted
+--------------------------------------------------------------------------*/
-int pos_menu_cursor(const MENU * menu)
+NCURSES_EXPORT(int)
+pos_menu_cursor (const MENU * menu)
{
WINDOW *win, *sub;
int x, y;
diff --git a/contrib/ncurses/menu/m_driver.c b/contrib/ncurses/menu/m_driver.c
index fef3e8e..69115cf 100644
--- a/contrib/ncurses/menu/m_driver.c
+++ b/contrib/ncurses/menu/m_driver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_driver.c,v 1.17 1999/05/16 17:24:55 juergen Exp $")
+MODULE_ID("$Id: m_driver.c,v 1.18 2000/12/10 02:16:48 tom Exp $")
/* Macros */
@@ -111,7 +111,9 @@ static bool Is_Sub_String(
| Return Values : E_OK - an item matching the pattern was found
| E_NO_MATCH - nothing found
+--------------------------------------------------------------------------*/
-int _nc_Match_Next_Character_In_Item_Name(MENU *menu, int ch, ITEM **item)
+NCURSES_EXPORT(int)
+_nc_Match_Next_Character_In_Item_Name
+(MENU *menu, int ch, ITEM **item)
{
bool found = FALSE, passed = FALSE;
int idx, last;
@@ -198,7 +200,8 @@ int _nc_Match_Next_Character_In_Item_Name(MENU *menu, int ch, ITEM **item)
| E_BAD_STATE - menu is in user hook routine
| E_NOT_POSTED - menu is not posted
+--------------------------------------------------------------------------*/
-int menu_driver(MENU * menu, int c)
+NCURSES_EXPORT(int)
+menu_driver (MENU * menu, int c)
{
#define NAVIGATE(dir) \
if (!item->dir)\
diff --git a/contrib/ncurses/menu/m_format.c b/contrib/ncurses/menu/m_format.c
index 829fbe8..ffd8e70 100644
--- a/contrib/ncurses/menu/m_format.c
+++ b/contrib/ncurses/menu/m_format.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_format.c,v 1.9 1999/05/16 17:25:04 juergen Exp $")
+MODULE_ID("$Id: m_format.c,v 1.10 2000/12/10 02:16:48 tom Exp $")
#define minimum(a,b) ((a)<(b) ? (a): (b))
@@ -55,7 +55,8 @@ MODULE_ID("$Id: m_format.c,v 1.9 1999/05/16 17:25:04 juergen Exp $")
| E_NOT_CONNECTED - there are no items connected
| E_POSTED - the menu is already posted
+--------------------------------------------------------------------------*/
-int set_menu_format(MENU *menu, int rows, int cols)
+NCURSES_EXPORT(int)
+set_menu_format (MENU *menu, int rows, int cols)
{
int total_rows, total_cols;
@@ -114,7 +115,8 @@ int set_menu_format(MENU *menu, int rows, int cols)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void menu_format(const MENU *menu, int *rows, int *cols)
+NCURSES_EXPORT(void)
+menu_format (const MENU *menu, int *rows, int *cols)
{
if (rows)
*rows = Normalize_Menu(menu)->frows;
diff --git a/contrib/ncurses/menu/m_global.c b/contrib/ncurses/menu/m_global.c
index 3633e55..0100618 100644
--- a/contrib/ncurses/menu/m_global.c
+++ b/contrib/ncurses/menu/m_global.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,9 +37,9 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_global.c,v 1.11 1999/05/16 17:25:14 juergen Exp $")
+MODULE_ID("$Id: m_global.c,v 1.12 2000/12/10 02:16:48 tom Exp $")
-MENU _nc_Default_Menu = {
+NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = {
16, /* Nr. of chars high */
1, /* Nr. of chars wide */
16, /* Nr. of items high */
@@ -78,7 +78,7 @@ MENU _nc_Default_Menu = {
0 /* status */
};
-ITEM _nc_Default_Item = {
+NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = {
{ (char *)0, 0 }, /* name */
{ (char *)0, 0 }, /* description */
(MENU *)0, /* Pointer to parent menu */
@@ -161,7 +161,8 @@ INLINE static void ResetConnectionInfo(MENU *menu, ITEM **items)
| Return Values : TRUE - successfull connection
| FALSE - connection failed
+--------------------------------------------------------------------------*/
-bool _nc_Connect_Items(MENU *menu, ITEM **items)
+NCURSES_EXPORT(bool)
+_nc_Connect_Items (MENU *menu, ITEM **items)
{
ITEM **item;
unsigned int ItemCount = 0;
@@ -222,7 +223,8 @@ bool _nc_Connect_Items(MENU *menu, ITEM **items)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void _nc_Disconnect_Items(MENU * menu)
+NCURSES_EXPORT(void)
+_nc_Disconnect_Items (MENU * menu)
{
if (menu && menu->items)
ResetConnectionInfo( menu, menu->items );
@@ -237,7 +239,8 @@ void _nc_Disconnect_Items(MENU * menu)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void _nc_Calculate_Item_Length_and_Width(MENU * menu)
+NCURSES_EXPORT(void)
+_nc_Calculate_Item_Length_and_Width (MENU * menu)
{
int l;
@@ -265,7 +268,8 @@ void _nc_Calculate_Item_Length_and_Width(MENU * menu)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void _nc_Link_Items(MENU * menu)
+NCURSES_EXPORT(void)
+_nc_Link_Items (MENU * menu)
{
if (menu && menu->items && *(menu->items))
{
@@ -391,7 +395,8 @@ void _nc_Link_Items(MENU * menu)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void _nc_Show_Menu(const MENU *menu)
+NCURSES_EXPORT(void)
+_nc_Show_Menu (const MENU *menu)
{
WINDOW *win;
int maxy, maxx;
@@ -430,8 +435,9 @@ void _nc_Show_Menu(const MENU *menu)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void _nc_New_TopRow_and_CurrentItem(MENU *menu, int new_toprow,
- ITEM *new_current_item)
+NCURSES_EXPORT(void)
+_nc_New_TopRow_and_CurrentItem
+(MENU *menu, int new_toprow, ITEM *new_current_item)
{
ITEM *cur_item;
bool mterm_called = FALSE;
diff --git a/contrib/ncurses/menu/m_hook.c b/contrib/ncurses/menu/m_hook.c
index e031d37..783ec00 100644
--- a/contrib/ncurses/menu/m_hook.c
+++ b/contrib/ncurses/menu/m_hook.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,11 +37,11 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_hook.c,v 1.8 1999/05/16 17:25:24 juergen Exp $")
+MODULE_ID("$Id: m_hook.c,v 1.9 2000/12/10 02:16:48 tom Exp $")
/* "Template" macro to generate function to set application specific hook */
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
-int set_ ## typ ## _ ## name (MENU *menu, Menu_Hook func )\
+NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook func )\
{\
(Normalize_Menu(menu) -> typ ## name = func );\
RETURN(E_OK);\
@@ -49,7 +49,7 @@ int set_ ## typ ## _ ## name (MENU *menu, Menu_Hook func )\
/* "Template" macro to generate function to get application specific hook */
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
-Menu_Hook typ ## _ ## name ( const MENU *menu )\
+NCURSES_IMPEXP Menu_Hook NCURSES_API typ ## _ ## name ( const MENU *menu )\
{\
return (Normalize_Menu(menu) -> typ ## name);\
}
diff --git a/contrib/ncurses/menu/m_item_cur.c b/contrib/ncurses/menu/m_item_cur.c
index 7ac9f33..a2b82dd 100644
--- a/contrib/ncurses/menu/m_item_cur.c
+++ b/contrib/ncurses/menu/m_item_cur.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_cur.c,v 1.11 1999/05/16 17:25:34 juergen Exp $")
+MODULE_ID("$Id: m_item_cur.c,v 1.12 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -47,7 +47,8 @@ MODULE_ID("$Id: m_item_cur.c,v 1.11 1999/05/16 17:25:34 juergen Exp $")
|
| Return Values : E_OK - success
+--------------------------------------------------------------------------*/
-int set_current_item(MENU * menu, ITEM * item)
+NCURSES_EXPORT(int)
+set_current_item (MENU * menu, ITEM * item)
{
if (menu && item && (item->imenu==menu))
{
@@ -85,7 +86,8 @@ int set_current_item(MENU * menu, ITEM * item)
|
| Return Values : Item pointer or NULL if failure
+--------------------------------------------------------------------------*/
-ITEM *current_item(const MENU * menu)
+NCURSES_EXPORT(ITEM *)
+current_item (const MENU * menu)
{
return (menu && menu->items) ? menu->curitem : (ITEM *)0;
}
@@ -98,7 +100,8 @@ ITEM *current_item(const MENU * menu)
|
| Return Values : The index or ERR if this is an invalid item pointer
+--------------------------------------------------------------------------*/
-int item_index(const ITEM *item)
+NCURSES_EXPORT(int)
+item_index (const ITEM *item)
{
return (item && item->imenu) ? item->index : ERR;
}
diff --git a/contrib/ncurses/menu/m_item_nam.c b/contrib/ncurses/menu/m_item_nam.c
index 1be8a6d..0fa8e59 100644
--- a/contrib/ncurses/menu/m_item_nam.c
+++ b/contrib/ncurses/menu/m_item_nam.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_nam.c,v 1.9 1999/05/16 17:25:43 juergen Exp $")
+MODULE_ID("$Id: m_item_nam.c,v 1.10 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -47,7 +47,8 @@ MODULE_ID("$Id: m_item_nam.c,v 1.9 1999/05/16 17:25:43 juergen Exp $")
|
| Return Values : See above; returns NULL if item is invalid
+--------------------------------------------------------------------------*/
-const char *item_name(const ITEM * item)
+NCURSES_EXPORT(const char *)
+item_name (const ITEM * item)
{
return ((item) ? item->name.str : (char *)0);
}
@@ -60,7 +61,8 @@ const char *item_name(const ITEM * item)
|
| Return Values : See above; Returns NULL if item is invalid
+--------------------------------------------------------------------------*/
-const char *item_description(const ITEM * item)
+NCURSES_EXPORT(const char *)
+item_description (const ITEM * item)
{
return ((item) ? item->description.str : (char *)0);
}
diff --git a/contrib/ncurses/menu/m_item_new.c b/contrib/ncurses/menu/m_item_new.c
index a7b50ad..89e4469 100644
--- a/contrib/ncurses/menu/m_item_new.c
+++ b/contrib/ncurses/menu/m_item_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,7 +38,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_new.c,v 1.11 1999/05/16 17:28:49 juergen Exp $")
+MODULE_ID("$Id: m_item_new.c,v 1.12 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -72,7 +72,8 @@ static bool Is_Printable_String(const char *s)
|
| Return Values : The item pointer or NULL if creation failed.
+--------------------------------------------------------------------------*/
-ITEM *new_item(const char *name, const char *description)
+NCURSES_EXPORT(ITEM *)
+new_item (const char *name, const char *description)
{
ITEM *item;
@@ -120,7 +121,8 @@ ITEM *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
+--------------------------------------------------------------------------*/
-int free_item(ITEM * item)
+NCURSES_EXPORT(int)
+free_item (ITEM * item)
{
if (!item)
RETURN( E_BAD_ARGUMENT );
@@ -150,7 +152,8 @@ int free_item(ITEM * item)
| E_BAD_ARGUMENT - an invalid value has been passed
| E_SYSTEM_ERROR - no memory to store mark
+--------------------------------------------------------------------------*/
-int set_menu_mark(MENU * menu, const char * mark)
+NCURSES_EXPORT(int)
+set_menu_mark (MENU * menu, const char * mark)
{
int l;
@@ -219,7 +222,8 @@ int set_menu_mark(MENU * menu, const char * mark)
|
| Return Values : The marker string pointer or NULL if no marker defined
+--------------------------------------------------------------------------*/
-const char *menu_mark(const MENU * menu)
+NCURSES_EXPORT(const char *)
+menu_mark (const MENU * menu)
{
return Normalize_Menu( menu )->mark;
}
diff --git a/contrib/ncurses/menu/m_item_opt.c b/contrib/ncurses/menu/m_item_opt.c
index a37fadc..c31ee49 100644
--- a/contrib/ncurses/menu/m_item_opt.c
+++ b/contrib/ncurses/menu/m_item_opt.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_opt.c,v 1.10 1999/05/16 17:25:52 juergen Exp $")
+MODULE_ID("$Id: m_item_opt.c,v 1.11 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,8 @@ MODULE_ID("$Id: m_item_opt.c,v 1.10 1999/05/16 17:25:52 juergen Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid item options
+--------------------------------------------------------------------------*/
-int set_item_opts(ITEM *item, Item_Options opts)
+NCURSES_EXPORT(int)
+set_item_opts (ITEM *item, Item_Options opts)
{
opts &= ALL_ITEM_OPTS;
@@ -90,7 +91,8 @@ int set_item_opts(ITEM *item, Item_Options opts)
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid options
+--------------------------------------------------------------------------*/
-int item_opts_off(ITEM *item, Item_Options opts)
+NCURSES_EXPORT(int)
+item_opts_off (ITEM *item, Item_Options opts)
{
ITEM *citem = item; /* use a copy because set_item_opts must detect
NULL item itself to adjust its behaviour */
@@ -114,7 +116,8 @@ int item_opts_off(ITEM *item, Item_Options opts)
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid options
+--------------------------------------------------------------------------*/
-int item_opts_on(ITEM *item, Item_Options opts)
+NCURSES_EXPORT(int)
+item_opts_on (ITEM *item, Item_Options opts)
{
ITEM *citem = item; /* use a copy because set_item_opts must detect
NULL item itself to adjust its behaviour */
@@ -138,7 +141,8 @@ int item_opts_on(ITEM *item, Item_Options opts)
|
| Return Values : Items options
+--------------------------------------------------------------------------*/
-Item_Options item_opts(const ITEM * item)
+NCURSES_EXPORT(Item_Options)
+item_opts (const ITEM * item)
{
return (ALL_ITEM_OPTS & Normalize_Item(item)->opt);
}
diff --git a/contrib/ncurses/menu/m_item_top.c b/contrib/ncurses/menu/m_item_top.c
index cbe092a..1d751d9 100644
--- a/contrib/ncurses/menu/m_item_top.c
+++ b/contrib/ncurses/menu/m_item_top.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_top.c,v 1.4 1999/05/16 17:26:01 juergen Exp $")
+MODULE_ID("$Id: m_item_top.c,v 1.5 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -49,7 +49,8 @@ MODULE_ID("$Id: m_item_top.c,v 1.4 1999/05/16 17:26:01 juergen Exp $")
| E_BAD_ARGUMENT - not a menu pointer or invalid row
| E_NOT_CONNECTED - there are no items for the menu
+--------------------------------------------------------------------------*/
-int set_top_row(MENU * menu, int row)
+NCURSES_EXPORT(int)
+set_top_row (MENU * menu, int row)
{
ITEM *item;
@@ -88,7 +89,8 @@ int set_top_row(MENU * menu, int row)
|
| Return Values : The row number or ERR if there is no row
+--------------------------------------------------------------------------*/
-int top_row(const MENU * menu)
+NCURSES_EXPORT(int)
+top_row (const MENU * menu)
{
if (menu && menu->items && *(menu->items))
{
diff --git a/contrib/ncurses/menu/m_item_use.c b/contrib/ncurses/menu/m_item_use.c
index 2659f4b..1217735 100644
--- a/contrib/ncurses/menu/m_item_use.c
+++ b/contrib/ncurses/menu/m_item_use.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_use.c,v 1.10 1999/05/16 17:26:11 juergen Exp $")
+MODULE_ID("$Id: m_item_use.c,v 1.11 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -48,7 +48,8 @@ MODULE_ID("$Id: m_item_use.c,v 1.10 1999/05/16 17:26:11 juergen Exp $")
|
| Return Values : E_OK - success
+--------------------------------------------------------------------------*/
-int set_item_userptr(ITEM * item, void * userptr)
+NCURSES_EXPORT(int)
+set_item_userptr (ITEM * item, void * userptr)
{
Normalize_Item(item)->userptr = userptr;
RETURN( E_OK );
@@ -64,7 +65,8 @@ int set_item_userptr(ITEM * item, void * userptr)
| Return Values : Value of the pointer. If no such pointer has been set,
| NULL is returned.
+--------------------------------------------------------------------------*/
-void *item_userptr(const ITEM * item)
+NCURSES_EXPORT(void *)
+item_userptr (const ITEM * item)
{
return Normalize_Item(item)->userptr;
}
diff --git a/contrib/ncurses/menu/m_item_val.c b/contrib/ncurses/menu/m_item_val.c
index cf52d1d..48bde3a 100644
--- a/contrib/ncurses/menu/m_item_val.c
+++ b/contrib/ncurses/menu/m_item_val.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_val.c,v 1.8 1999/05/16 17:26:20 juergen Exp $")
+MODULE_ID("$Id: m_item_val.c,v 1.9 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -52,7 +52,8 @@ MODULE_ID("$Id: m_item_val.c,v 1.8 1999/05/16 17:26:20 juergen Exp $")
| Return Values : E_OK - success
| E_REQUEST_DENIED - not selectable or single valued menu
+--------------------------------------------------------------------------*/
-int set_item_value(ITEM *item, bool value)
+NCURSES_EXPORT(int)
+set_item_value (ITEM *item, bool value)
{
MENU *menu;
@@ -92,7 +93,8 @@ int set_item_value(ITEM *item, bool value)
| Return Values : TRUE - if item is selected
| FALSE - if item is not selected
+--------------------------------------------------------------------------*/
-bool item_value(const ITEM *item)
+NCURSES_EXPORT(bool)
+item_value (const ITEM *item)
{
return ((Normalize_Item(item)->value) ? TRUE : FALSE);
}
diff --git a/contrib/ncurses/menu/m_item_vis.c b/contrib/ncurses/menu/m_item_vis.c
index dab5ecb..9a2255e 100644
--- a/contrib/ncurses/menu/m_item_vis.c
+++ b/contrib/ncurses/menu/m_item_vis.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_vis.c,v 1.10 1999/05/16 17:26:34 juergen Exp $")
+MODULE_ID("$Id: m_item_vis.c,v 1.11 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -49,7 +49,8 @@ MODULE_ID("$Id: m_item_vis.c,v 1.10 1999/05/16 17:26:34 juergen Exp $")
| Return Values : TRUE if visible
| FALSE if invisible
+--------------------------------------------------------------------------*/
-bool item_visible(const ITEM * item)
+NCURSES_EXPORT(bool)
+item_visible (const ITEM * item)
{
MENU *menu;
diff --git a/contrib/ncurses/menu/m_items.c b/contrib/ncurses/menu/m_items.c
index 1bda088..3e21d2d 100644
--- a/contrib/ncurses/menu/m_items.c
+++ b/contrib/ncurses/menu/m_items.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_items.c,v 1.8 1999/05/16 17:26:50 juergen Exp $")
+MODULE_ID("$Id: m_items.c,v 1.9 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -52,7 +52,8 @@ MODULE_ID("$Id: m_items.c,v 1.8 1999/05/16 17:26:50 juergen Exp $")
| E_BAD_ARGUMENT - An incorrect menu or item array was
| passed to the function
+--------------------------------------------------------------------------*/
-int set_menu_items(MENU * menu, ITEM ** items)
+NCURSES_EXPORT(int)
+set_menu_items (MENU * menu, ITEM ** items)
{
if (!menu || (items && !(*items)))
RETURN(E_BAD_ARGUMENT);
@@ -81,7 +82,8 @@ int set_menu_items(MENU * menu, ITEM ** items)
|
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
-ITEM **menu_items(const MENU *menu)
+NCURSES_EXPORT(ITEM **)
+menu_items (const MENU *menu)
{
return(menu ? menu->items : (ITEM **)0);
}
@@ -95,7 +97,8 @@ ITEM **menu_items(const MENU *menu)
|
| Return Values : Number of items or -1 to indicate error.
+--------------------------------------------------------------------------*/
-int item_count(const MENU *menu)
+NCURSES_EXPORT(int)
+item_count (const MENU *menu)
{
return(menu ? menu->nitems : -1);
}
diff --git a/contrib/ncurses/menu/m_new.c b/contrib/ncurses/menu/m_new.c
index ba2b90c..fc2642a 100644
--- a/contrib/ncurses/menu/m_new.c
+++ b/contrib/ncurses/menu/m_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_new.c,v 1.10 1999/05/16 17:26:59 juergen Exp $")
+MODULE_ID("$Id: m_new.c,v 1.11 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,8 @@ MODULE_ID("$Id: m_new.c,v 1.10 1999/05/16 17:26:59 juergen Exp $")
|
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
-MENU *new_menu(ITEM ** items)
+NCURSES_EXPORT(MENU *)
+new_menu (ITEM ** items)
{
MENU *menu = (MENU *)calloc(1,sizeof(MENU));
@@ -87,7 +88,8 @@ MENU *new_menu(ITEM ** items)
| E_BAD_ARGUMENT - Invalid menu pointer passed
| E_POSTED - Menu is already posted
+--------------------------------------------------------------------------*/
-int free_menu(MENU * menu)
+NCURSES_EXPORT(int)
+free_menu (MENU * menu)
{
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/contrib/ncurses/menu/m_opts.c b/contrib/ncurses/menu/m_opts.c
index 1875f41..96a5320 100644
--- a/contrib/ncurses/menu/m_opts.c
+++ b/contrib/ncurses/menu/m_opts.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_opts.c,v 1.12 1999/05/16 17:27:08 juergen Exp $")
+MODULE_ID("$Id: m_opts.c,v 1.13 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -52,7 +52,8 @@ MODULE_ID("$Id: m_opts.c,v 1.12 1999/05/16 17:27:08 juergen Exp $")
| E_BAD_ARGUMENT - invalid menu options
| E_POSTED - menu is already posted
+--------------------------------------------------------------------------*/
-int set_menu_opts(MENU * menu, Menu_Options opts)
+NCURSES_EXPORT(int)
+set_menu_opts (MENU * menu, Menu_Options opts)
{
opts &= ALL_MENU_OPTS;
@@ -109,7 +110,8 @@ int set_menu_opts(MENU * menu, Menu_Options opts)
| E_BAD_ARGUMENT - invalid options
| E_POSTED - menu is already posted
+--------------------------------------------------------------------------*/
-int menu_opts_off(MENU *menu, Menu_Options opts)
+NCURSES_EXPORT(int)
+menu_opts_off (MENU *menu, Menu_Options opts)
{
MENU *cmenu = menu; /* use a copy because set_menu_opts must detect
NULL menu itself to adjust its behaviour */
@@ -138,7 +140,8 @@ int menu_opts_off(MENU *menu, Menu_Options opts)
| E_BAD_ARGUMENT - invalid menu options
| E_POSTED - menu is already posted
+--------------------------------------------------------------------------*/
-int menu_opts_on(MENU * menu, Menu_Options opts)
+NCURSES_EXPORT(int)
+menu_opts_on (MENU * menu, Menu_Options opts)
{
MENU *cmenu = menu; /* use a copy because set_menu_opts must detect
NULL menu itself to adjust its behaviour */
@@ -162,7 +165,8 @@ int menu_opts_on(MENU * menu, Menu_Options opts)
|
| Return Values : Menu options
+--------------------------------------------------------------------------*/
-Menu_Options menu_opts(const MENU *menu)
+NCURSES_EXPORT(Menu_Options)
+menu_opts (const MENU *menu)
{
return (ALL_MENU_OPTS & Normalize_Menu( menu )->opt);
}
diff --git a/contrib/ncurses/menu/m_pad.c b/contrib/ncurses/menu/m_pad.c
index 1802283..d7161e2 100644
--- a/contrib/ncurses/menu/m_pad.c
+++ b/contrib/ncurses/menu/m_pad.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_pad.c,v 1.4 1999/05/16 17:27:17 juergen Exp $")
+MODULE_ID("$Id: m_pad.c,v 1.5 2000/12/10 02:16:48 tom Exp $")
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
@@ -58,7 +58,8 @@ MODULE_ID("$Id: m_pad.c,v 1.4 1999/05/16 17:27:17 juergen Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - an invalid value has been passed
+--------------------------------------------------------------------------*/
-int set_menu_pad(MENU *menu, int pad)
+NCURSES_EXPORT(int)
+set_menu_pad (MENU *menu, int pad)
{
bool do_refresh = (menu != (MENU*)0);
@@ -82,7 +83,8 @@ int set_menu_pad(MENU *menu, int pad)
|
| Return Values : The pad character
+--------------------------------------------------------------------------*/
-int menu_pad(const MENU * menu)
+NCURSES_EXPORT(int)
+menu_pad (const MENU * menu)
{
return (Normalize_Menu( menu ) -> pad);
}
diff --git a/contrib/ncurses/menu/m_pattern.c b/contrib/ncurses/menu/m_pattern.c
index 7187c22..3e05900 100644
--- a/contrib/ncurses/menu/m_pattern.c
+++ b/contrib/ncurses/menu/m_pattern.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_pattern.c,v 1.4 1999/05/16 17:27:28 juergen Exp $")
+MODULE_ID("$Id: m_pattern.c,v 1.6 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,8 @@ MODULE_ID("$Id: m_pattern.c,v 1.4 1999/05/16 17:27:28 juergen Exp $")
| pattern is stored
| PatternString - as expected
+--------------------------------------------------------------------------*/
-char *menu_pattern(const MENU * menu)
+NCURSES_EXPORT(char *)
+menu_pattern (const MENU * menu)
{
return (menu ? (menu->pattern ? menu->pattern : "") : (char *)0);
}
@@ -68,7 +69,8 @@ char *menu_pattern(const MENU * menu)
| E_BAD_STATE - menu in user hook routine
| E_NO_MATCH - no item matches pattern
+--------------------------------------------------------------------------*/
-int set_menu_pattern(MENU *menu, const char *p)
+NCURSES_EXPORT(int)
+set_menu_pattern (MENU *menu, const char *p)
{
ITEM *matchitem;
int matchpos;
@@ -99,7 +101,7 @@ int set_menu_pattern(MENU *menu, const char *p)
while(*p)
{
- if ( !isprint(*p) ||
+ if ( !isprint((unsigned char)(*p)) ||
(_nc_Match_Next_Character_In_Item_Name(menu,*p,&matchitem) != E_OK) )
{
Reset_Pattern(menu);
diff --git a/contrib/ncurses/menu/m_post.c b/contrib/ncurses/menu/m_post.c
index 8825f3e..0d24cc0 100644
--- a/contrib/ncurses/menu/m_post.c
+++ b/contrib/ncurses/menu/m_post.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_post.c,v 1.16 1999/05/16 17:27:38 juergen Exp $")
+MODULE_ID("$Id: m_post.c,v 1.17 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -48,7 +48,8 @@ MODULE_ID("$Id: m_post.c,v 1.16 1999/05/16 17:27:38 juergen Exp $")
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void _nc_Post_Item(const MENU * menu, const ITEM * item)
+NCURSES_EXPORT(void)
+_nc_Post_Item (const MENU * menu, const ITEM * item)
{
int i;
chtype ch;
@@ -189,7 +190,8 @@ void _nc_Post_Item(const MENU * menu, const ITEM * item)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void _nc_Draw_Menu(const MENU * menu)
+NCURSES_EXPORT(void)
+_nc_Draw_Menu (const MENU * menu)
{
ITEM *item = menu->items[0];
ITEM *lasthor, *lastvert;
@@ -257,7 +259,8 @@ void _nc_Draw_Menu(const MENU * menu)
| E_BAD_STATE - Menu in userexit routine
| E_POSTED - Menu already posted
+--------------------------------------------------------------------------*/
-int post_menu(MENU * menu)
+NCURSES_EXPORT(int)
+post_menu (MENU * menu)
{
if (!menu)
RETURN(E_BAD_ARGUMENT);
@@ -330,7 +333,8 @@ int post_menu(MENU * menu)
| E_BAD_STATE - menu in userexit routine
| E_NOT_POSTED - menu is not posted
+--------------------------------------------------------------------------*/
-int unpost_menu(MENU * menu)
+NCURSES_EXPORT(int)
+unpost_menu (MENU * menu)
{
WINDOW *win;
diff --git a/contrib/ncurses/menu/m_req_name.c b/contrib/ncurses/menu/m_req_name.c
index d90d0af..130bd6f 100644
--- a/contrib/ncurses/menu/m_req_name.c
+++ b/contrib/ncurses/menu/m_req_name.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_req_name.c,v 1.12 1999/05/16 17:27:47 juergen Exp $")
+MODULE_ID("$Id: m_req_name.c,v 1.13 2000/12/10 02:16:48 tom Exp $")
static const char *request_names[ MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1 ] = {
"LEFT_ITEM" ,
@@ -69,7 +69,8 @@ static const char *request_names[ MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1 ] = {
| Return Values : Pointer to name - on success
| NULL - on invalid request code
+--------------------------------------------------------------------------*/
-const char *menu_request_name( int request )
+NCURSES_EXPORT(const char *)
+menu_request_name ( int request )
{
if ( (request < MIN_MENU_COMMAND) || (request > MAX_MENU_COMMAND) )
{
@@ -90,7 +91,8 @@ const char *menu_request_name( int request )
| Return Values : Request Id - on success
| E_NO_MATCH - request not found
+--------------------------------------------------------------------------*/
-int menu_request_by_name( const char *str )
+NCURSES_EXPORT(int)
+menu_request_by_name ( const char *str )
{
/* because the table is so small, it doesn't really hurt
to run sequentially through it.
diff --git a/contrib/ncurses/menu/m_scale.c b/contrib/ncurses/menu/m_scale.c
index d6f964b..e5c1101 100644
--- a/contrib/ncurses/menu/m_scale.c
+++ b/contrib/ncurses/menu/m_scale.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_scale.c,v 1.4 1999/05/16 17:28:00 juergen Exp $")
+MODULE_ID("$Id: m_scale.c,v 1.5 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,8 @@ MODULE_ID("$Id: m_scale.c,v 1.4 1999/05/16 17:28:00 juergen Exp $")
| E_BAD_ARGUMENT - invalid menu pointer
| E_NOT_CONNECTED - no items are connected to menu
+--------------------------------------------------------------------------*/
-int scale_menu(const MENU *menu, int *rows, int *cols)
+NCURSES_EXPORT(int)
+scale_menu (const MENU *menu, int *rows, int *cols)
{
if (!menu)
RETURN( E_BAD_ARGUMENT );
diff --git a/contrib/ncurses/menu/m_spacing.c b/contrib/ncurses/menu/m_spacing.c
index 1d035ab..b384ef3 100644
--- a/contrib/ncurses/menu/m_spacing.c
+++ b/contrib/ncurses/menu/m_spacing.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_spacing.c,v 1.11 1999/05/16 17:28:09 juergen Exp $")
+MODULE_ID("$Id: m_spacing.c,v 1.12 2000/12/10 02:16:48 tom Exp $")
#define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8)
#define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8)
@@ -51,7 +51,9 @@ MODULE_ID("$Id: m_spacing.c,v 1.11 1999/05/16 17:28:09 juergen Exp $")
|
| Return Values : E_OK - on success
+--------------------------------------------------------------------------*/
-int set_menu_spacing(MENU *menu, int s_desc, int s_row, int s_col )
+NCURSES_EXPORT(int)
+set_menu_spacing
+(MENU *menu, int s_desc, int s_row, int s_col )
{
MENU *m; /* split for ATAC workaround */
m = Normalize_Menu(menu);
@@ -82,7 +84,8 @@ int set_menu_spacing(MENU *menu, int s_desc, int s_row, int s_col )
|
| Return Values : E_OK - on success
+--------------------------------------------------------------------------*/
-int menu_spacing( const MENU *menu, int* s_desc, int* s_row, int* s_col)
+NCURSES_EXPORT(int)
+menu_spacing ( const MENU *menu, int* s_desc, int* s_row, int* s_col)
{
const MENU *m; /* split for ATAC workaround */
m = Normalize_Menu(menu);
diff --git a/contrib/ncurses/menu/m_sub.c b/contrib/ncurses/menu/m_sub.c
index 35a361e..43d8521 100644
--- a/contrib/ncurses/menu/m_sub.c
+++ b/contrib/ncurses/menu/m_sub.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_sub.c,v 1.4 1999/05/16 17:28:20 juergen Exp $")
+MODULE_ID("$Id: m_sub.c,v 1.5 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -48,7 +48,8 @@ MODULE_ID("$Id: m_sub.c,v 1.4 1999/05/16 17:28:20 juergen Exp $")
| Return Values : E_OK - success
| E_POSTED - menu is already posted
+--------------------------------------------------------------------------*/
-int set_menu_sub(MENU *menu, WINDOW *win)
+NCURSES_EXPORT(int)
+set_menu_sub (MENU *menu, WINDOW *win)
{
if (menu)
{
@@ -71,7 +72,8 @@ int set_menu_sub(MENU *menu, WINDOW *win)
|
| Return Values : NULL on error, otherwise a pointer to the window
+--------------------------------------------------------------------------*/
-WINDOW *menu_sub(const MENU * menu)
+NCURSES_EXPORT(WINDOW *)
+menu_sub (const MENU * menu)
{
const MENU* m = Normalize_Menu(menu);
return Get_Menu_Window(m);
diff --git a/contrib/ncurses/menu/m_userptr.c b/contrib/ncurses/menu/m_userptr.c
index 45818a3..cab4d3c 100644
--- a/contrib/ncurses/menu/m_userptr.c
+++ b/contrib/ncurses/menu/m_userptr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_userptr.c,v 1.10 1999/05/16 17:28:29 juergen Exp $")
+MODULE_ID("$Id: m_userptr.c,v 1.11 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -48,7 +48,8 @@ MODULE_ID("$Id: m_userptr.c,v 1.10 1999/05/16 17:28:29 juergen Exp $")
|
| Return Values : E_OK - success
+--------------------------------------------------------------------------*/
-int set_menu_userptr(MENU * menu, void * userptr)
+NCURSES_EXPORT(int)
+set_menu_userptr (MENU * menu, void * userptr)
{
Normalize_Menu(menu)->userptr = userptr;
RETURN( E_OK );
@@ -64,7 +65,8 @@ int set_menu_userptr(MENU * menu, void * userptr)
| Return Values : Value of the pointer. If no such pointer has been set,
| NULL is returned
+--------------------------------------------------------------------------*/
-void *menu_userptr(const MENU * menu)
+NCURSES_EXPORT(void *)
+menu_userptr (const MENU * menu)
{
return( Normalize_Menu(menu)->userptr);
}
diff --git a/contrib/ncurses/menu/m_win.c b/contrib/ncurses/menu/m_win.c
index 73f34b5..85bb06f 100644
--- a/contrib/ncurses/menu/m_win.c
+++ b/contrib/ncurses/menu/m_win.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_win.c,v 1.9 1999/05/16 17:28:37 juergen Exp $")
+MODULE_ID("$Id: m_win.c,v 1.10 2000/12/10 02:16:48 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -48,7 +48,8 @@ MODULE_ID("$Id: m_win.c,v 1.9 1999/05/16 17:28:37 juergen Exp $")
| Return Values : E_OK - success
| E_POSTED - menu is already posted
+--------------------------------------------------------------------------*/
-int set_menu_win(MENU *menu, WINDOW *win)
+NCURSES_EXPORT(int)
+set_menu_win (MENU *menu, WINDOW *win)
{
if (menu)
{
@@ -71,7 +72,8 @@ int set_menu_win(MENU *menu, WINDOW *win)
|
| Return Values : NULL on error, otherwise pointer to window
+--------------------------------------------------------------------------*/
-WINDOW *menu_win(const MENU *menu)
+NCURSES_EXPORT(WINDOW *)
+menu_win (const MENU *menu)
{
const MENU* m = Normalize_Menu(menu);
return (m->userwin ? m->userwin : stdscr);
diff --git a/contrib/ncurses/menu/menu.h b/contrib/ncurses/menu/menu.h
index 5be728b..8c12894 100644
--- a/contrib/ncurses/menu/menu.h
+++ b/contrib/ncurses/menu/menu.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -170,82 +170,82 @@ typedef struct tagMENU
/* --------- prototypes for libmenu functions ----------------------------- */
-extern ITEM **menu_items(const MENU *),
- *current_item(const MENU *),
- *new_item(const char *,const char *);
-
-extern MENU *new_menu(ITEM **);
-
-extern Item_Options item_opts(const ITEM *);
-extern Menu_Options menu_opts(const MENU *);
-
-Menu_Hook item_init(const MENU *),
- item_term(const MENU *),
- menu_init(const MENU *),
- menu_term(const MENU *);
-
-extern WINDOW *menu_sub(const MENU *),
- *menu_win(const MENU *);
-
-extern const char *item_description(const ITEM *),
- *item_name(const ITEM *),
- *menu_mark(const MENU *),
- *menu_request_name(int);
-
-extern char *menu_pattern(const MENU *);
-
-extern void *menu_userptr(const MENU *),
- *item_userptr(const ITEM *);
-
-extern chtype menu_back(const MENU *),
- menu_fore(const MENU *),
- menu_grey(const MENU *);
-
-extern int free_item(ITEM *),
- free_menu(MENU *),
- item_count(const MENU *),
- item_index(const ITEM *),
- item_opts_off(ITEM *,Item_Options),
- item_opts_on(ITEM *,Item_Options),
- menu_driver(MENU *,int),
- menu_opts_off(MENU *,Menu_Options),
- menu_opts_on(MENU *,Menu_Options),
- menu_pad(const MENU *),
- pos_menu_cursor(const MENU *),
- post_menu(MENU *),
- scale_menu(const MENU *,int *,int *),
- set_current_item(MENU *menu,ITEM *item),
- set_item_init(MENU *,void(*)(MENU *)),
- set_item_opts(ITEM *,Item_Options),
- set_item_term(MENU *,void(*)(MENU *)),
- set_item_userptr(ITEM *, void *),
- set_item_value(ITEM *,bool),
- set_menu_back(MENU *,chtype),
- set_menu_fore(MENU *,chtype),
- set_menu_format(MENU *,int,int),
- set_menu_grey(MENU *,chtype),
- set_menu_init(MENU *,void(*)(MENU *)),
- set_menu_items(MENU *,ITEM **),
- set_menu_mark(MENU *, const char *),
- set_menu_opts(MENU *,Menu_Options),
- set_menu_pad(MENU *,int),
- set_menu_pattern(MENU *,const char *),
- set_menu_sub(MENU *,WINDOW *),
- set_menu_term(MENU *,void(*)(MENU *)),
- set_menu_userptr(MENU *,void *),
- set_menu_win(MENU *,WINDOW *),
- set_top_row(MENU *,int),
- top_row(const MENU *),
- unpost_menu(MENU *),
- menu_request_by_name(const char *),
- set_menu_spacing(MENU *,int,int,int),
- menu_spacing(const MENU *,int *,int *,int *);
-
-
-extern bool item_value(const ITEM *),
- item_visible(const ITEM *);
-
-void menu_format(const MENU *,int *,int *);
+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 *,void(*)(MENU *));
+extern NCURSES_EXPORT(int) set_item_opts (ITEM *,Item_Options);
+extern NCURSES_EXPORT(int) set_item_term (MENU *,void(*)(MENU *));
+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 *,void(*)(MENU *));
+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 *,void(*)(MENU *));
+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 *);
#ifdef __cplusplus
}
diff --git a/contrib/ncurses/menu/menu.priv.h b/contrib/ncurses/menu/menu.priv.h
index 4c2a22d..e9c27d1 100644
--- a/contrib/ncurses/menu/menu.priv.h
+++ b/contrib/ncurses/menu/menu.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,8 +41,8 @@
/* Backspace code */
#define BS (8)
-extern ITEM _nc_Default_Item;
-extern MENU _nc_Default_Menu;
+extern NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item;
+extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu;
/* Normalize item to default if none was given */
#define Normalize_Item( item ) ((item)=(item)?(item):&_nc_Default_Item)
@@ -101,14 +101,14 @@ extern MENU _nc_Default_Menu;
(menu)->pattern[0] = '\0'; }
/* Internal functions. */
-extern void _nc_Draw_Menu(const MENU *);
-extern void _nc_Show_Menu(const MENU *);
-extern void _nc_Calculate_Item_Length_and_Width(MENU *);
-extern void _nc_Post_Item(const MENU *, const ITEM *);
-extern bool _nc_Connect_Items(MENU *, ITEM **);
-extern void _nc_Disconnect_Items(MENU *);
-extern void _nc_New_TopRow_and_CurrentItem(MENU *,int, ITEM *);
-extern void _nc_Link_Items(MENU *);
-extern int _nc_Match_Next_Character_In_Item_Name(MENU*,int,ITEM**);
-extern int _nc_menu_cursor_pos(const MENU* menu, const ITEM* item,
+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(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,
int* pY, int* pX);
OpenPOWER on IntegriCloud