Introduce new ncurses build glues which are part of ncurses 5.6 update.

Approved by:	delphij
Inspired by:	DragonFly's and lib/bind
This commit is contained in:
Rong-En Fan 2007-01-20 07:46:45 +00:00
parent 85b787f81b
commit f737c0d553
9 changed files with 1082 additions and 622 deletions

5
lib/ncurses/Makefile Normal file
View File

@ -0,0 +1,5 @@
# $FreeBSD$
SUBDIR= ncurses form menu panel
.include <bsd.subdir.mk>

4
lib/ncurses/Makefile.inc Normal file
View File

@ -0,0 +1,4 @@
# This is to include src/lib/Makefile.inc
# $FreeBSD$
.include "../Makefile.inc"

37
lib/ncurses/config.mk Normal file
View File

@ -0,0 +1,37 @@
# This Makefile is shared by libncurses, libform, libmenu, libpanel.
#
# $FreeBSD$
NCURSES_DIR= ${.CURDIR}/../../../contrib/ncurses
NCURSES_CFG_H= ${.CURDIR}/ncurses_cfg.h
CFLAGS+= -I.
.if exists(${.OBJDIR}/../ncurses${LIB_SUFFIX})
CFLAGS+= -I${.OBJDIR}/../ncurses${LIB_SUFFIX}
.endif
CFLAGS+= -I${.CURDIR}/../ncurses${LIB_SUFFIX}
# for ${NCURSES_CFG_H}
CFLAGS+= -I${.CURDIR}/../ncurses
CFLAGS+= -I${NCURSES_DIR}/include
CFLAGS+= -I${NCURSES_DIR}/ncurses
CFLAGS+= -Wall
CFLAGS+= -DNDEBUG
CFLAGS+= -DHAVE_CONFIG_H
# everyone needs this
.PATH: ${NCURSES_DIR}/include
# tools and directories
AWK?= awk
TERMINFODIR?= ${SHAREDIR}/misc
# Generate headers
ncurses_def.h: MKncurses_def.sh ncurses_defs
AWK=${AWK} sh ${NCURSES_DIR}/include/MKncurses_def.sh \
${NCURSES_DIR}/include/ncurses_defs > ncurses_def.h

View File

