aboutsummaryrefslogtreecommitdiff
path: root/menu
diff options
context:
space:
mode:
Diffstat (limited to 'menu')
-rw-r--r--menu/Makefile.in19
-rw-r--r--menu/llib-lmenu12
-rw-r--r--menu/llib-lmenut551
-rw-r--r--menu/llib-lmenutw553
-rw-r--r--menu/llib-lmenuw12
-rw-r--r--menu/m_attribs.c11
-rw-r--r--menu/m_cursor.c8
-rw-r--r--menu/m_driver.c11
-rw-r--r--menu/m_format.c6
-rw-r--r--menu/m_global.c14
-rw-r--r--menu/m_hook.c6
-rw-r--r--menu/m_item_cur.c10
-rw-r--r--menu/m_item_nam.c8
-rw-r--r--menu/m_item_new.c15
-rw-r--r--menu/m_item_opt.c12
-rw-r--r--menu/m_item_top.c8
-rw-r--r--menu/m_item_use.c8
-rw-r--r--menu/m_item_val.c8
-rw-r--r--menu/m_item_vis.c6
-rw-r--r--menu/m_items.c10
-rw-r--r--menu/m_new.c42
-rw-r--r--menu/m_opts.c12
-rw-r--r--menu/m_pad.c12
-rw-r--r--menu/m_pattern.c8
-rw-r--r--menu/m_post.c14
-rw-r--r--menu/m_req_name.c6
-rw-r--r--menu/m_scale.c9
-rw-r--r--menu/m_spacing.c13
-rw-r--r--menu/m_sub.c28
-rw-r--r--menu/m_trace.c10
-rw-r--r--menu/m_userptr.c8
-rw-r--r--menu/m_win.c30
-rw-r--r--menu/menu.h8
-rw-r--r--menu/menu.priv.h10
-rw-r--r--menu/modules58
35 files changed, 179 insertions, 1377 deletions
diff --git a/menu/Makefile.in b/menu/Makefile.in
index 253ff4f64194..fc33dc7d64e8 100644
--- a/menu/Makefile.in
+++ b/menu/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.54 2010/11/27 21:45:27 tom Exp $
+# $Id: Makefile.in,v 1.48 2007/04/28 14:56:11 tom Exp $
##############################################################################
-# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,2007 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"), #
@@ -43,7 +43,6 @@
.SUFFIXES:
SHELL = /bin/sh
-VPATH = @srcdir@
THIS = Makefile
x = @EXEEXT@
@@ -64,7 +63,6 @@ LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
-LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
@@ -72,14 +70,11 @@ INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
-ARFLAGS = @ARFLAGS@
+AR_OPTS = @AR_OPTS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
-CTAGS = @CTAGS@
-ETAGS = @ETAGS@
-
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@@ -131,7 +126,7 @@ sources : $(AUTO_SRC)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) :
- mkdir -p $@
+ sh $(srcdir)/../mkdirs.sh $@
# make copies to simplify include-paths while still keeping menu's include
# file in this directory.
@@ -145,16 +140,16 @@ $(DESTDIR)$(libdir) :
-rm -f $@
cp $(srcdir)/mf_common.h $@
-HEADER_DEPS = \
+MENU_PRIV_H = \
$(srcdir)/menu.priv.h \
$(AUTO_SRC) \
../include/curses.h
tags:
- $(CTAGS) *.[ch]
+ ctags *.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
+@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
diff --git a/menu/llib-lmenu b/menu/llib-lmenu
index 13ecaf8bdd79..fc17cc364d42 100644
--- a/menu/llib-lmenu
+++ b/menu/llib-lmenu
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2005,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2002,2005 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 *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1996-2005,2010 *
+ * Author: Thomas E. Dickey 1996-2002,2005 *
****************************************************************************/
/* LINTLIBRARY */
/* ./m_attribs.c */
-#include <menu.priv.h>
+#include "menu.priv.h"
#undef set_menu_fore
int set_menu_fore(
@@ -350,12 +350,6 @@ int item_count(
/* ./m_new.c */
-#undef new_menu_sp
-MENU *new_menu_sp(
- SCREEN *sp,
- ITEM **items)
- { return(*(MENU **)0); }
-
#undef new_menu
MENU *new_menu(
ITEM **items)
diff --git a/menu/llib-lmenut b/menu/llib-lmenut
deleted file mode 100644
index 951719f41e6e..000000000000
--- a/menu/llib-lmenut
+++ /dev/null
@@ -1,551 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2010 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"), to deal in the Software without restriction, including *
- * without limitation the rights to use, copy, modify, merge, publish, *
- * distribute, distribute with modifications, sublicense, and/or sell *
- * copies of the Software, and to permit persons to whom the Software is *
- * furnished to do so, subject to the following conditions: *
- * *
- * The above copyright notice and this permission notice shall be included *
- * in all copies or substantial portions of the Software. *
- * *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
- * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
- * *
- * Except as contained in this notice, the name(s) of the above copyright *
- * holders shall not be used in advertising or otherwise to promote the *
- * sale, use or other dealings in this Software without prior written *
- * authorization. *
- ****************************************************************************/
-
-/****************************************************************************
- * Author: Thomas E. Dickey 2010 *
- ****************************************************************************/
-/* LINTLIBRARY */
-
-/* ./m_attribs.c */
-
-#include <menu.priv.h>
-
-#undef set_menu_fore
-int set_menu_fore(
- MENU *menu,
- chtype attr)
- { return(*(int *)0); }
-
-#undef menu_fore
-chtype menu_fore(
- const MENU *menu)
- { return(*(chtype *)0); }
-
-#undef set_menu_back
-int set_menu_back(
- MENU *menu,
- chtype attr)
- { return(*(int *)0); }
-
-#undef menu_back
-chtype menu_back(
- const MENU *menu)
- { return(*(chtype *)0); }
-
-#undef set_menu_grey
-int set_menu_grey(
- MENU *menu,
- chtype attr)
- { return(*(int *)0); }
-
-#undef menu_grey
-chtype menu_grey(
- const MENU *menu)
- { return(*(chtype *)0); }
-
-/* ./m_cursor.c */
-
-#undef _nc_menu_cursor_pos
-int _nc_menu_cursor_pos(
- const MENU *menu,
- const ITEM *item,
- int *pY,
- int *pX)
- { return(*(int *)0); }
-
-#undef pos_menu_cursor
-int pos_menu_cursor(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_driver.c */
-
-#undef _nc_Match_Next_Character_In_Item_Name
-int _nc_Match_Next_Character_In_Item_Name(
- MENU *menu,
- int ch,
- ITEM **item)
- { return(*(int *)0); }
-
-#undef menu_driver
-int menu_driver(
- MENU *menu,
- int c)
- { return(*(int *)0); }
-
-/* ./m_format.c */
-
-#undef set_menu_format
-int set_menu_format(
- MENU *menu,
- int rows,
- int cols)
- { return(*(int *)0); }
-
-#undef menu_format
-void menu_format(
- const MENU *menu,
- int *rows,
- int *cols)
- { /* void */ }
-
-/* ./m_global.c */
-
-#undef _nc_Default_Menu
-MENU _nc_Default_Menu;
-#undef _nc_Default_Item
-ITEM _nc_Default_Item;
-
-#undef _nc_Connect_Items
-NCURSES_BOOL _nc_Connect_Items(
- MENU *menu,
- ITEM **items)
- { return(*(NCURSES_BOOL *)0); }
-
-#undef _nc_Disconnect_Items
-void _nc_Disconnect_Items(
- MENU *menu)
- { /* void */ }
-
-#undef _nc_Calculate_Text_Width
-int _nc_Calculate_Text_Width(
- const TEXT *item)
- { return(*(int *)0); }
-
-#undef _nc_Calculate_Item_Length_and_Width
-void _nc_Calculate_Item_Length_and_Width(
- MENU *menu)
- { /* void */ }
-
-#undef _nc_Link_Items
-void _nc_Link_Items(
- MENU *menu)
- { /* void */ }
-
-#undef _nc_Show_Menu
-void _nc_Show_Menu(
- const MENU *menu)
- { /* void */ }
-
-#undef _nc_New_TopRow_and_CurrentItem
-void _nc_New_TopRow_and_CurrentItem(
- MENU *menu,
- int new_toprow,
- ITEM *new_current_item)
- { /* void */ }
-
-/* ./m_hook.c */
-
-#undef set_menu_init
-int set_menu_init(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef menu_init
-Menu_Hook menu_init(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-#undef set_menu_term
-int set_menu_term(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef menu_term
-Menu_Hook menu_term(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-#undef set_item_init
-int set_item_init(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef item_init
-Menu_Hook item_init(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-#undef set_item_term
-int set_item_term(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef item_term
-Menu_Hook item_term(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-/* ./m_item_cur.c */
-
-#undef set_current_item
-int set_current_item(
- MENU *menu,
- ITEM *item)
- { return(*(int *)0); }
-
-#undef current_item
-ITEM *current_item(
- const MENU *menu)
- { return(*(ITEM **)0); }
-
-#undef item_index
-int item_index(
- const ITEM *item)
- { return(*(int *)0); }
-
-/* ./m_item_nam.c */
-
-#undef item_name
-const char *item_name(
- const ITEM *item)
- { return(*(const char **)0); }
-
-#undef item_description
-const char *item_description(
- const ITEM *item)
- { return(*(const char **)0); }
-
-/* ./m_item_new.c */
-
-#undef new_item
-ITEM *new_item(
- const char *name,
- const char *description)
- { return(*(ITEM **)0); }
-
-#undef free_item
-int free_item(
- ITEM *item)
- { return(*(int *)0); }
-
-#undef set_menu_mark
-int set_menu_mark(
- MENU *menu,
- const char *mark)
- { return(*(int *)0); }
-
-#undef menu_mark
-const char *menu_mark(
- const MENU *menu)
- { return(*(const char **)0); }
-
-/* ./m_item_opt.c */
-
-#undef set_item_opts
-int set_item_opts(
- ITEM *item,
- Item_Options opts)
- { return(*(int *)0); }
-
-#undef item_opts_off
-int item_opts_off(
- ITEM *item,
- Item_Options opts)
- { return(*(int *)0); }
-
-#undef item_opts_on
-int item_opts_on(
- ITEM *item,
- Item_Options opts)
- { return(*(int *)0); }
-
-#undef item_opts
-Item_Options item_opts(
- const ITEM *item)
- { return(*(Item_Options *)0); }
-
-/* ./m_item_top.c */
-
-#undef set_top_row
-int set_top_row(
- MENU *menu,
- int row)
- { return(*(int *)0); }
-
-#undef top_row
-int top_row(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_item_use.c */
-
-#undef set_item_userptr
-int set_item_userptr(
- ITEM *item,
- void *userptr)
- { return(*(int *)0); }
-
-#undef item_userptr
-void *item_userptr(
- const ITEM *item)
- { return(*(void **)0); }
-
-/* ./m_item_val.c */
-
-#undef set_item_value
-int set_item_value(
- ITEM *item,
- NCURSES_BOOL value)
- { return(*(int *)0); }
-
-#undef item_value
-NCURSES_BOOL item_value(
- const ITEM *item)
- { return(*(NCURSES_BOOL *)0); }
-
-/* ./m_item_vis.c */
-
-#undef item_visible
-NCURSES_BOOL item_visible(
- const ITEM *item)
- { return(*(NCURSES_BOOL *)0); }
-
-/* ./m_items.c */
-
-#undef set_menu_items
-int set_menu_items(
- MENU *menu,
- ITEM **items)
- { return(*(int *)0); }
-
-#undef menu_items
-ITEM **menu_items(
- const MENU *menu)
- { return(*(ITEM ***)0); }
-
-#undef item_count
-int item_count(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_new.c */
-
-#undef new_menu_sp
-MENU *new_menu_sp(
- SCREEN *sp,
- ITEM **items)
- { return(*(MENU **)0); }
-
-#undef new_menu
-MENU *new_menu(
- ITEM **items)
- { return(*(MENU **)0); }
-
-#undef free_menu
-int free_menu(
- MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_opts.c */
-
-#undef set_menu_opts
-int set_menu_opts(
- MENU *menu,
- Menu_Options opts)
- { return(*(int *)0); }
-
-#undef menu_opts_off
-int menu_opts_off(
- MENU *menu,
- Menu_Options opts)
- { return(*(int *)0); }
-
-#undef menu_opts_on
-int menu_opts_on(
- MENU *menu,
- Menu_Options opts)
- { return(*(int *)0); }
-
-#undef menu_opts
-Menu_Options menu_opts(
- const MENU *menu)
- { return(*(Menu_Options *)0); }
-
-/* ./m_pad.c */
-
-#undef set_menu_pad
-int set_menu_pad(
- MENU *menu,
- int pad)
- { return(*(int *)0); }
-
-#undef menu_pad
-int menu_pad(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_pattern.c */
-
-#undef menu_pattern
-char *menu_pattern(
- const MENU *menu)
- { return(*(char **)0); }
-
-#undef set_menu_pattern
-int set_menu_pattern(
- MENU *menu,
- const char *p)
- { return(*(int *)0); }
-
-/* ./m_post.c */
-
-#undef _nc_Post_Item
-void _nc_Post_Item(
- const MENU *menu,
- const ITEM *item)
- { /* void */ }
-
-#undef _nc_Draw_Menu
-void _nc_Draw_Menu(
- const MENU *menu)
- { /* void */ }
-
-#undef post_menu
-int post_menu(
- MENU *menu)
- { return(*(int *)0); }
-
-#undef unpost_menu
-int unpost_menu(
- MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_req_name.c */
-
-#undef menu_request_name
-const char *menu_request_name(
- int request)
- { return(*(const char **)0); }
-
-#undef menu_request_by_name
-int menu_request_by_name(
- const char *str)
- { return(*(int *)0); }
-
-/* ./m_scale.c */
-
-#undef scale_menu
-int scale_menu(
- const MENU *menu,
- int *rows,
- int *cols)
- { return(*(int *)0); }
-
-/* ./m_spacing.c */
-
-#undef set_menu_spacing
-int set_menu_spacing(
- MENU *menu,
- int s_desc,
- int s_row,
- int s_col)
- { return(*(int *)0); }
-
-#undef menu_spacing
-int menu_spacing(
- const MENU *menu,
- int *s_desc,
- int *s_row,
- int *s_col)
- { return(*(int *)0); }
-
-/* ./m_sub.c */
-
-#undef set_menu_sub
-int set_menu_sub(
- MENU *menu,
- WINDOW *win)
- { return(*(int *)0); }
-
-#undef menu_sub
-WINDOW *menu_sub(
- const MENU *menu)
- { return(*(WINDOW **)0); }
-
-/* ./m_trace.c */
-
-#undef _nc_retrace_item
-ITEM *_nc_retrace_item(
- ITEM *code)
- { return(*(ITEM **)0); }
-
-#undef _nc_retrace_item_ptr
-ITEM **_nc_retrace_item_ptr(
- ITEM **code)
- { return(*(ITEM ***)0); }
-
-#undef _nc_retrace_item_opts
-Item_Options _nc_retrace_item_opts(
- Item_Options code)
- { return(*(Item_Options *)0); }
-
-#undef _nc_retrace_menu
-MENU *_nc_retrace_menu(
- MENU *code)
- { return(*(MENU **)0); }
-
-#undef _nc_retrace_menu_hook
-Menu_Hook _nc_retrace_menu_hook(
- Menu_Hook code)
- { return(*(Menu_Hook *)0); }
-
-#undef _nc_retrace_menu_opts
-Menu_Options _nc_retrace_menu_opts(
- Menu_Options code)
- { return(*(Menu_Options *)0); }
-
-/* ./m_userptr.c */
-
-#undef set_menu_userptr
-int set_menu_userptr(
- MENU *menu,
- void *userptr)
- { return(*(int *)0); }
-
-#undef menu_userptr
-void *menu_userptr(
- const MENU *menu)
- { return(*(void **)0); }
-
-/* ./m_win.c */
-
-#undef set_menu_win
-int set_menu_win(
- MENU *menu,
- WINDOW *win)
- { return(*(int *)0); }
-
-#undef menu_win
-WINDOW *menu_win(
- const MENU *menu)
- { return(*(WINDOW **)0); }
diff --git a/menu/llib-lmenutw b/menu/llib-lmenutw
deleted file mode 100644
index 0cd559ebd269..000000000000
--- a/menu/llib-lmenutw
+++ /dev/null
@@ -1,553 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2010 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"), to deal in the Software without restriction, including *
- * without limitation the rights to use, copy, modify, merge, publish, *
- * distribute, distribute with modifications, sublicense, and/or sell *
- * copies of the Software, and to permit persons to whom the Software is *
- * furnished to do so, subject to the following conditions: *
- * *
- * The above copyright notice and this permission notice shall be included *
- * in all copies or substantial portions of the Software. *
- * *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
- * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
- * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
- * *
- * Except as contained in this notice, the name(s) of the above copyright *
- * holders shall not be used in advertising or otherwise to promote the *
- * sale, use or other dealings in this Software without prior written *
- * authorization. *
- ****************************************************************************/
-
-/****************************************************************************
- * Author: Thomas E. Dickey 2010 *
- ****************************************************************************/
-/* LINTLIBRARY */
-
-/* ./m_attribs.c */
-
-#include <menu.priv.h>
-
-#undef set_menu_fore
-int set_menu_fore(
- MENU *menu,
- chtype attr)
- { return(*(int *)0); }
-
-#undef menu_fore
-chtype menu_fore(
- const MENU *menu)
- { return(*(chtype *)0); }
-
-#undef set_menu_back
-int set_menu_back(
- MENU *menu,
- chtype attr)
- { return(*(int *)0); }
-
-#undef menu_back
-chtype menu_back(
- const MENU *menu)
- { return(*(chtype *)0); }
-
-#undef set_menu_grey
-int set_menu_grey(
- MENU *menu,
- chtype attr)
- { return(*(int *)0); }
-
-#undef menu_grey
-chtype menu_grey(
- const MENU *menu)
- { return(*(chtype *)0); }
-
-/* ./m_cursor.c */
-
-#undef _nc_menu_cursor_pos
-int _nc_menu_cursor_pos(
- const MENU *menu,
- const ITEM *item,
- int *pY,
- int *pX)
- { return(*(int *)0); }
-
-#undef pos_menu_cursor
-int pos_menu_cursor(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_driver.c */
-
-#undef _nc_Match_Next_Character_In_Item_Name
-int _nc_Match_Next_Character_In_Item_Name(
- MENU *menu,
- int ch,
- ITEM **item)
- { return(*(int *)0); }
-
-#undef menu_driver
-int menu_driver(
- MENU *menu,
- int c)
- { return(*(int *)0); }
-
-/* ./m_format.c */
-
-#undef set_menu_format
-int set_menu_format(
- MENU *menu,
- int rows,
- int cols)
- { return(*(int *)0); }
-
-#undef menu_format
-void menu_format(
- const MENU *menu,
- int *rows,
- int *cols)
- { /* void */ }
-
-/* ./m_global.c */
-
-#undef _nc_Default_Menu
-MENU _nc_Default_Menu;
-#undef _nc_Default_Item
-ITEM _nc_Default_Item;
-
-#undef _nc_Connect_Items
-NCURSES_BOOL _nc_Connect_Items(
- MENU *menu,
- ITEM **items)
- { return(*(NCURSES_BOOL *)0); }
-
-#undef _nc_Disconnect_Items
-void _nc_Disconnect_Items(
- MENU *menu)
- { /* void */ }
-
-#undef _nc_Calculate_Text_Width
-int _nc_Calculate_Text_Width(
- const TEXT *item)
- { return(*(int *)0); }
-
-#undef _nc_Calculate_Item_Length_and_Width
-void _nc_Calculate_Item_Length_and_Width(
- MENU *menu)
- { /* void */ }
-
-#undef _nc_Link_Items
-void _nc_Link_Items(
- MENU *menu)
- { /* void */ }
-
-#undef _nc_Show_Menu
-void _nc_Show_Menu(
- const MENU *menu)
- { /* void */ }
-
-#undef _nc_New_TopRow_and_CurrentItem
-void _nc_New_TopRow_and_CurrentItem(
- MENU *menu,
- int new_toprow,
- ITEM *new_current_item)
- { /* void */ }
-
-/* ./m_hook.c */
-
-#undef set_menu_init
-int set_menu_init(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef menu_init
-Menu_Hook menu_init(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-#undef set_menu_term
-int set_menu_term(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef menu_term
-Menu_Hook menu_term(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-#undef set_item_init
-int set_item_init(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef item_init
-Menu_Hook item_init(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-#undef set_item_term
-int set_item_term(
- MENU *menu,
- Menu_Hook func)
- { return(*(int *)0); }
-
-#undef item_term
-Menu_Hook item_term(
- const MENU *menu)
- { return(*(Menu_Hook *)0); }
-
-/* ./m_item_cur.c */
-
-#undef set_current_item
-int set_current_item(
- MENU *menu,
- ITEM *item)
- { return(*(int *)0); }
-
-#undef current_item
-ITEM *current_item(
- const MENU *menu)
- { return(*(ITEM **)0); }
-
-#undef item_index
-int item_index(
- const ITEM *item)
- { return(*(int *)0); }
-
-/* ./m_item_nam.c */
-
-#undef item_name
-const char *item_name(
- const ITEM *item)
- { return(*(const char **)0); }
-
-#undef item_description
-const char *item_description(
- const ITEM *item)
- { return(*(const char **)0); }
-
-/* ./m_item_new.c */
-
-#include <wctype.h>
-
-#undef new_item
-ITEM *new_item(
- const char *name,
- const char *description)
- { return(*(ITEM **)0); }
-
-#undef free_item
-int free_item(
- ITEM *item)
- { return(*(int *)0); }
-
-#undef set_menu_mark
-int set_menu_mark(
- MENU *menu,
- const char *mark)
- { return(*(int *)0); }
-
-#undef menu_mark
-const char *menu_mark(
- const MENU *menu)
- { return(*(const char **)0); }
-
-/* ./m_item_opt.c */
-
-#undef set_item_opts
-int set_item_opts(
- ITEM *item,
- Item_Options opts)
- { return(*(int *)0); }
-
-#undef item_opts_off
-int item_opts_off(
- ITEM *item,
- Item_Options opts)
- { return(*(int *)0); }
-
-#undef item_opts_on
-int item_opts_on(
- ITEM *item,
- Item_Options opts)
- { return(*(int *)0); }
-
-#undef item_opts
-Item_Options item_opts(
- const ITEM *item)
- { return(*(Item_Options *)0); }
-
-/* ./m_item_top.c */
-
-#undef set_top_row
-int set_top_row(
- MENU *menu,
- int row)
- { return(*(int *)0); }
-
-#undef top_row
-int top_row(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_item_use.c */
-
-#undef set_item_userptr
-int set_item_userptr(
- ITEM *item,
- void *userptr)
- { return(*(int *)0); }
-
-#undef item_userptr
-void *item_userptr(
- const ITEM *item)
- { return(*(void **)0); }
-
-/* ./m_item_val.c */
-
-#undef set_item_value
-int set_item_value(
- ITEM *item,
- NCURSES_BOOL value)
- { return(*(int *)0); }
-
-#undef item_value
-NCURSES_BOOL item_value(
- const ITEM *item)
- { return(*(NCURSES_BOOL *)0); }
-
-/* ./m_item_vis.c */
-
-#undef item_visible
-NCURSES_BOOL item_visible(
- const ITEM *item)
- { return(*(NCURSES_BOOL *)0); }
-
-/* ./m_items.c */
-
-#undef set_menu_items
-int set_menu_items(
- MENU *menu,
- ITEM **items)
- { return(*(int *)0); }
-
-#undef menu_items
-ITEM **menu_items(
- const MENU *menu)
- { return(*(ITEM ***)0); }
-
-#undef item_count
-int item_count(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_new.c */
-
-#undef new_menu_sp
-MENU *new_menu_sp(
- SCREEN *sp,
- ITEM **items)
- { return(*(MENU **)0); }
-
-#undef new_menu
-MENU *new_menu(
- ITEM **items)
- { return(*(MENU **)0); }
-
-#undef free_menu
-int free_menu(
- MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_opts.c */
-
-#undef set_menu_opts
-int set_menu_opts(
- MENU *menu,
- Menu_Options opts)
- { return(*(int *)0); }
-
-#undef menu_opts_off
-int menu_opts_off(
- MENU *menu,
- Menu_Options opts)
- { return(*(int *)0); }
-
-#undef menu_opts_on
-int menu_opts_on(
- MENU *menu,
- Menu_Options opts)
- { return(*(int *)0); }
-
-#undef menu_opts
-Menu_Options menu_opts(
- const MENU *menu)
- { return(*(Menu_Options *)0); }
-
-/* ./m_pad.c */
-
-#undef set_menu_pad
-int set_menu_pad(
- MENU *menu,
- int pad)
- { return(*(int *)0); }
-
-#undef menu_pad
-int menu_pad(
- const MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_pattern.c */
-
-#undef menu_pattern
-char *menu_pattern(
- const MENU *menu)
- { return(*(char **)0); }
-
-#undef set_menu_pattern
-int set_menu_pattern(
- MENU *menu,
- const char *p)
- { return(*(int *)0); }
-
-/* ./m_post.c */
-
-#undef _nc_Post_Item
-void _nc_Post_Item(
- const MENU *menu,
- const ITEM *item)
- { /* void */ }
-
-#undef _nc_Draw_Menu
-void _nc_Draw_Menu(
- const MENU *menu)
- { /* void */ }
-
-#undef post_menu
-int post_menu(
- MENU *menu)
- { return(*(int *)0); }
-
-#undef unpost_menu
-int unpost_menu(
- MENU *menu)
- { return(*(int *)0); }
-
-/* ./m_req_name.c */
-
-#undef menu_request_name
-const char *menu_request_name(
- int request)
- { return(*(const char **)0); }
-
-#undef menu_request_by_name
-int menu_request_by_name(
- const char *str)
- { return(*(int *)0); }
-
-/* ./m_scale.c */
-
-#undef scale_menu
-int scale_menu(
- const MENU *menu,
- int *rows,
- int *cols)
- { return(*(int *)0); }
-
-/* ./m_spacing.c */
-
-#undef set_menu_spacing
-int set_menu_spacing(
- MENU *menu,
- int s_desc,
- int s_row,
- int s_col)
- { return(*(int *)0); }
-
-#undef menu_spacing
-int menu_spacing(
- const MENU *menu,
- int *s_desc,
- int *s_row,
- int *s_col)
- { return(*(int *)0); }
-
-/* ./m_sub.c */
-
-#undef set_menu_sub
-int set_menu_sub(
- MENU *menu,
- WINDOW *win)
- { return(*(int *)0); }
-
-#undef menu_sub
-WINDOW *menu_sub(
- const MENU *menu)
- { return(*(WINDOW **)0); }
-
-/* ./m_trace.c */
-
-#undef _nc_retrace_item
-ITEM *_nc_retrace_item(
- ITEM *code)
- { return(*(ITEM **)0); }
-
-#undef _nc_retrace_item_ptr
-ITEM **_nc_retrace_item_ptr(
- ITEM **code)
- { return(*(ITEM ***)0); }
-
-#undef _nc_retrace_item_opts
-Item_Options _nc_retrace_item_opts(
- Item_Options code)
- { return(*(Item_Options *)0); }
-
-#undef _nc_retrace_menu
-MENU *_nc_retrace_menu(
- MENU *code)
- { return(*(MENU **)0); }
-
-#undef _nc_retrace_menu_hook
-Menu_Hook _nc_retrace_menu_hook(
- Menu_Hook code)
- { return(*(Menu_Hook *)0); }
-
-#undef _nc_retrace_menu_opts
-Menu_Options _nc_retrace_menu_opts(
- Menu_Options code)
- { return(*(Menu_Options *)0); }
-
-/* ./m_userptr.c */
-
-#undef set_menu_userptr
-int set_menu_userptr(
- MENU *menu,
- void *userptr)
- { return(*(int *)0); }
-
-#undef menu_userptr
-void *menu_userptr(
- const MENU *menu)
- { return(*(void **)0); }
-
-/* ./m_win.c */
-
-#undef set_menu_win
-int set_menu_win(
- MENU *menu,
- WINDOW *win)
- { return(*(int *)0); }
-
-#undef menu_win
-WINDOW *menu_win(
- const MENU *menu)
- { return(*(WINDOW **)0); }
diff --git a/menu/llib-lmenuw b/menu/llib-lmenuw
index 0998f9b0b866..d21fb9488499 100644
--- a/menu/llib-lmenuw
+++ b/menu/llib-lmenuw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2002,2005 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 *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2002-2005,2010 *
+ * Author: Thomas E. Dickey 2002,2005 *
****************************************************************************/
/* LINTLIBRARY */
/* ./m_attribs.c */
-#include <menu.priv.h>
+#include "menu.priv.h"
#undef set_menu_fore
int set_menu_fore(
@@ -352,12 +352,6 @@ int item_count(
/* ./m_new.c */
-#undef new_menu_sp
-MENU *new_menu_sp(
- SCREEN *sp,
- ITEM **items)
- { return(*(MENU **)0); }
-
#undef new_menu
MENU *new_menu(
ITEM **items)
diff --git a/menu/m_attribs.c b/menu/m_attribs.c
index c41d558ec994..1126ffb84f5a 100644
--- a/menu/m_attribs.c
+++ b/menu/m_attribs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.16 2010/01/23 21:16:54 tom Exp $")
+MODULE_ID("$Id: m_attribs.c,v 1.14 2004/12/11 23:29:12 tom Exp $")
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
@@ -49,9 +49,9 @@ MODULE_ID("$Id: m_attribs.c,v 1.16 2010/01/23 21:16:54 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) \
+NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU * menu, chtype attr)\
{\
- T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr))); \
+ T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr)));\
if (!(attr==A_NORMAL || (attr & A_ATTRIBUTES)==attr))\
RETURN(E_BAD_ARGUMENT);\
if (menu && ( menu -> name != attr))\
@@ -67,7 +67,7 @@ NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU* menu, chtype attr) \
#define GEN_MENU_ATTR_GET_FCT( name ) \
NCURSES_IMPEXP chtype NCURSES_API menu_ ## name (const MENU * menu)\
{\
- T((T_CALLED("menu_" #name "(%p)"), (const void *) menu));\
+ T((T_CALLED("menu_" #name "(%p)"), menu));\
returnAttr(Normalize_Menu( menu ) -> name);\
}
@@ -140,5 +140,4 @@ GEN_MENU_ATTR_SET_FCT(grey)
| Return Values : Attribute value
+--------------------------------------------------------------------------*/
GEN_MENU_ATTR_GET_FCT(grey)
-
/* m_attribs.c ends here */
diff --git a/menu/m_cursor.c b/menu/m_cursor.c
index 9891de4a9450..0293f9073c32 100644
--- a/menu/m_cursor.c
+++ b/menu/m_cursor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2005 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.22 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_cursor.c,v 1.20 2005/10/22 23:03:32 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -86,11 +86,11 @@ pos_menu_cursor(const MENU * menu)
int x = 0, y = 0;
int err = _nc_menu_cursor_pos(menu, (ITEM *) 0, &y, &x);
- T((T_CALLED("pos_menu_cursor(%p)"), (const void *)menu));
+ T((T_CALLED("pos_menu_cursor(%p)"), menu));
if (E_OK == err)
{
- win = Get_Menu_UserWin(menu);
+ win = menu->userwin ? menu->userwin : stdscr;
sub = menu->usersub ? menu->usersub : win;
assert(win && sub);
diff --git a/menu/m_driver.c b/menu/m_driver.c
index deeff4710c08..d418e6a22557 100644
--- a/menu/m_driver.c
+++ b/menu/m_driver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2008 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.29 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_driver.c,v 1.27 2008/08/03 22:08:22 tom Exp $")
/* Macros */
@@ -121,8 +121,7 @@ _nc_Match_Next_Character_In_Item_Name
bool found = FALSE, passed = FALSE;
int idx, last;
- T((T_CALLED("_nc_Match_Next_Character(%p,%d,%p)"),
- (void *)menu, ch, (void *)item));
+ T((T_CALLED("_nc_Match_Next_Character(%p,%d,%p)"), menu, ch, item));
assert(menu && item && *item);
idx = (*item)->index;
@@ -198,7 +197,7 @@ _nc_Match_Next_Character_In_Item_Name
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int menu_driver(MENU* menu, int c)
+| Function : int menu_driver(MENU *menu, int c)
|
| Description : Central dispatcher for the menu. Translates the logical
| request 'c' into a menu action.
@@ -221,7 +220,7 @@ menu_driver(MENU * menu, int c)
ITEM *item;
int my_top_row, rdiff;
- T((T_CALLED("menu_driver(%p,%d)"), (void *)menu, c));
+ T((T_CALLED("menu_driver(%p,%d)"), menu, c));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_format.c b/menu/m_format.c
index 8e68a036ee2e..773cb27e774f 100644
--- a/menu/m_format.c
+++ b/menu/m_format.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.16 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_format.c,v 1.15 2004/12/11 23:11:21 tom Exp $")
#define minimum(a,b) ((a)<(b) ? (a): (b))
@@ -60,7 +60,7 @@ set_menu_format(MENU * menu, int rows, int cols)
{
int total_rows, total_cols;
- T((T_CALLED("set_menu_format(%p,%d,%d)"), (void *)menu, rows, cols));
+ T((T_CALLED("set_menu_format(%p,%d,%d)"), menu, rows, cols));
if (rows < 0 || cols < 0)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_global.c b/menu/m_global.c
index 90f6f25925b7..28e836dd644e 100644
--- a/menu/m_global.c
+++ b/menu/m_global.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2005 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_global.c,v 1.25 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_global.c,v 1.23 2005/12/31 21:51:52 tom Exp $")
static char mark[] = "-";
/* *INDENT-OFF* */
@@ -253,7 +253,7 @@ _nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ )
#if USE_WIDEC_SUPPORT
int result = item->length;
- T((T_CALLED("_nc_menu_text_width(%p)"), (const void *)item));
+ T((T_CALLED("_nc_menu_text_width(%p)"), item));
if (result != 0 && item->str != 0)
{
int count = mbstowcs(0, item->str, 0);
@@ -496,7 +496,7 @@ _nc_Link_Items(MENU * menu)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : void _nc_Show_Menu(const MENU* menu)
+| Function : void _nc_Show_Menu(const MENU *menu)
|
| Description : Update the window that is associated with the menu
|
@@ -543,10 +543,8 @@ _nc_Show_Menu(const MENU * menu)
| Return Values : -
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void)
-_nc_New_TopRow_and_CurrentItem(
- MENU * menu,
- int new_toprow,
- ITEM * new_current_item)
+ _nc_New_TopRow_and_CurrentItem
+ (MENU * menu, int new_toprow, ITEM * new_current_item)
{
ITEM *cur_item;
bool mterm_called = FALSE;
diff --git a/menu/m_hook.c b/menu/m_hook.c
index 6125d052e7a2..8d768a303ffc 100644
--- a/menu/m_hook.c
+++ b/menu/m_hook.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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_hook.c,v 1.15 2010/01/23 21:16:54 tom Exp $")
+MODULE_ID("$Id: m_hook.c,v 1.14 2004/12/25 21:39:52 tom Exp $")
/* "Template" macro to generate function to set application specific hook */
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
@@ -52,7 +52,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook f
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
NCURSES_IMPEXP Menu_Hook NCURSES_API typ ## _ ## name ( const MENU *menu )\
{\
- T((T_CALLED(#typ "_" #name "(%p)"), (const void *) menu));\
+ T((T_CALLED(#typ "_" #name "(%p)"), menu));\
returnMenuHook(Normalize_Menu(menu) -> typ ## name);\
}
diff --git a/menu/m_item_cur.c b/menu/m_item_cur.c
index 18b1a2726af6..dac12ed91c5e 100644
--- a/menu/m_item_cur.c
+++ b/menu/m_item_cur.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.18 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_item_cur.c,v 1.17 2004/12/25 21:57:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_cur.c,v 1.18 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(int)
set_current_item(MENU * menu, ITEM * item)
{
- T((T_CALLED("set_current_item(%p,%p)"), (void *)menu, (void *)item));
+ T((T_CALLED("set_current_item(%p,%p)"), menu, item));
if (menu && item && (item->imenu == menu))
{
@@ -91,7 +91,7 @@ set_current_item(MENU * menu, ITEM * item)
NCURSES_EXPORT(ITEM *)
current_item(const MENU * menu)
{
- T((T_CALLED("current_item(%p)"), (const void *)menu));
+ T((T_CALLED("current_item(%p)"), menu));
returnItem((menu && menu->items) ? menu->curitem : (ITEM *) 0);
}
@@ -106,7 +106,7 @@ current_item(const MENU * menu)
NCURSES_EXPORT(int)
item_index(const ITEM * item)
{
- T((T_CALLED("item_index(%p)"), (const void *)item));
+ T((T_CALLED("item_index(%p)"), item));
returnCode((item && item->imenu) ? item->index : ERR);
}
diff --git a/menu/m_item_nam.c b/menu/m_item_nam.c
index 3ed1d37668a2..05a169340b45 100644
--- a/menu/m_item_nam.c
+++ b/menu/m_item_nam.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.15 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_item_nam.c,v 1.14 2004/12/25 21:41:54 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_nam.c,v 1.15 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(const char *)
item_name(const ITEM * item)
{
- T((T_CALLED("item_name(%p)"), (const void *)item));
+ T((T_CALLED("item_name(%p)"), item));
returnCPtr((item) ? item->name.str : (char *)0);
}
@@ -65,7 +65,7 @@ item_name(const ITEM * item)
NCURSES_EXPORT(const char *)
item_description(const ITEM * item)
{
- T((T_CALLED("item_description(%p)"), (const void *)item));
+ T((T_CALLED("item_description(%p)"), item));
returnCPtr((item) ? item->description.str : (char *)0);
}
diff --git a/menu/m_item_new.c b/menu/m_item_new.c
index 1debc2b34401..d7fe1f8542c2 100644
--- a/menu/m_item_new.c
+++ b/menu/m_item_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2006 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 *
@@ -44,7 +44,7 @@
#endif
#endif
-MODULE_ID("$Id: m_item_new.c,v 1.30 2010/01/23 21:20:11 tom Exp $")
+MODULE_ID("$Id: m_item_new.c,v 1.27 2006/12/17 19:47:09 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -122,7 +122,7 @@ new_item(const char *name, const char *description)
}
else
{
- item = typeCalloc(ITEM, 1);
+ item = (ITEM *) calloc(1, sizeof(ITEM));
if (item)
{
*item = _nc_Default_Item; /* hope we have struct assignment */
@@ -162,7 +162,7 @@ new_item(const char *name, const char *description)
NCURSES_EXPORT(int)
free_item(ITEM * item)
{
- T((T_CALLED("free_item(%p)"), (void *)item));
+ T((T_CALLED("free_item(%p)"), item));
if (!item)
RETURN(E_BAD_ARGUMENT);
@@ -197,7 +197,7 @@ set_menu_mark(MENU * menu, const char *mark)
{
unsigned l;
- T((T_CALLED("set_menu_mark(%p,%s)"), (void *)menu, _nc_visbuf(mark)));
+ T((T_CALLED("set_menu_mark(%p,%s)"), menu, _nc_visbuf(mark)));
if (mark && (*mark != '\0') && Is_Printable_String(mark))
l = strlen(mark);
@@ -219,7 +219,7 @@ set_menu_mark(MENU * menu, const char *mark)
menu->marklen = l;
if (l)
{
- menu->mark = strdup(mark);
+ menu->mark = (char *)malloc(l + 1);
if (menu->mark)
{
strcpy(menu->mark, mark);
@@ -229,7 +229,6 @@ set_menu_mark(MENU * menu, const char *mark)
else
{
menu->mark = old_mark;
- menu->marklen = (old_mark != 0) ? strlen(old_mark) : 0;
RETURN(E_SYSTEM_ERROR);
}
}
@@ -268,7 +267,7 @@ set_menu_mark(MENU * menu, const char *mark)
NCURSES_EXPORT(const char *)
menu_mark(const MENU * menu)
{
- T((T_CALLED("menu_mark(%p)"), (const void *)menu));
+ T((T_CALLED("menu_mark(%p)"), menu));
returnPtr(Normalize_Menu(menu)->mark);
}
diff --git a/menu/m_item_opt.c b/menu/m_item_opt.c
index 91385da1217c..cfe7b75db392 100644
--- a/menu/m_item_opt.c
+++ b/menu/m_item_opt.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.18 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_item_opt.c,v 1.17 2004/12/25 21:32:54 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_item_opt.c,v 1.18 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(int)
set_item_opts(ITEM * item, Item_Options opts)
{
- T((T_CALLED("set_menu_opts(%p,%d)"), (void *)item, opts));
+ T((T_CALLED("set_menu_opts(%p,%d)"), item, opts));
opts &= ALL_ITEM_OPTS;
@@ -100,7 +100,7 @@ item_opts_off(ITEM * item, Item_Options opts)
NULL item itself to adjust its behavior */
- T((T_CALLED("item_opts_off(%p,%d)"), (void *)item, opts));
+ T((T_CALLED("item_opts_off(%p,%d)"), item, opts));
if (opts & ~ALL_ITEM_OPTS)
RETURN(E_BAD_ARGUMENT);
@@ -128,7 +128,7 @@ item_opts_on(ITEM * item, Item_Options opts)
NULL item itself to adjust its behavior */
- T((T_CALLED("item_opts_on(%p,%d)"), (void *)item, opts));
+ T((T_CALLED("item_opts_on(%p,%d)"), item, opts));
opts &= ALL_ITEM_OPTS;
if (opts & ~ALL_ITEM_OPTS)
@@ -152,7 +152,7 @@ item_opts_on(ITEM * item, Item_Options opts)
NCURSES_EXPORT(Item_Options)
item_opts(const ITEM * item)
{
- T((T_CALLED("item_opts(%p)"), (const void *)item));
+ T((T_CALLED("item_opts(%p)"), item));
returnItemOpts(ALL_ITEM_OPTS & Normalize_Item(item)->opt);
}
diff --git a/menu/m_item_top.c b/menu/m_item_top.c
index 752e20d9edbb..7268a0e49f15 100644
--- a/menu/m_item_top.c
+++ b/menu/m_item_top.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.11 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_item_top.c,v 1.10 2004/12/11 23:29:34 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -54,7 +54,7 @@ set_top_row(MENU * menu, int row)
{
ITEM *item;
- T((T_CALLED("set_top_row(%p,%d)"), (void *)menu, row));
+ T((T_CALLED("set_top_row(%p,%d)"), menu, row));
if (menu)
{
@@ -94,7 +94,7 @@ set_top_row(MENU * menu, int row)
NCURSES_EXPORT(int)
top_row(const MENU * menu)
{
- T((T_CALLED("top_row(%p)"), (const void *)menu));
+ T((T_CALLED("top_row(%p)"), menu));
if (menu && menu->items && *(menu->items))
{
assert((menu->toprow >= 0) && (menu->toprow < menu->rows));
diff --git a/menu/m_item_use.c b/menu/m_item_use.c
index 8cf294bc29e3..06a5baf984e8 100644
--- a/menu/m_item_use.c
+++ b/menu/m_item_use.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.17 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_item_use.c,v 1.16 2004/12/25 21:33:31 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_item_use.c,v 1.17 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(int)
set_item_userptr(ITEM * item, void *userptr)
{
- T((T_CALLED("set_item_userptr(%p,%p)"), (void *)item, (void *)userptr));
+ T((T_CALLED("set_item_userptr(%p,%p)"), item, userptr));
Normalize_Item(item)->userptr = userptr;
RETURN(E_OK);
}
@@ -69,7 +69,7 @@ set_item_userptr(ITEM * item, void *userptr)
NCURSES_EXPORT(void *)
item_userptr(const ITEM * item)
{
- T((T_CALLED("item_userptr(%p)"), (const void *)item));
+ T((T_CALLED("item_userptr(%p)"), item));
returnVoidPtr(Normalize_Item(item)->userptr);
}
diff --git a/menu/m_item_val.c b/menu/m_item_val.c
index 337dbfcc6808..cebf693fbd34 100644
--- a/menu/m_item_val.c
+++ b/menu/m_item_val.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.15 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_item_val.c,v 1.14 2004/12/11 23:29:34 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -57,7 +57,7 @@ set_item_value(ITEM * item, bool value)
{
MENU *menu;
- T((T_CALLED("set_item_value(%p,%d)"), (void *)item, value));
+ T((T_CALLED("set_item_value(%p,%d)"), item, value));
if (item)
{
menu = item->imenu;
@@ -97,7 +97,7 @@ set_item_value(ITEM * item, bool value)
NCURSES_EXPORT(bool)
item_value(const ITEM * item)
{
- T((T_CALLED("item_value(%p)"), (const void *)item));
+ T((T_CALLED("item_value(%p)"), item));
returnBool((Normalize_Item(item)->value) ? TRUE : FALSE);
}
diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c
index ff8474054370..f8fb97f028cb 100644
--- a/menu/m_item_vis.c
+++ b/menu/m_item_vis.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.16 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_item_vis.c,v 1.15 2004/12/25 21:40:09 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -54,7 +54,7 @@ item_visible(const ITEM * item)
{
MENU *menu;
- T((T_CALLED("item_visible(%p)"), (const void *)item));
+ T((T_CALLED("item_visible(%p)"), item));
if (item &&
(menu = item->imenu) &&
(menu->status & _POSTED) &&
diff --git a/menu/m_items.c b/menu/m_items.c
index 539768551d80..3e8f70b0fa7d 100644
--- a/menu/m_items.c
+++ b/menu/m_items.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2005 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.17 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_items.c,v 1.16 2005/01/16 01:02:23 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -55,7 +55,7 @@ MODULE_ID("$Id: m_items.c,v 1.17 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(int)
set_menu_items(MENU * menu, ITEM ** items)
{
- T((T_CALLED("set_menu_items(%p,%p)"), (void *)menu, (void *)items));
+ T((T_CALLED("set_menu_items(%p,%p)"), menu, items));
if (!menu || (items && !(*items)))
RETURN(E_BAD_ARGUMENT);
@@ -87,7 +87,7 @@ set_menu_items(MENU * menu, ITEM ** items)
NCURSES_EXPORT(ITEM **)
menu_items(const MENU * menu)
{
- T((T_CALLED("menu_items(%p)"), (const void *)menu));
+ T((T_CALLED("menu_items(%p)"), menu));
returnItemPtr(menu ? menu->items : (ITEM **) 0);
}
@@ -103,7 +103,7 @@ menu_items(const MENU * menu)
NCURSES_EXPORT(int)
item_count(const MENU * menu)
{
- T((T_CALLED("item_count(%p)"), (const void *)menu));
+ T((T_CALLED("item_count(%p)"), menu));
returnCode(menu ? menu->nitems : -1);
}
diff --git a/menu/m_new.c b/menu/m_new.c
index 79f9292a7b3c..c20c66517790 100644
--- a/menu/m_new.c
+++ b/menu/m_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2006 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_new.c,v 1.21 2010/01/23 21:20:11 tom Exp $")
+MODULE_ID("$Id: m_new.c,v 1.18 2006/11/04 19:04:06 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : MENU* _nc_new_menu(SCREEN*, ITEM **items)
+| Function : MENU *new_menu(ITEM **items)
|
| Description : Creates a new menu connected to the item pointer
| array items and returns a pointer to the new menu.
@@ -51,25 +51,18 @@ MODULE_ID("$Id: m_new.c,v 1.21 2010/01/23 21:20:11 tom Exp $")
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(MENU *)
-NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
+new_menu(ITEM ** items)
{
int err = E_SYSTEM_ERROR;
- MENU *menu = typeCalloc(MENU, 1);
+ MENU *menu = (MENU *) calloc(1, sizeof(MENU));
- T((T_CALLED("new_menu(%p,%p)"), (void *)SP_PARM, (void *)items));
+ T((T_CALLED("new_menu(%p)"), items));
if (menu)
{
*menu = _nc_Default_Menu;
menu->status = 0;
menu->rows = menu->frows;
menu->cols = menu->fcols;
-#if NCURSES_SP_FUNCS
- /* This ensures userwin and usersub are always non-null,
- so we can derive always the SCREEN that this menu is
- running on. */
- menu->userwin = SP_PARM->_stdscr;
- menu->usersub = SP_PARM->_stdscr;
-#endif
if (items && *items)
{
if (!_nc_Connect_Items(menu, items))
@@ -78,8 +71,6 @@ NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
free(menu);
menu = (MENU *) 0;
}
- else
- err = E_OK;
}
}
@@ -91,25 +82,6 @@ NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : MENU *new_menu(ITEM **items)
-|
-| Description : Creates a new menu connected to the item pointer
-| array items and returns a pointer to the new menu.
-| The new menu is initialized with the values from the
-| default menu.
-|
-| Return Values : NULL on error
-+--------------------------------------------------------------------------*/
-#if NCURSES_SP_FUNCS
-NCURSES_EXPORT(MENU *)
-new_menu(ITEM ** items)
-{
- return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items);
-}
-#endif
-
-/*---------------------------------------------------------------------------
-| Facility : libnmenu
| Function : int free_menu(MENU *menu)
|
| Description : Disconnects menu from its associated item pointer
@@ -122,7 +94,7 @@ new_menu(ITEM ** items)
NCURSES_EXPORT(int)
free_menu(MENU * menu)
{
- T((T_CALLED("free_menu(%p)"), (void *)menu));
+ T((T_CALLED("free_menu(%p)"), menu));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_opts.c b/menu/m_opts.c
index bc6924b65149..a7370b06f8e5 100644
--- a/menu/m_opts.c
+++ b/menu/m_opts.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.20 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_opts.c,v 1.19 2004/12/25 21:36:12 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -55,7 +55,7 @@ MODULE_ID("$Id: m_opts.c,v 1.20 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(int)
set_menu_opts(MENU * menu, Menu_Options opts)
{
- T((T_CALLED("set_menu_opts(%p,%d)"), (void *)menu, opts));
+ T((T_CALLED("set_menu_opts(%p,%d)"), menu, opts));
opts &= ALL_MENU_OPTS;
@@ -119,7 +119,7 @@ menu_opts_off(MENU * menu, Menu_Options opts)
NULL menu itself to adjust its behavior */
- T((T_CALLED("menu_opts_off(%p,%d)"), (void *)menu, opts));
+ T((T_CALLED("menu_opts_off(%p,%d)"), menu, opts));
opts &= ALL_MENU_OPTS;
if (opts & ~ALL_MENU_OPTS)
@@ -152,7 +152,7 @@ menu_opts_on(MENU * menu, Menu_Options opts)
NULL menu itself to adjust its behavior */
- T((T_CALLED("menu_opts_on(%p,%d)"), (void *)menu, opts));
+ T((T_CALLED("menu_opts_on(%p,%d)"), menu, opts));
opts &= ALL_MENU_OPTS;
if (opts & ~ALL_MENU_OPTS)
@@ -176,7 +176,7 @@ menu_opts_on(MENU * menu, Menu_Options opts)
NCURSES_EXPORT(Menu_Options)
menu_opts(const MENU * menu)
{
- T((T_CALLED("menu_opts(%p)"), (const void *)menu));
+ T((T_CALLED("menu_opts(%p)"), menu));
returnMenuOpts(ALL_MENU_OPTS & Normalize_Menu(menu)->opt);
}
diff --git a/menu/m_pad.c b/menu/m_pad.c
index caa2f9e207b1..76083ba36d34 100644
--- a/menu/m_pad.c
+++ b/menu/m_pad.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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,19 +37,19 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_pad.c,v 1.12 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_pad.c,v 1.10 2004/12/25 21:40:58 tom Exp $")
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
if ( (menu) && ((menu)->status & _POSTED) )\
{\
_nc_Draw_Menu( menu );\
- _nc_Show_Menu( menu ); \
+ _nc_Show_Menu( menu );\
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int set_menu_pad(MENU* menu, int pad)
+| Function : int set_menu_pad(MENU *menu, int pad)
|
| Description : Set the character to be used to separate the item name
| from its description. This must be a printable
@@ -63,7 +63,7 @@ set_menu_pad(MENU * menu, int pad)
{
bool do_refresh = (menu != (MENU *) 0);
- T((T_CALLED("set_menu_pad(%p,%d)"), (void *)menu, pad));
+ T((T_CALLED("set_menu_pad(%p,%d)"), menu, pad));
if (!isprint(UChar(pad)))
RETURN(E_BAD_ARGUMENT);
@@ -88,7 +88,7 @@ set_menu_pad(MENU * menu, int pad)
NCURSES_EXPORT(int)
menu_pad(const MENU * menu)
{
- T((T_CALLED("menu_pad(%p)"), (const void *)menu));
+ T((T_CALLED("menu_pad(%p)"), menu));
returnCode(Normalize_Menu(menu)->pad);
}
diff --git a/menu/m_pattern.c b/menu/m_pattern.c
index 1764d05fbc0c..1171390e214c 100644
--- a/menu/m_pattern.c
+++ b/menu/m_pattern.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2006 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.16 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_pattern.c,v 1.15 2006/11/04 18:46:39 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -55,7 +55,7 @@ menu_pattern(const MENU * menu)
{
static char empty[] = "";
- T((T_CALLED("menu_pattern(%p)"), (const void *)menu));
+ T((T_CALLED("menu_pattern(%p)"), menu));
returnPtr(menu ? (menu->pattern ? menu->pattern : empty) : 0);
}
@@ -78,7 +78,7 @@ set_menu_pattern(MENU * menu, const char *p)
ITEM *matchitem;
int matchpos;
- T((T_CALLED("set_menu_pattern(%p,%s)"), (void *)menu, _nc_visbuf(p)));
+ T((T_CALLED("set_menu_pattern(%p,%s)"), menu, _nc_visbuf(p)));
if (!menu || !p)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_post.c b/menu/m_post.c
index 1f0b623ed456..657d0f18420b 100644
--- a/menu/m_post.c
+++ b/menu/m_post.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.29 2010/05/01 19:18:27 tom Exp $")
+MODULE_ID("$Id: m_post.c,v 1.26 2004/12/25 23:57:04 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -171,7 +171,7 @@ _nc_Post_Item(const MENU * menu, const ITEM * item)
waddch(menu->win, ' ');
}
if ((cy + j) < getmaxy(menu->win))
- (void)mvwaddch(menu->win, cy + j, cx - 1, menu->pad);
+ mvwaddch(menu->win, cy + j, cx - 1, menu->pad);
}
wmove(menu->win, ncy, ncx);
if (!isback)
@@ -255,7 +255,7 @@ _nc_Draw_Menu(const MENU * menu)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int post_menu(MENU* menu)
+| Function : int post_menu(MENU *)
|
| Description : Post a menu to the screen. This makes it visible.
|
@@ -269,7 +269,7 @@ _nc_Draw_Menu(const MENU * menu)
NCURSES_EXPORT(int)
post_menu(MENU * menu)
{
- T((T_CALLED("post_menu(%p)"), (void *)menu));
+ T((T_CALLED("post_menu(%p)"), menu));
if (!menu)
RETURN(E_BAD_ARGUMENT);
@@ -329,7 +329,7 @@ post_menu(MENU * menu)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int unpost_menu(MENU*)
+| Function : int unpost_menu(MENU *)
|
| Description : Detach menu from screen
|
@@ -343,7 +343,7 @@ unpost_menu(MENU * menu)
{
WINDOW *win;
- T((T_CALLED("unpost_menu(%p)"), (void *)menu));
+ T((T_CALLED("unpost_menu(%p)"), menu));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_req_name.c b/menu/m_req_name.c
index cad875802071..6fd51b1c361e 100644
--- a/menu/m_req_name.c
+++ b/menu/m_req_name.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2008 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.21 2009/10/10 16:17:23 tom Exp $")
+MODULE_ID("$Id: m_req_name.c,v 1.20 2008/09/13 18:59:17 tom Exp $")
static const char *request_names[MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1] =
{
@@ -109,7 +109,7 @@ menu_request_by_name(const char *str)
strncpy(buf, str, sizeof(buf));
while ((i < sizeof(buf)) && (buf[i] != '\0'))
{
- buf[i] = (char)toupper(UChar(buf[i]));
+ buf[i] = toupper(UChar(buf[i]));
i++;
}
diff --git a/menu/m_scale.c b/menu/m_scale.c
index 068a1cc8c538..96c2d84eb3af 100644
--- a/menu/m_scale.c
+++ b/menu/m_scale.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.10 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_scale.c,v 1.9 2004/12/11 23:29:34 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -53,10 +53,7 @@ MODULE_ID("$Id: m_scale.c,v 1.10 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(int)
scale_menu(const MENU * menu, int *rows, int *cols)
{
- T((T_CALLED("scale_menu(%p,%p,%p)"),
- (const void *)menu,
- (void *)rows,
- (void *)cols));
+ T((T_CALLED("scale_menu(%p,%p,%p)"), menu, rows, cols));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_spacing.c b/menu/m_spacing.c
index 1cfa2e166571..039bbe4d59b1 100644
--- a/menu/m_spacing.c
+++ b/menu/m_spacing.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.18 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_spacing.c,v 1.17 2004/12/11 23:29:34 tom Exp $")
#define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8)
#define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8)
@@ -56,8 +56,7 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col)
{
MENU *m; /* split for ATAC workaround */
- T((T_CALLED("set_menu_spacing(%p,%d,%d,%d)"),
- (void *)menu, s_desc, s_row, s_col));
+ T((T_CALLED("set_menu_spacing(%p,%d,%d,%d)"), menu, s_desc, s_row, s_col));
m = Normalize_Menu(menu);
@@ -91,11 +90,7 @@ menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col)
{
const MENU *m; /* split for ATAC workaround */
- T((T_CALLED("menu_spacing(%p,%p,%p,%p)"),
- (const void *)menu,
- (void *)s_desc,
- (void *)s_row,
- (void *)s_col));
+ T((T_CALLED("menu_spacing(%p,%p,%p,%p)"), menu, s_desc, s_row, s_col));
m = Normalize_Menu(menu);
diff --git a/menu/m_sub.c b/menu/m_sub.c
index 37529a08b295..82649c57b130 100644
--- a/menu/m_sub.c
+++ b/menu/m_sub.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.12 2010/01/23 21:20:11 tom Exp $")
+MODULE_ID("$Id: m_sub.c,v 1.10 2004/12/25 21:38:31 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,28 +51,14 @@ MODULE_ID("$Id: m_sub.c,v 1.12 2010/01/23 21:20:11 tom Exp $")
NCURSES_EXPORT(int)
set_menu_sub(MENU * menu, WINDOW *win)
{
- T((T_CALLED("set_menu_sub(%p,%p)"), (void *)menu, (void *)win));
+ T((T_CALLED("set_menu_sub(%p,%p)"), menu, win));
if (menu)
{
if (menu->status & _POSTED)
RETURN(E_POSTED);
- else
-#if NCURSES_SP_FUNCS
- {
- /* We ensure that usersub is never null. So even if a null
- WINDOW parameter is passed, we store the SCREENS stdscr.
- The only MENU that can have a null usersub is the static
- _nc_default_Menu.
- */
- SCREEN *sp = _nc_screen_of(menu->usersub);
-
- menu->usersub = win ? win : sp->_stdscr;
- _nc_Calculate_Item_Length_and_Width(menu);
- }
-#else
- menu->usersub = win;
-#endif
+ menu->usersub = win;
+ _nc_Calculate_Item_Length_and_Width(menu);
}
else
_nc_Default_Menu.usersub = win;
@@ -82,7 +68,7 @@ set_menu_sub(MENU * menu, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : WINDOW* menu_sub(const MENU *menu)
+| Function : WINDOW *menu_sub(const MENU *menu)
|
| Description : Returns a pointer to the subwindow of the menu
|
@@ -93,7 +79,7 @@ menu_sub(const MENU * menu)
{
const MENU *m = Normalize_Menu(menu);
- T((T_CALLED("menu_sub(%p)"), (const void *)menu));
+ T((T_CALLED("menu_sub(%p)"), menu));
returnWin(Get_Menu_Window(m));
}
diff --git a/menu/m_trace.c b/menu/m_trace.c
index 094ff86c67a9..0f9f90273a6a 100644
--- a/menu/m_trace.c
+++ b/menu/m_trace.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2004-2005,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2004,2005 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 *
@@ -32,19 +32,19 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_trace.c,v 1.4 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_trace.c,v 1.3 2005/01/16 01:06:11 tom Exp $")
NCURSES_EXPORT(ITEM *)
_nc_retrace_item(ITEM * code)
{
- T((T_RETURN("%p"), (void *)code));
+ T((T_RETURN("%p"), code));
return code;
}
NCURSES_EXPORT(ITEM **)
_nc_retrace_item_ptr(ITEM ** code)
{
- T((T_RETURN("%p"), (void *)code));
+ T((T_RETURN("%p"), code));
return code;
}
@@ -58,7 +58,7 @@ _nc_retrace_item_opts(Item_Options code)
NCURSES_EXPORT(MENU *)
_nc_retrace_menu(MENU * code)
{
- T((T_RETURN("%p"), (void *)code));
+ T((T_RETURN("%p"), code));
return code;
}
diff --git a/menu/m_userptr.c b/menu/m_userptr.c
index a7359c99d0eb..7b178b25a175 100644
--- a/menu/m_userptr.c
+++ b/menu/m_userptr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.17 2010/01/23 21:20:10 tom Exp $")
+MODULE_ID("$Id: m_userptr.c,v 1.16 2004/12/25 21:38:55 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_userptr.c,v 1.17 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(int)
set_menu_userptr(MENU * menu, void *userptr)
{
- T((T_CALLED("set_menu_userptr(%p,%p)"), (void *)menu, (void *)userptr));
+ T((T_CALLED("set_menu_userptr(%p,%p)"), menu, userptr));
Normalize_Menu(menu)->userptr = userptr;
RETURN(E_OK);
}
@@ -69,7 +69,7 @@ set_menu_userptr(MENU * menu, void *userptr)
NCURSES_EXPORT(void *)
menu_userptr(const MENU * menu)
{
- T((T_CALLED("menu_userptr(%p)"), (const void *)menu));
+ T((T_CALLED("menu_userptr(%p)"), menu));
returnVoidPtr(Normalize_Menu(menu)->userptr);
}
diff --git a/menu/m_win.c b/menu/m_win.c
index d88fa674c608..c3f857f71688 100644
--- a/menu/m_win.c
+++ b/menu/m_win.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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.17 2010/01/23 21:20:11 tom Exp $")
+MODULE_ID("$Id: m_win.c,v 1.15 2004/12/25 21:39:20 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,28 +51,14 @@ MODULE_ID("$Id: m_win.c,v 1.17 2010/01/23 21:20:11 tom Exp $")
NCURSES_EXPORT(int)
set_menu_win(MENU * menu, WINDOW *win)
{
- T((T_CALLED("set_menu_win(%p,%p)"), (void *)menu, (void *)win));
+ T((T_CALLED("set_menu_win(%p,%p)"), menu, win));
if (menu)
{
if (menu->status & _POSTED)
RETURN(E_POSTED);
- else
-#if NCURSES_SP_FUNCS
- {
- /* We ensure that userwin is never null. So even if a null
- WINDOW parameter is passed, we store the SCREENS stdscr.
- The only MENU that can have a null userwin is the static
- _nc_default_Menu.
- */
- SCREEN *sp = _nc_screen_of(menu->userwin);
-
- menu->userwin = win ? win : sp->_stdscr;
- _nc_Calculate_Item_Length_and_Width(menu);
- }
-#else
- menu->userwin = win;
-#endif
+ menu->userwin = win;
+ _nc_Calculate_Item_Length_and_Width(menu);
}
else
_nc_Default_Menu.userwin = win;
@@ -82,7 +68,7 @@ set_menu_win(MENU * menu, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : WINDOW* menu_win(const MENU*)
+| Function : WINDOW *menu_win(const MENU *)
|
| Description : Returns pointer to the window of the menu
|
@@ -93,8 +79,8 @@ menu_win(const MENU * menu)
{
const MENU *m = Normalize_Menu(menu);
- T((T_CALLED("menu_win(%p)"), (const void *)menu));
- returnWin(Get_Menu_UserWin(m));
+ T((T_CALLED("menu_win(%p)"), menu));
+ returnWin(m->userwin ? m->userwin : stdscr);
}
/* m_win.c ends here */
diff --git a/menu/menu.h b/menu/menu.h
index 4eeac018bdb3..84352eb5d2f6 100644
--- a/menu/menu.h
+++ b/menu/menu.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2007 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 *
@@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
-/* $Id: menu.h,v 1.20 2009/04/05 00:28:07 tom Exp $ */
+/* $Id: menu.h,v 1.19 2007/02/24 17:32:13 tom Exp $ */
#ifndef ETI_MENU
#define ETI_MENU
@@ -249,10 +249,6 @@ extern NCURSES_EXPORT(bool) item_visible (const ITEM *);
extern NCURSES_EXPORT(void) menu_format (const MENU *,int *,int *);
-#if NCURSES_SP_FUNCS
-extern NCURSES_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **);
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/menu/menu.priv.h b/menu/menu.priv.h
index 99580a38d1c2..10d3537594da 100644
--- a/menu/menu.priv.h
+++ b/menu/menu.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2005 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 *
@@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
-/* $Id: menu.priv.h,v 1.23 2009/02/28 21:02:57 juergen Exp $ */
+/* $Id: menu.priv.h,v 1.22 2005/01/16 01:02:23 tom Exp $ */
/***************************************************************************
* Module menu.priv.h *
@@ -56,12 +56,8 @@ extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu;
/* Normalize menu to default if none was given */
#define Normalize_Menu( menu ) ((menu)=(menu)?(menu):&_nc_Default_Menu)
-#define Get_Menu_Screen( menu ) (menu->userwin ? \
- _nc_screen_of(menu->userwin) : CURRENT_SCREEN)
-
/* Get the user defined (framing) window of the menu */
-#define Get_Menu_UserWin(menu) ((menu)->userwin ? \
- (menu)->userwin : CURRENT_SCREEN->_stdscr)
+#define Get_Menu_UserWin(menu) ((menu)->userwin ? (menu)->userwin : stdscr)
/* Normalize menu window */
#define Get_Menu_Window( menu ) \
diff --git a/menu/modules b/menu/modules
index fac8fceba1e4..abc4cf0afa49 100644
--- a/menu/modules
+++ b/menu/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.18 2010/01/23 16:36:23 tom Exp $
+# $Id: modules,v 1.17 2006/12/24 00:52:39 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2004,2006 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"), #
@@ -32,32 +32,32 @@
@ base
# Library objects
-m_attribs lib $(srcdir) $(HEADER_DEPS)
-m_cursor lib $(srcdir) $(HEADER_DEPS)
-m_driver lib $(srcdir) $(HEADER_DEPS)
-m_format lib $(srcdir) $(HEADER_DEPS)
-m_global lib $(srcdir) $(HEADER_DEPS)
-m_hook lib $(srcdir) $(HEADER_DEPS)
-m_item_cur lib $(srcdir) $(HEADER_DEPS)
-m_item_nam lib $(srcdir) $(HEADER_DEPS)
-m_item_new lib $(srcdir) $(HEADER_DEPS)
-m_item_opt lib $(srcdir) $(HEADER_DEPS)
-m_item_top lib $(srcdir) $(HEADER_DEPS)
-m_item_use lib $(srcdir) $(HEADER_DEPS)
-m_item_val lib $(srcdir) $(HEADER_DEPS)
-m_item_vis lib $(srcdir) $(HEADER_DEPS)
-m_items lib $(srcdir) $(HEADER_DEPS)
-m_new lib $(srcdir) $(HEADER_DEPS)
-m_opts lib $(srcdir) $(HEADER_DEPS)
-m_pad lib $(srcdir) $(HEADER_DEPS)
-m_pattern lib $(srcdir) $(HEADER_DEPS)
-m_post lib $(srcdir) $(HEADER_DEPS)
-m_req_name lib $(srcdir) $(HEADER_DEPS)
-m_scale lib $(srcdir) $(HEADER_DEPS)
-m_spacing lib $(srcdir) $(HEADER_DEPS)
-m_sub lib $(srcdir) $(HEADER_DEPS)
-m_trace lib $(srcdir) $(HEADER_DEPS)
-m_userptr lib $(srcdir) $(HEADER_DEPS)
-m_win lib $(srcdir) $(HEADER_DEPS)
+m_attribs lib $(srcdir) $(MENU_PRIV_H)
+m_cursor lib $(srcdir) $(MENU_PRIV_H)
+m_driver lib $(srcdir) $(MENU_PRIV_H)
+m_format lib $(srcdir) $(MENU_PRIV_H)
+m_global lib $(srcdir) $(MENU_PRIV_H)
+m_hook lib $(srcdir) $(MENU_PRIV_H)
+m_item_cur lib $(srcdir) $(MENU_PRIV_H)
+m_item_nam lib $(srcdir) $(MENU_PRIV_H)
+m_item_new lib $(srcdir) $(MENU_PRIV_H)
+m_item_opt lib $(srcdir) $(MENU_PRIV_H)
+m_item_top lib $(srcdir) $(MENU_PRIV_H)
+m_item_use lib $(srcdir) $(MENU_PRIV_H)
+m_item_val lib $(srcdir) $(MENU_PRIV_H)
+m_item_vis lib $(srcdir) $(MENU_PRIV_H)
+m_items lib $(srcdir) $(MENU_PRIV_H)
+m_new lib $(srcdir) $(MENU_PRIV_H)
+m_opts lib $(srcdir) $(MENU_PRIV_H)
+m_pad lib $(srcdir) $(MENU_PRIV_H)
+m_pattern lib $(srcdir) $(MENU_PRIV_H)
+m_post lib $(srcdir) $(MENU_PRIV_H)
+m_req_name lib $(srcdir) $(MENU_PRIV_H)
+m_scale lib $(srcdir) $(MENU_PRIV_H)
+m_spacing lib $(srcdir) $(MENU_PRIV_H)
+m_sub lib $(srcdir) $(MENU_PRIV_H)
+m_trace lib $(srcdir) $(MENU_PRIV_H)
+m_userptr lib $(srcdir) $(MENU_PRIV_H)
+m_win lib $(srcdir) $(MENU_PRIV_H)
# vile:makemode