aboutsummaryrefslogtreecommitdiff
path: root/lib/ncurses
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-02-18 08:11:52 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-02-18 08:11:52 +0000
commitaae38d10b4eebf81c0942947e8b83a9bb8651d88 (patch)
tree21611a7c6aa52bcd040273b175c3f69b1629407a /lib/ncurses
parent604d0dd551fa7d275cdf69911c9df4595a42f49f (diff)
parentf0179cb6083cc92e5947ae56e6a0a5c5328aead0 (diff)
downloadsrc-aae38d10b4eebf81c0942947e8b83a9bb8651d88.tar.gz
src-aae38d10b4eebf81c0942947e8b83a9bb8651d88.zip
Update ncurses to 20200118
Among the changes from before: - Add support for extended colors on widechar version - Enable ncurses extended functions - Enable version 2 of the extended mouse support - Enable SCREEN extensions Modification that differs from upstream: - _nc_delink_entries used to be exposed and was turn static, turn it back as dynamic to not break abi - Adapt our old termcap.c to modern ncurses MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=358062
Diffstat (limited to 'lib/ncurses')
-rw-r--r--lib/ncurses/ncurses/Makefile79
-rw-r--r--lib/ncurses/ncurses/ncurses_cfg.h69
-rw-r--r--lib/ncurses/ncurses/termcap.c2
3 files changed, 97 insertions, 53 deletions
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile
index 196bbc453df4..2a2150610606 100644
--- a/lib/ncurses/ncurses/Makefile
+++ b/lib/ncurses/ncurses/Makefile
@@ -26,19 +26,25 @@ NCURSES_PATCH!= egrep 'NCURSES_PATCH[ ]*=' ${NCURSES_DIR}/dist.mk | sed -e 's%^
NCURSES_CH_T= cchar_t
NCURSES_OK_WCHAR_T= 1
NEED_WCHAR_H= 1
+NCURSES_EXT_COLORS= 1
.else
NCURSES_CH_T= chtype
NCURSES_OK_WCHAR_T=
NEED_WCHAR_H= 0
-.endif
-NCURSES_CONST= const
NCURSES_EXT_COLORS= 0
+.endif
NCURSES_EXT_FUNCS= 1
+NCURSES_CONST= const
NCURSES_INLINE= inline
NCURSES_LIBUTF8= 0
NCURSES_MBSTATE_T= 0
-NCURSES_MOUSE_VERSION= 1
+NCURSES_MOUSE_VERSION= 2
+NCURSES_INTEROP_FUNCS= 1
NCURSES_OPAQUE= 0
+NCURSES_OPAQUE= 0
+NCURSES_OPAQUE_FORM= 0
+NCURSES_OPAQUE_MENU= 0
+NCURSES_OPAQUE_PANEL= 0
NCURSES_OSPEED= short
NCURSES_SBOOL= char
NCURSES_SIZE_T= short
@@ -46,20 +52,25 @@ NCURSES_TPARM_VARARGS= 1
NCURSES_WCHAR_T= 0
NCURSES_WINT_T= 0
NCURSES_XNAMES= 1
+NCURSES_WCWIDTH_GRAPHICS= 1
+NCURSES_WATTR_MACROS= 1
+NCURSES_TPARM_ARG= intptr_t
+NCURSES_SP_FUNCS= 1
BROKEN_LINKER= 0
BUILTIN_BOOL= 1
-ENABLE_LP64= 0
+ENABLE_LP64= 1
ENABLE_OPAQUE= NCURSES_OPAQUE
ENABLE_REENTRANT= 0
HAVE_TCGETATTR= 1
HAVE_TERMIOS_H= 1
HAVE_TERMIO_H= 0
HAVE_VSSCANF= 1
+HAVE_STDINT_H= 1
HEADER_STDBOOL= 1
# XXX amd64 1L and int
-ONEUL= 1UL
-TYPEOF_CHTYPE= long
-TYPEOF_MMASK_T= long
+ONEUL= 1U
+TYPEOF_CHTYPE= uint32_t
+TYPEOF_MMASK_T= uint32_t
TYPE_OF_BOOL= unsigned char
USE_BIG_STRINGS= 1
USE_CXX_BOOL= defined(__cplusplus)
@@ -163,6 +174,7 @@ SRCS+= \
lib_wattron.c \
lib_winch.c \
lib_window.c \
+ new_pair.c \
nc_panel.c \
resizeterm.c \
safe_sprintf.c \
@@ -184,6 +196,7 @@ SRCS+= \
comp_hash.c \
comp_parse.c \
comp_scan.c \
+ comp_userdefs.c \
db_iterator.c \
doalloc.c \
entries.c \
@@ -279,6 +292,7 @@ CLEANFILES= ${GENSRCS} ${GENHDRS} keys.list make_hash term.h.new \
make_keys MKterm.h.awk comp_captab.c curses.head
CFLAGS+= -DFREEBSD_NATIVE -DTERMIOS
+CFLAGS.lib_freeall.c+= -Wno-missing-prototypes
# Installed
HEADERS= curses.h term.h termcap.h unctrl.h
@@ -332,7 +346,7 @@ codes.c: MKcodes.awk
${AWK} -f ${NCURSES_DIR}/ncurses/tinfo/MKcodes.awk bigstrings=${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps > codes.c
lib_gen.c: MKlib_gen.sh curses.h
- LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CC:N${CCACHE_BIN}} -E ${CFLAGS}" \
+ LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CPPFLAGS}" \
"${AWK}" generated < curses.h >$@
lib_keyname.c: keys.list MKkeyname.awk
@@ -341,18 +355,22 @@ lib_keyname.c: keys.list MKkeyname.awk
unctrl.c: MKunctrl.awk
echo | ${AWK} -f ${NCURSES_DIR}/ncurses/base/MKunctrl.awk bigstrings=${USE_BIG_STRINGS} > unctrl.c
-comp_captab.c: MKcaptab.sh MKcaptab.awk Caps make_hash
+comp_captab.c: MKcaptab.sh MKcaptab.awk Caps Caps-ncurses make_hash
env PATH=${BTOOLSPATH:U.}:${PATH} sh ${NCURSES_DIR}/ncurses/tinfo/MKcaptab.sh "${AWK}" \
${USE_BIG_STRINGS} ${NCURSES_DIR}/ncurses/tinfo/MKcaptab.awk \
- ${NCURSES_DIR}/include/Caps > comp_captab.c
+ ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses > comp_captab.c
expanded.c: MKexpanded.sh
sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c
fallback.c: MKfallback.sh
- sh -e ${NCURSES_DIR}/ncurses/tinfo/MKfallback.sh "" "" "" > ${.TARGET}.tmp && \
+ sh ${NCURSES_DIR}/ncurses/tinfo/MKfallback.sh "" "" "" > ${.TARGET}.tmp && \
mv -f ${.TARGET}.tmp ${.TARGET}
+comp_userdefs.c: MKuserdefs.sh Caps Caps-ncurses make_hash
+ env PATH=${BTOOLSPATH:U.}:${PATH} sh -x ${NCURSES_DIR}/ncurses/tinfo/MKuserdefs.sh "${AWK}" \
+ ${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses > ${.TARGET}
+
# Generated headers
nomacros.h: MKlib_gen.sh curses.h
LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CC:N${CCACHE_BIN}} -E ${CFLAGS}" \
@@ -361,22 +379,22 @@ nomacros.h: MKlib_gen.sh curses.h
init_keytry.h: keys.list make_keys
${BTOOLSPATH:U.}/make_keys keys.list > init_keytry.h
-hashsize.h: MKhashsize.sh Caps
- sh ${NCURSES_DIR}/include/MKhashsize.sh ${NCURSES_DIR}/include/Caps > $@
+hashsize.h: MKhashsize.sh Caps Caps-ncurses
+ sh ${NCURSES_DIR}/include/MKhashsize.sh ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses > $@
-parametrized.h: MKparametrized.sh Caps
+parametrized.h: MKparametrized.sh Caps Caps-ncurses
AWK=${AWK} sh ${NCURSES_DIR}/include/MKparametrized.sh \
- ${NCURSES_DIR}/include/Caps > $@
+ ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses > $@
-term.h: MKterm.h.awk edit_cfg.sh Caps
- ${AWK} -f MKterm.h.awk ${NCURSES_DIR}/include/Caps > $@.new
+term.h: MKterm.h.awk edit_cfg.sh Caps Caps-ncurses
+ ${AWK} -f MKterm.h.awk ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses > $@.new
sh ${NCURSES_DIR}/include/edit_cfg.sh ${NCURSES_CFG_H} $@.new
mv -f $@.new $@
-curses.h: curses.head MKkey_defs.sh Caps
+curses.h: curses.head MKkey_defs.sh Caps Caps-ncurses
cat curses.head > $@.new
AWK=${AWK} _POSIX2_VERSION=199209 sh ${NCURSES_DIR}/include/MKkey_defs.sh \
- ${NCURSES_DIR}/include/Caps >> $@.new
+ ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses >> $@.new
.if defined(ENABLE_WIDEC)
cat ${NCURSES_DIR}/include/curses.wide >> $@.new
.endif
@@ -384,9 +402,9 @@ curses.h: curses.head MKkey_defs.sh Caps
mv -f $@.new $@
# Generated intermediate files
-keys.list: MKkeys_list.sh Caps
+keys.list: MKkeys_list.sh Caps Caps-ncurses
AWK=${AWK} sh ${NCURSES_DIR}/ncurses/tinfo/MKkeys_list.sh \
- ${NCURSES_DIR}/include/Caps | LC_ALL=C sort > keys.list
+ ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses | LC_ALL=C sort > keys.list
# Build tools
DEPENDOBJS+= make_hash make_keys
@@ -411,6 +429,7 @@ MKterm.h.awk: MKterm.h.awk.in
-e "/@NCURSES_TPARM_VARARGS@/s%%${NCURSES_TPARM_VARARGS}%" \
-e "/@NCURSES_SBOOL@/s%%${NCURSES_SBOOL}%" \
-e "/@NCURSES_XNAMES@/s%%${NCURSES_XNAMES}%" \
+ -e "/@NCURSES_EXT_COLORS@/s%%${NCURSES_EXT_COLORS}%" \
-e "/@HAVE_TERMIOS_H@/s%%${HAVE_TERMIOS_H}%" \
-e "/@HAVE_TERMIO_H@/s%%${HAVE_TERMIO_H}%" \
-e "/@HAVE_TCGETATTR@/s%%${HAVE_TCGETATTR}%" \
@@ -431,6 +450,7 @@ curses.head: curses.h.in
sed <${NCURSES_DIR}/include/curses.h.in >$@ \
-e "/@BROKEN_LINKER@/s%%${BROKEN_LINKER}%" \
-e "/@HAVE_VSSCANF@/s%%${HAVE_VSSCANF}%" \
+ -e "/@HAVE_STDINT_H@/s%%${HAVE_STDINT_H}%" \
-e "/@NCURSES_CH_T@/s%%${NCURSES_CH_T}%" \
-e "/@NCURSES_CONST@/s%%${NCURSES_CONST}%" \
-e "/@NCURSES_EXT_COLORS@/s%%${NCURSES_EXT_COLORS}%" \
@@ -443,18 +463,24 @@ curses.head: curses.h.in
-e "/@NCURSES_MOUSE_VERSION@/s%%${NCURSES_MOUSE_VERSION}%" \
-e "/@NCURSES_OK_WCHAR_T@/s%%${NCURSES_OK_WCHAR_T}%" \
-e "/@NCURSES_OPAQUE@/s%%${NCURSES_OPAQUE}%" \
+ -e "/@NCURSES_OPAQUE_FORM@/s%%${NCURSES_OPAQUE_FORM}%" \
+ -e "/@NCURSES_OPAQUE_MENU@/s%%${NCURSES_OPAQUE_MENU}%" \
+ -e "/@NCURSES_OPAQUE_PANEL@/s%%${NCURSES_OPAQUE_PANEL}%" \
-e "/@NCURSES_PATCH@/s%%${NCURSES_PATCH}%" \
-e "/@NCURSES_SIZE_T@/s%%${NCURSES_SIZE_T}%" \
-e "/@NCURSES_TPARM_VARARGS@/s%%${NCURSES_TPARM_VARARGS}%" \
+ -e "/@NCURSES_WATTR_MACROS@/s%%${NCURSES_WATTR_MACROS}%"\
-e "/@NCURSES_WCHAR_T@/s%%${NCURSES_WCHAR_T}%" \
-e "/@NCURSES_WCHAR_T@/s%%${NCURSES_WCHAR_T}%" \
+ -e "/@NCURSES_WCWIDTH_GRAPHICS@/s%%${NCURSES_WCWIDTH_GRAPHICS}%g" \
-e "/@NCURSES_WINT_T@/s%%${NCURSES_WINT_T}%" \
+ -e "/@NCURSES_INTEROP_FUNCS@/s%%${NCURSES_INTEROP_FUNCS}%g" \
+ -e "/@NCURSES_TPARM_ARG@/s%%${NCURSES_TPARM_ARG}%g" \
+ -e "/@NCURSES_SP_FUNCS@/s%%${NCURSES_SP_FUNCS}%g" \
-e "/@NEED_WCHAR_H@/s%%${NEED_WCHAR_H}%" \
-e "/@USE_CXX_BOOL@/s%%${USE_CXX_BOOL}%" \
- -e "s%@NCURSES_SP_FUNCS@%0%g" \
- -e "s%@NCURSES_INTEROP_FUNCS@%0%g" \
+ -e "/@GENERATED_EXT_FUNCS@/s%%generated%g" \
-e "s%@NCURSES_CCHARW_MAX@%5%g" \
- -e "s%@NCURSES_TPARM_ARG@%long%g" \
-e "s%@cf_cv_1UL@%${ONEUL}%g" \
-e "s%@cf_cv_builtin_bool@%${BUILTIN_BOOL}%g" \
-e "s%@cf_cv_enable_lp64@%${ENABLE_LP64}%g" \
@@ -469,7 +495,7 @@ curses.head: curses.h.in
unctrl.h: unctrl.h.in
sed <${NCURSES_DIR}/include/$@.in >$@ \
- -e "s%@NCURSES_SP_FUNCS@%0%g" \
+ -e "s%@NCURSES_SP_FUNCS@%${NCURSES_SP_FUNCS}%g" \
-e "/@NCURSES_MAJOR@/s%%${NCURSES_MAJOR}%" \
-e "/@NCURSES_MINOR@/s%%${NCURSES_MINOR}%"
@@ -540,6 +566,7 @@ MAN= \
keyok.3 \
legacy_coding.3 \
ncurses.3 \
+ new_pair.3 \
resizeterm.3 \
term_variables.3 \
wresize.3
@@ -557,7 +584,7 @@ MAN+= \
curs_printw.3 \
curs_scanw.3
-MAN+= term.5 terminfo.5
+MAN+= term.5 terminfo.5 scr_dump.5 user_caps.5
MAN+= term.7
.endif
diff --git a/lib/ncurses/ncurses/ncurses_cfg.h b/lib/ncurses/ncurses/ncurses_cfg.h
index 9ca3a9725ff6..4f0971f5ce84 100644
--- a/lib/ncurses/ncurses/ncurses_cfg.h
+++ b/lib/ncurses/ncurses/ncurses_cfg.h
@@ -1,6 +1,6 @@
/* include/ncurses_cfg.h. Generated automatically by configure. */
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2017 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 *
@@ -28,10 +28,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ * Author: Thomas E. Dickey 1997-on *
****************************************************************************/
/*
- * $Id: ncurses_cfg.hin,v 1.7 2005/01/02 01:26:58 tom Exp $
+ * $Id: ncurses_cfg.hin,v 1.11 2017/12/09 20:41:54 tom Exp $
+ *
+ * Both ncurses_cfg.h and ncurses_def.h are internal header-files used when
+ * building ncurses.
*
* This is a template-file used to generate the "ncurses_cfg.h" file.
*
@@ -41,7 +44,7 @@
*
* See:
* http://invisible-island.net/autoconf/
- * ftp://invisible-island.net/autoconf/
+ * ftp://ftp.invisible-island.net/autoconf/
*/
/* $FreeBSD$ */
@@ -59,6 +62,7 @@
#define HAVE_BIG_CORE 1
#define TERMPATH "/etc/termcap:/usr/share/misc/termcap"
#define USE_GETCAP 1
+#define HAVE_UNISTD_H 1
#define HAVE_REMOVE 1
#define HAVE_UNLINK 1
#define HAVE_LINK 1
@@ -67,18 +71,6 @@
#define BSD_TPUTS 1
#define HAVE_LANGINFO_CODESET 1
#define HAVE_FSEEKO 1
-#define HAVE_ASSUME_DEFAULT_COLORS 1
-#define HAVE_CURSES_VERSION 1
-#define HAVE_HAS_KEY 1
-#define HAVE_RESIZETERM 1
-#define HAVE_RESIZE_TERM 1
-#define HAVE_TERM_ENTRY_H 1
-#define HAVE_USE_DEFAULT_COLORS 1
-#define HAVE_USE_SCREEN 1
-#define HAVE_USE_WINDOW 1
-#define HAVE_WRESIZE 1
-#define NCURSES_EXT_FUNCS 1
-#define NCURSES_NO_PADDING 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
@@ -90,11 +82,27 @@
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define SIZEOF_SIGNED_CHAR 1
+#define NCURSES_EXT_FUNCS 1
+#define HAVE_ASSUME_DEFAULT_COLORS 1
+#define HAVE_CURSES_VERSION 1
+#define HAVE_HAS_KEY 1
+#define HAVE_RESIZETERM 1
+#define HAVE_RESIZE_TERM 1
+#define HAVE_TERM_ENTRY_H 1
+#define HAVE_USE_DEFAULT_COLORS 1
+#define HAVE_USE_EXTENDED_NAMES 1
+#define HAVE_USE_SCREEN 1
+#define HAVE_USE_WINDOW 1
+#define HAVE_WRESIZE 1
+#define NCURSES_SP_FUNCS 1
+#define HAVE_TPUTS_SP 1
+#define NCURSES_EXT_PUTWIN 1
+#define NCURSES_NO_PADDING 1
#define USE_SIGWINCH 1
+#define NCURSES_WRAP_PREFIX "_nc_"
#define USE_ASSUMED_COLOR 1
#define USE_HASHMAP 1
#define USE_COLORFGBG 1
-#define NCURSES_WRAP_PREFIX "_nc_"
#define GCC_SCANF 1
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
#define GCC_PRINTF 1
@@ -127,13 +135,14 @@
#define HAVE_GETOPT_HEADER 1
#define HAVE_SYS_TIME_SELECT 1
#define SIG_ATOMIC_T volatile sig_atomic_t
-#define TYPEOF_CHTYPE int
#define HAVE_ERRNO 1
#define HAVE_GETCWD 1
#define HAVE_GETEGID 1
#define HAVE_GETEUID 1
+#define HAVE_GETOPT 1
#define HAVE_GETTTYNAM 1
#define HAVE_ISSETUGID 1
+#define HAVE_LOCALECONV 1
#define HAVE_POLL 1
#define HAVE_PUTENV 1
#define HAVE_REMOVE 1
@@ -146,29 +155,33 @@
#define HAVE_SIGVEC 1
#define HAVE_STRDUP 1
#define HAVE_STRSTR 1
+#define HAVE_SYSCONF 1
#define HAVE_TCGETPGRP 1
#define HAVE_TIMES 1
+#define HAVE_TSEARCH 1
#define HAVE_VSNPRINTF 1
#define HAVE_BSD_CGETENT 1
-#define CGETENT_CONST const
#define HAVE_ISASCII 1
#define HAVE_NANOSLEEP 1
#define HAVE_TERMIOS_H 1
#define HAVE_UNISTD_H 1
+#define HAVE_SYS_IOCTL_H 1
#define HAVE_TCGETATTR 1
#define HAVE_VSSCANF 1
+#define HAVE_UNISTD_H 1
#define HAVE_MKSTEMP 1
#define HAVE_SIZECHANGE 1
#define HAVE_WORKING_POLL 1
#define HAVE_VA_COPY 1
-#define HAVE___VA_COPY 1
#define HAVE_UNISTD_H 1
#define HAVE_FORK 1
#define HAVE_VFORK 1
#define HAVE_WORKING_VFORK 1
#define HAVE_WORKING_FORK 1
+#define USE_FOPEN_BIN_R 1
#define USE_OPENPTY_HEADER <libutil.h>
#define USE_XTERM_PTY 1
+#define USE_HASHED_DB 1
#define HAVE_TYPEINFO 1
#define HAVE_IOSTREAM 1
#define IOSTREAM_NAMESPACE 1
@@ -181,8 +194,9 @@
#define HAVE_FORM_H 1
#define HAVE_LIBFORM 1
#define NCURSES_PATHSEP ':'
-#define NCURSES_VERSION_STRING "5.9.20140222"
+#define NCURSES_VERSION_STRING "6.1.20200118"
#define NCURSES_OSPEED_COMPAT 1
+#define HAVE_CURSES_DATA_BOOLNAMES 1
/*
* Begin FreeBSD-specific changes
@@ -191,6 +205,11 @@
#ifdef ENABLE_WIDEC
#define USE_WIDEC_SUPPORT 1
#define NCURSES_WIDECHAR 1
+#define NCURSES_EXT_FUNCS 1
+#define NCURSES_EXT_COLORS 1
+#define HAVE_ALLOC_PAIR 1
+#define HAVE_INIT_EXTENDED_COLOR 1
+#define HAVE_RESET_COLOR_PAIRS 1
#define HAVE_PUTWC 1
#define HAVE_BTOWC 1
#define HAVE_WCTOB 1
@@ -216,11 +235,6 @@
#ifdef __cplusplus
#undef const
#undef inline
-#else
-#if defined(lint) || defined(TRACE)
-#undef inline
-#define inline /* nothing */
-#endif
#endif
/* On HP-UX, the C compiler doesn't grok mbstate_t without
@@ -233,4 +247,7 @@
#endif
#endif
+/*
+ * vile:cmode
+ */
#endif /* NC_CONFIG_H */
diff --git a/lib/ncurses/ncurses/termcap.c b/lib/ncurses/ncurses/termcap.c
index f1df49ada13c..535301a1b474 100644
--- a/lib/ncurses/ncurses/termcap.c
+++ b/lib/ncurses/ncurses/termcap.c
@@ -100,7 +100,7 @@ char _nc_termcap[TBUFSIZ + 1]; /* Last getcap, provided to tgetent() emul */
* file.
*/
int
-_nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
+_nc_read_termcap_entry(const char *const name, TERMTYPE2 *const tp)
{
ENTRY *ep;
char *p;