@ -1,100 +1,165 @@
# Makefile for libform
# $FreeBSD$
NCURSES=${.CURDIR}/../../contrib/ncurses
.include "${.CURDIR}/../config.mk"
.PATH: ${NCURSES}/form
.PATH: ${NCURSES}/include
.PATH: ${NCURSES}/man
SRCDIR= ${NCURSES_DIR}/form
LIB= form
DPADD= ${LIBNCURSES}
LDADD= -lncurses
LIB= form
DPADD= ${LIBNCURSES}
LDADD= -lncurses
AWK?= awk
.PATH: ${SRCDIR}
SRCS= \
ncurses_def.h \
fld_arg.c \
fld_attr.c \
fld_current.c \
fld_def.c \
fld_dup.c \
fld_ftchoice.c \
fld_ftlink.c \
fld_info.c \
fld_just.c \
fld_link.c \
fld_max.c \
fld_move.c \
fld_newftyp.c \
fld_opts.c \
fld_pad.c \
fld_page.c \
fld_stat.c \
fld_type.c \
fld_user.c \
frm_cursor.c \
frm_data.c \
frm_def.c \
frm_driver.c \
frm_hook.c \
frm_opts.c \
frm_page.c \
frm_post.c \
frm_req_name.c \
frm_scale.c \
frm_sub.c \
frm_user.c \
frm_win.c \
fty_alnum.c \
fty_alpha.c \
fty_enum.c \
fty_int.c \
fty_ipv4.c \
fty_num.c \
fty_regex.c
SRCS= ncurses_def.h \
fld_arg.c fld_attr.c fld_current.c fld_def.c fld_dup.c fld_ftchoice.c \
fld_ftlink.c fld_info.c fld_just.c fld_link.c fld_max.c fld_move.c \
fld_newftyp.c fld_opts.c fld_pad.c fld_page.c fld_stat.c fld_type.c \
fld_user.c frm_cursor.c frm_data.c frm_def.c frm_driver.c frm_hook.c \
frm_opts.c frm_page.c frm_post.c frm_req_name.c frm_scale.c frm_sub.c \
frm_user.c frm_win.c fty_alnum.c fty_alpha.c fty_enum.c fty_int.c \
fty_ipv4.c fty_num.c fty_regex.c
INCS= ${NCURSES}/form/form.h
CFLAGS+= -I${SRCDIR}
CFLAGS+= -I${NCURSES_DIR}/menu
INCS= ${SRCDIR}/form.h
CLEANFILES+= ncurses_def.h
CFLAGS+= -I.
.if exists(${.OBJDIR}/../libncurses)
CFLAGS+= -I${.OBJDIR}/../libncurses
.endif
CFLAGS+=-I${.CURDIR}/../libncurses -I${NCURSES}/form -I${NCURSES}/menu \
-I${NCURSES}/include -Wall -DNDEBUG -DHAVE_CONFIG_H
ncurses_def.h: MKncurses_def.sh ncurses_defs
AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
${NCURSES}/include/ncurses_defs > ncurses_def.h
MANx= form.3x form_cursor.3x form_data.3x form_driver.3x \
form_field.3x form_field_attributes.3x form_field_buffer.3x \
form_field_info.3x form_field_just.3x form_field_new.3x \
form_field_opts.3x form_field_userptr.3x \
form_field_validation.3x form_fieldtype.3x form_hook.3x \
form_new.3x form_new_page.3x form_opts.3x form_page.3x \
form_post.3x form_requestname.3x form_userptr.3x form_win.3x
.PATH: ${NCURSES_DIR}/man
MANx= \
form.3x \
form_cursor.3x \
form_data.3x \
form_driver.3x \
form_field.3x \
form_field_attributes.3x \
form_field_buffer.3x \
form_field_info.3x \
form_field_just.3x \
form_field_new.3x \
form_field_opts.3x \
form_field_userptr.3x \
form_field_validation.3x \
form_fieldtype.3x \
form_hook.3x \
form_new.3x \
form_new_page.3x \
form_opts.3x \
form_page.3x \
form_post.3x \
form_requestname.3x \
form_userptr.3x \
form_win.3x
# Generate the MAN list from MANx
.for page in ${MANx}
CLEANFILES+=${page:T:S/x$//g}
MAN+=${page:T:S/x$//g}
CLEANFILES+= ${page:T:S/x$//g}
MAN+= ${page:T:S/x$//g}
${page:T:S/x$//g}: ${page}
cat ${.ALLSRC} > ${.TARGET}
.endfor
MLINKS+=form_cursor.3 pos_form_cursor.3
MLINKS+=form_data.3 data_ahead.3 form_data.3 data_behind.3
MLINKS+=form_field.3 field_count.3 form_field.3 form_fields.3 \
form_field.3 move_field.3 form_field.3 set_form_fields.3
MLINKS+=form_field_attributes.3 field_back.3 \
form_field_attributes.3 field_fore.3 \
form_field_attributes.3 field_pad.3 \
form_field_attributes.3 set_field_back.3 \
form_field_attributes.3 set_field_fore.3 \
form_field_attributes.3 set_field_pad.3
MLINKS+=form_field_buffer.3 field_buffer.3 \
form_field_buffer.3 field_status.3 \
form_field_buffer.3 set_field_buffer.3 \
form_field_buffer.3 set_field_status.3 \
form_field_buffer.3 set_max_field.3
MLINKS+=form_field_info.3 dynamic_fieldinfo.3 form_field_info.3 field_info.3
MLINKS+=form_field_just.3 field_just.3 form_field_just.3 set_field_just.3
MLINKS+=form_field_new.3 dup_field.3 form_field_new.3 free_field.3 \
form_field_new.3 link_field.3 form_field_new.3 new_field.3
MLINKS+=form_field_opts.3 field_opts.3 form_field_opts.3 field_opts_off.3 \
form_field_opts.3 field_opts_on.3 form_field_opts.3 set_field_opts.3 \
form_field_opts.3 set_form_opts.3
MLINKS+=form_field_userptr.3 field_userptr.3 \
form_field_userptr.3 set_field_userptr.3
MLINKS+=form_field_validation.3 field_arg.3 \
form_field_validation.3 field_type.3 \
form_field_validation.3 set_field_type.3
MLINKS+=form_fieldtype.3 link_fieldtype.3 \
form_fieldtype.3 set_fieldtype_arg.3 \
form_fieldtype.3 set_fieldtype_choice.3
MLINKS+=form_hook.3 field_init.3 form_hook.3 field_term.3 \
form_hook.3 form_init.3 form_hook.3 form_term.3 \
form_hook.3 set_field_init.3 form_hook.3 set_field_term.3 \
form_hook.3 set_form_init.3 form_hook.3 set_form_term.3
MLINKS+=form_new.3 free_form.3 form_new.3 new_form.3
MLINKS+=form_new_page.3 new_page.3 form_new_page.3 set_new_page.3
MLINKS+=form_opts.3 form_opts_off.3 form_opts.3 form_opts_on.3
MLINKS+=form_page.3 current_field.3 form_page.3 field_index.3 \
form_page.3 set_current_field.3 form_page.3 set_form_page.3
MLINKS+=form_post.3 post_form.3 form_post.3 unpost_form.3
MLINKS+=form_requestname.3 form_request_by_name.3 \
form_requestname.3 form_request_name.3
MLINKS+=form_userptr.3 set_form_userptr.3
MLINKS+=form_win.3 form_sub.3 form_win.3 scale_form.3 \
form_win.3 set_form_sub.3 form_win.3 set_form_win.3
MLINKS= form_cursor.3 pos_form_cursor.3 \
form_data.3 data_ahead.3 \
form_data.3 data_behind.3 \
form_field.3 field_count.3 \
form_field.3 form_fields.3 \
form_field.3 move_field.3 \
form_field.3 set_form_fields.3 \
form_field_attributes.3 field_back.3 \
form_field_attributes.3 field_fore.3 \
form_field_attributes.3 field_pad.3 \
form_field_attributes.3 set_field_back.3 \
form_field_attributes.3 set_field_fore.3 \
form_field_attributes.3 set_field_pad.3 \
form_field_buffer.3 field_buffer.3 \
form_field_buffer.3 field_status.3 \
form_field_buffer.3 set_field_buffer.3 \
form_field_buffer.3 set_field_status.3 \
form_field_buffer.3 set_max_field.3 \
form_field_info.3 dynamic_fieldinfo.3 \
form_field_info.3 field_info.3 \
form_field_just.3 field_just.3 \
form_field_just.3 set_field_just.3 \
form_field_new.3 dup_field.3 \
form_field_new.3 free_field.3 \
form_field_new.3 link_field.3 \
form_field_new.3 new_field.3 \
form_field_opts.3 field_opts.3 \
form_field_opts.3 field_opts_off.3 \
form_field_opts.3 field_opts_on.3 \
form_field_opts.3 set_field_opts.3 \
form_field_userptr.3 field_userptr.3 \
form_field_userptr.3 set_field_userptr.3 \
form_field_validation.3 field_arg.3 \
form_field_validation.3 field_type.3 \
form_field_validation.3 set_field_type.3 \
form_fieldtype.3 free_fieldtype.3 \
form_fieldtype.3 link_fieldtype.3 \
form_fieldtype.3 new_fieldtype.3 \
form_fieldtype.3 set_fieldtype_arg.3 \
form_fieldtype.3 set_fieldtype_choice.3 \
form_hook.3 field_init.3 \
form_hook.3 field_term.3 \
form_hook.3 form_init.3 \
form_hook.3 form_term.3 \
form_hook.3 set_field_init.3 \
form_hook.3 set_field_term.3 \
form_hook.3 set_form_init.3 \
form_hook.3 set_form_term.3 \
form_new.3 free_form.3 \
form_new.3 new_form.3 \
form_new_page.3 new_page.3 \
form_new_page.3 set_new_page.3 \
form_opts.3 form_opts_off.3 \
form_opts.3 form_opts_on.3 \
form_opts.3 set_form_opts.3 \
form_page.3 current_field.3 \
form_page.3 field_index.3 \
form_page.3 set_current_field.3 \
form_page.3 set_form_page.3 \
form_post.3 post_form.3 \
form_post.3 unpost_form.3 \
form_requestname.3 form_request_by_name.3 \
form_requestname.3 form_request_name.3 \
form_userptr.3 set_form_userptr.3 \
form_win.3 form_sub.3 \
form_win.3 scale_form.3 \
form_win.3 set_form_sub.3 \
form_win.3 set_form_win.3
.include <bsd.lib.mk>

View File

@ -1,84 +1,138 @@
# Makefile for libmenu
# $FreeBSD$
NCURSES=${.CURDIR}/../../contrib/ncurses
.include "${.CURDIR}/../config.mk"
.PATH: ${NCURSES}/menu ${NCURSES}/include
.PATH: ${NCURSES}/man
SRCDIR= ${NCURSES_DIR}/menu
LIB= menu
DPADD= ${LIBNCURSES}
LDADD= -lncurses
AWK?= awk
LIB= menu
DPADD= ${LIBNCURSES}
LDADD= -lncurses
SRCS= ncurses_def.h \
m_attribs.c m_cursor.c m_driver.c m_format.c m_global.c m_hook.c \
m_item_cur.c m_item_nam.c m_item_new.c m_item_opt.c m_item_top.c \
m_item_use.c m_item_val.c m_item_vis.c m_items.c m_new.c m_opts.c \
m_pad.c m_pattern.c m_post.c m_req_name.c m_scale.c m_spacing.c \
m_sub.c m_userptr.c m_win.c
INCS= ${NCURSES}/menu/menu.h ${NCURSES}/menu/eti.h
.PATH: ${SRCDIR}
SRCS= \
ncurses_def.h \
m_attribs.c \
m_cursor.c \
m_driver.c \
m_format.c \
m_global.c \
m_hook.c \
m_item_cur.c \
m_item_nam.c \
m_item_new.c \
m_item_opt.c \
m_item_top.c \
m_item_use.c \
m_item_val.c \
m_item_vis.c \
m_items.c \
m_new.c \
m_opts.c \
m_pad.c \
m_pattern.c \
m_post.c \
m_req_name.c \
m_scale.c \
m_spacing.c \
m_sub.c \
m_userptr.c \
m_win.c
CFLAGS+= -I${SRCDIR}
INCS= ${SRCDIR}/menu.h ${SRCDIR}/eti.h
CLEANFILES+= ncurses_def.h
CFLAGS+= -I.
.if exists(${.OBJDIR}/../libncurses)
CFLAGS+= -I${.OBJDIR}/../libncurses
.endif
CFLAGS+=-I${.CURDIR}/../libncurses -I${NCURSES}/menu -I${NCURSES}/include \
-Wall -DNDEBUG -DHAVE_CONFIG_H
ncurses_def.h: MKncurses_def.sh ncurses_defs
AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
${NCURSES}/include/ncurses_defs > ncurses_def.h
MANx= menu.3x menu_attributes.3x menu_cursor.3x \
menu_driver.3x menu_format.3x menu_hook.3x menu_items.3x \
menu_mark.3x menu_new.3x menu_opts.3x menu_pattern.3x \
menu_post.3x menu_requestname.3x menu_spacing.3x \
menu_userptr.3x menu_win.3x mitem_current.3x mitem_name.3x \
mitem_new.3x mitem_opts.3x mitem_userptr.3x mitem_value.3x \
mitem_visible.3x
.PATH: ${NCURSES_DIR}/man
MANx= \
menu.3x \
menu_attributes.3x \
menu_cursor.3x \
menu_driver.3x \
menu_format.3x \
menu_hook.3x \
menu_items.3x \
menu_mark.3x \
menu_new.3x \
menu_opts.3x \
menu_pattern.3x \
menu_post.3x \
menu_requestname.3x \
menu_spacing.3x \
menu_userptr.3x \
menu_win.3x \
mitem_current.3x \
mitem_name.3x \
mitem_new.3x \
mitem_opts.3x \
mitem_userptr.3x \
mitem_value.3x \
mitem_visible.3x
# Generate the MAN list from MANx
.for page in ${MANx}
CLEANFILES+=${page:T:S/x$//g}
MAN+=${page:T:S/x$//g}
CLEANFILES+= ${page:T:S/x$//g}
MAN+= ${page:T:S/x$//g}
${page:T:S/x$//g}: ${page}
cat ${.ALLSRC} > ${.TARGET}
.endfor
MLINKS+=menu_attributes.3 menu_back.3 menu_attributes.3 menu_fore.3 \
menu_attributes.3 menu_grey.3 menu_attributes.3 menu_pad.3 \
menu_attributes.3 set_menu_back.3 menu_attributes.3 set_menu_fore.3 \
menu_attributes.3 set_menu_grey.3 menu_attributes.3 set_menu_pad.3
MLINKS+=menu_cursor.3 pos_menu_cursor.3
MLINKS+=menu_format.3 set_menu_format.3
MLINKS+=menu_hook.3 item_init.3 menu_hook.3 item_term.3 \
menu_hook.3 menu_init.3 menu_hook.3 menu_term.3 \
menu_hook.3 set_item_init.3 menu_hook.3 set_item_term.3 \
menu_hook.3 set_menu_init.3 menu_hook.3 set_menu_term.3
MLINKS+=menu_items.3 item_count.3 menu_items.3 set_menu_items.3
MLINKS+=menu_mark.3 set_menu_mark.3
MLINKS+=menu_new.3 free_menu.3 menu_new.3 new_menu.3
MLINKS+=menu_opts.3 menu_opts_off.3 menu_opts.3 menu_opts_on.3
MLINKS+=menu_pattern.3 set_menu_pattern.3
MLINKS+=menu_post.3 post_menu.3 menu_post.3 unpost_menu.3
MLINKS+=menu_requestname.3 menu_request_by_name.3 \
menu_requestname.3 menu_request_name.3
MLINKS+=menu_spacing.3 set_menu_spacing.3
MLINKS+=menu_userptr.3 set_menu_userptr.3
MLINKS+=menu_win.3 menu_sub.3 menu_win.3 scale_menu.3 \
menu_win.3 set_menu_sub.3 menu_win.3 set_menu_win.3
MLINKS+=mitem_current.3 current_item.3 mitem_current.3 item_index.3 \
mitem_current.3 set_top_row.3 mitem_current.3 top_row.3 \
mitem_current.3 set_current_item.3
MLINKS+=mitem_name.3 item_description.3 mitem_name.3 item_name.3
MLINKS+=mitem_new.3 free_item.3 mitem_new.3 new_item.3
MLINKS+=mitem_opts.3 item_opts.3 mitem_opts.3 item_opts_off.3 \
mitem_opts.3 item_opts_on.3 mitem_opts.3 set_item_opts.3 \
mitem_opts.3 set_menu_opts.3
MLINKS+=mitem_userptr.3 item_userptr.3 mitem_userptr.3 set_item_userptr.3
MLINKS+=mitem_value.3 item_value.3 mitem_value.3 set_item_value.3
MLINKS+=mitem_visible.3 item_visible.3
MLINKS= menu_attributes.3 menu_back.3 \
menu_attributes.3 menu_fore.3 \
menu_attributes.3 menu_grey.3 \
menu_attributes.3 menu_pad.3 \
menu_attributes.3 set_menu_back.3 \
menu_attributes.3 set_menu_fore.3 \
menu_attributes.3 set_menu_grey.3 \
menu_attributes.3 set_menu_pad.3 \
menu_cursor.3 pos_menu_cursor.3 \
menu_format.3 set_menu_format.3 \
menu_hook.3 item_init.3 \
menu_hook.3 item_term.3 \
menu_hook.3 menu_init.3 \
menu_hook.3 menu_term.3 \
menu_hook.3 set_item_init.3 \
menu_hook.3 set_item_term.3 \
menu_hook.3 set_menu_init.3 \
menu_hook.3 set_menu_term.3 \
menu_items.3 item_count.3 \
menu_items.3 set_menu_items.3 \
menu_mark.3 set_menu_mark.3 \
menu_new.3 free_menu.3 \
menu_new.3 new_menu.3 \
menu_opts.3 menu_opts_off.3 \
menu_opts.3 menu_opts_on.3 \
menu_opts.3 set_menu_opts.3 \
menu_pattern.3 set_menu_pattern.3 \
menu_post.3 post_menu.3 \
menu_post.3 unpost_menu.3 \
menu_requestname.3 menu_request_by_name.3 \
menu_requestname.3 menu_request_name.3 \
menu_spacing.3 set_menu_spacing.3 \
menu_userptr.3 set_menu_userptr.3 \
menu_win.3 menu_sub.3 \
menu_win.3 scale_menu.3 \
menu_win.3 set_menu_sub.3 \
menu_win.3 set_menu_win.3 \
mitem_current.3 current_item.3 \
mitem_current.3 item_index.3 \
mitem_current.3 set_current_item.3 \
mitem_current.3 set_top_row.3 \
mitem_current.3 top_row.3 \
mitem_name.3 item_description.3 \
mitem_name.3 item_name.3 \
mitem_new.3 free_item.3 \
mitem_new.3 new_item.3 \
mitem_opts.3 item_opts.3 \
mitem_opts.3 item_opts_off.3 \
mitem_opts.3 item_opts_on.3 \
mitem_opts.3 set_item_opts.3 \
mitem_userptr.3 item_userptr.3 \
mitem_userptr.3 set_item_userptr.3 \
mitem_value.3 item_value.3 \
mitem_value.3 set_item_value.3 \
mitem_visible.3 item_visible.3
.include <bsd.lib.mk>

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* include/ncurses_cfg.h. Generated automatically by configure. */
/****************************************************************************
* Copyright (c) 1998 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 *
@ -31,7 +31,7 @@
* Author: Thomas E. Dickey <dickey@clark.net> 1997 *
****************************************************************************/
/*
* $Id: ncurses_cfg.hin,v 1.3 2000/09/02 17:13:32 tom Exp $
* $Id: ncurses_cfg.hin,v 1.7 2005/01/02 01:26:58 tom Exp $
*
* This is a template-file used to generate the "ncurses_cfg.h" file.
*
@ -40,8 +40,8 @@
* 971222) to autoconf 2.12 or 2.13 to do this.
*
* See:
* http://dickey.his.com/autoconf/
* ftp://dickey.his.com/autoconf/
* http://invisible-island.net/autoconf/
* ftp://invisible-island.net/autoconf/
*/
/* $FreeBSD$ */
@ -49,13 +49,19 @@
#ifndef NC_CONFIG_H
#define NC_CONFIG_H
#ifdef __cplusplus
#include <stdlib.h>
#endif
#define BSD_TPUTS 1
#define CC_HAS_INLINE_FUNCS 1
#define CC_HAS_PROTOS 1
#define GCC_NORETURN __dead2
#define CPP_HAS_STATIC_CAST 1
#define CPP_HAS_VSCAN_FUNC 1
#define ETIP_NEEDS_MATH_H 1
#define GCC_NORETURN __attribute__((noreturn))
#define GCC_PRINTF 1
#define GCC_SCANF 1
#define GCC_UNUSED __unused
#define GCC_UNUSED __attribute__((unused))
#define HAVE_BIG_CORE 1
#define HAVE_BSD_CGETENT 1
#define HAVE_CURSES_VERSION 1
@ -63,14 +69,18 @@
#define HAVE_ERRNO 1
#define HAVE_FCNTL_H 1
#define HAVE_FORM_H 1
#define HAVE_FSEEKO 1
#define HAVE_GETCWD 1
#define HAVE_GETEGID 1
#define HAVE_GETEUID 1
#define HAVE_GETOPT_H 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GETTTYNAM 1
#define HAVE_HAS_KEY 1
#define HAVE_INTTYPES_H 1
#define HAVE_ISASCII 1
#define HAVE_ISSETUGID 1
#define HAVE_LANGINFO_CODESET 1
#define HAVE_LIBFORM 1
#define HAVE_LIBMENU 1
#define HAVE_LIBPANEL 1
@ -78,7 +88,7 @@
#define HAVE_LINK 1
#define HAVE_LOCALE_H 1
#define HAVE_LONG_FILE_NAMES 1
#define HAVE_MEMCCPY 1
#define HAVE_MEMORY_H 1
#define HAVE_MENU_H 1
#define HAVE_MKSTEMP 1
#define HAVE_NANOSLEEP 1
@ -90,6 +100,7 @@
#define HAVE_REMOVE 1
#define HAVE_REMOVE 1
#define HAVE_RESIZETERM 1
#define HAVE_RESIZE_TERM 1
#define HAVE_SELECT 1
#define HAVE_SETBUF 1
#define HAVE_SETBUFFER 1
@ -97,47 +108,62 @@
#define HAVE_SIGACTION 1
#define HAVE_SIGVEC 1
#define HAVE_SIZECHANGE 1
#define HAVE_SLK_COLOR 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRDUP 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_STRSTR 1
#define HAVE_SYMLINK 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_POLL_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIME_SELECT 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TCGETATTR 1
#define HAVE_TCGETPGRP 1
#define HAVE_TERMIOS_H 1
#define HAVE_TIMES 1
#define HAVE_TTYENT_H 1
#define HAVE_TYPEINFO 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UNLINK 1
#define HAVE_USE_DEFAULT_COLORS 1
#define HAVE_VSNPRINTF 1
#define HAVE_VSSCANF 1
#define HAVE_WCTYPE_H 1
#define HAVE_WORKING_POLL 1
#define HAVE_WRESIZE 1
#define MIXEDCASE_FILENAMES 1
#define MIXEDCASE_FILENAMES 1
#define NCURSES_EXT_FUNCS 1
#define NCURSES_NO_PADDING 1
#define NCURSES_PATHSEP ':'
#define NCURSES_VERSION_STRING "5.6.20061217"
#define NDEBUG 1
#define RETSIGTYPE void
#define SIZEOF_SIGNED_CHAR 1
#define STDC_HEADERS 1
#define SYSTEM_NAME "FreeBSD"
#define TERMINFO "/usr/share/misc/terminfo"
#define TERMINFO_DIRS "/usr/share/misc/terminfo"
#define TERMPATH "/etc/termcap:/usr/share/misc/termcap"
#define TIME_WITH_SYS_TIME 1
#define TYPEOF_CHTYPE long
#define TYPEOF_CHTYPE int
#define USE_ASSUMED_COLOR 1
#define USE_COLORFGBG 1
#define USE_DATABASE 1
#define USE_GETCAP 1
#define USE_HASHMAP 1
#define USE_LINKS 1
#define USE_SIGWINCH 1
#define USE_STDIO_VSCAN 1
#define USE_SYSMOUSE 1
#define USE_TERMCAP 1
#include <ncurses_def.h>
@ -150,6 +176,16 @@
#undef inline
#define inline /* nothing */
#endif
#endif
/* On HP-UX, the C compiler doesn't grok mbstate_t without
-D_XOPEN_SOURCE=500. However, this causes problems on
IRIX. So, we #define mbstate_t to int in configure.in
only for the C compiler if needed. */
#ifndef __cplusplus
#ifdef NEED_MBSTATE_T_DEF
#define mbstate_t int
#endif
#endif
#endif /* NC_CONFIG_H */

View File

@ -197,7 +197,7 @@ _nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
for (;;) {
while ((tok = strsep(&ps, ":")) != NULL &&
*(tok - 2) != '\\' &&
(*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
(*tok == '\0' || *tok == '\\' || !isgraph(UChar(*tok))))
;
if (tok == NULL)
break;
@ -229,35 +229,34 @@ _nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
*/
if (i < 0)
return(ERR);
return(TGETENT_ERR);
_nc_set_source("TERMCAP");
_nc_read_entry_source((FILE *)NULL, _nc_termcap, FALSE, TRUE, NULLHOOK);
if (_nc_head == (ENTRY *)NULL)
return(ERR);
return(TGETENT_ERR);
/* resolve all use references */
_nc_resolve_uses(TRUE);
_nc_resolve_uses2(TRUE, FALSE);
for_entry_list(ep)
if (_nc_name_match(ep->tterm.term_names, name, "|:"))
{
/*
* Make a local copy of the terminal capabilities. free
* all entry storage except the string table for the
* loaded type (which we disconnected from the list by
* NULLing out ep->tterm.str_table above).
* Make a local copy of the terminal capabilities, delinked
* from the list.
*/
memcpy(tp, &ep->tterm, sizeof(TERMTYPE));
ep->tterm.str_table = (char *)NULL;
_nc_delink_entry(_nc_head, &(ep->tterm));
free(ep);
_nc_free_entries(_nc_head);
_nc_head = _nc_tail = NULL; /* do not reuse! */
return 1; /* OK */
return TGETENT_YES; /* OK */
}
_nc_free_entries(_nc_head);
_nc_head = _nc_tail = NULL; /* do not reuse! */
return(0); /* not found */
return(TGETENT_NO); /* not found */
}

View File

@ -1,48 +1,66 @@
# Makefile for libpanel
# $FreeBSD$
NCURSES=${.CURDIR}/../../contrib/ncurses
.include "${.CURDIR}/../config.mk"
.PATH: ${NCURSES}/panel ${NCURSES}/include
.PATH: ${NCURSES}/man
SRCDIR= ${NCURSES_DIR}/panel
LIB= panel
DPADD= ${LIBNCURSES}
LDADD= -lncurses
AWK?= awk
LIB= panel
DPADD= ${LIBNCURSES}
LDADD= -lncurses
SRCS= ncurses_def.h \
p_above.c p_below.c p_bottom.c p_delete.c p_hidden.c \
p_hide.c p_move.c p_new.c p_replace.c p_show.c p_top.c \
p_update.c p_user.c p_win.c panel.c
INCS= ${NCURSES}/panel/panel.h
.PATH: ${SRCDIR}
SRCS= \
ncurses_def.h \
p_above.c \
p_below.c \
p_bottom.c \
p_delete.c \
p_hidden.c \
p_hide.c \
p_move.c \
p_new.c \
p_replace.c \
p_show.c \
p_top.c \
p_update.c \
p_user.c \
p_win.c \
panel.c
CFLAGS+= -I${SRCDIR}
INCS= ${SRCDIR}/panel.h
CLEANFILES+= ncurses_def.h
CFLAGS+= -I.
.if exists(${.OBJDIR}/../libncurses)
CFLAGS+= -I${.OBJDIR}/../libncurses
.endif
CFLAGS+= -I${.CURDIR}/../libncurses
CFLAGS+= -I${NCURSES}/panel -I${NCURSES}/include -I${NCURSES}/ncurses \
-Wall -DNDEBUG -DHAVE_CONFIG_H
ncurses_def.h: MKncurses_def.sh ncurses_defs
AWK=${AWK} sh ${NCURSES}/include/MKncurses_def.sh \
${NCURSES}/include/ncurses_defs > ncurses_def.h
# generate MAN
CLEANFILES+= panel.3
MAN= panel.3
panel.3: panel.3x
.PATH: ${NCURSES_DIR}/man
MANx= \
panel.3x
# Generate the MAN list from MANx
.for page in ${MANx}
CLEANFILES+= ${page:T:S/x$//g}
MAN+= ${page:T:S/x$//g}
${page:T:S/x$//g}: ${page}
cat ${.ALLSRC} > ${.TARGET}
.endfor
MLINKS+=panel.3 bottom_panel.3 panel.3 del_panel.3 panel.3 hide_panel.3 \
panel.3 move_panel.3 panel.3 new_panel.3 panel.3 panel_above.3 \
panel.3 panel_below.3 panel.3 panel_hidden.3 \
panel.3 panel_userptr.3 panel.3 panel_window.3 \
panel.3 replace_panel.3 panel.3 set_panel_userptr.3 \
panel.3 show_panel.3 panel.3 top_panel.3 panel.3 update_panels.3
MLINKS= panel.3 bottom_panel.3 \
panel.3 del_panel.3 \
panel.3 hide_panel.3 \
panel.3 move_panel.3 \
panel.3 new_panel.3 \
panel.3 panel_above.3 \
panel.3 panel_below.3 \
panel.3 panel_hidden.3 \
panel.3 panel_userptr.3 \
panel.3 panel_window.3 \
panel.3 replace_panel.3 \
panel.3 set_panel_userptr.3 \
panel.3 show_panel.3 \
panel.3 top_panel.3 \
panel.3 update_panels.3
.include <bsd.lib.mk>
.SUFFIXES: .3x .3