From 3fa724a3c242eb6225a51a7e347747a25e3aa808 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Sat, 23 Oct 2004 16:58:53 +0000 Subject: [PATCH] Import GNU readline 5.0. Submitted-by: "Simon 'corecode' Schubert" --- gnu/lib/libreadline/Makefile | 4 +- gnu/lib/libreadline/Makefile.inc | 13 +-- gnu/lib/libreadline/config.h | 102 ++++++++++++++++++---- gnu/lib/libreadline/history/Makefile | 8 +- gnu/lib/libreadline/history/doc/Makefile | 16 ++-- gnu/lib/libreadline/readline/Makefile | 27 +++--- gnu/lib/libreadline/readline/doc/Makefile | 24 ++--- 7 files changed, 130 insertions(+), 64 deletions(-) diff --git a/gnu/lib/libreadline/Makefile b/gnu/lib/libreadline/Makefile index e8bef8b514..68aada40e0 100644 --- a/gnu/lib/libreadline/Makefile +++ b/gnu/lib/libreadline/Makefile @@ -1,6 +1,6 @@ # $FreeBSD: src/gnu/lib/libreadline/Makefile,v 1.34 2000/01/29 12:01:51 obrien Exp $ -# $DragonFly: src/gnu/lib/libreadline/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $ +# $DragonFly: src/gnu/lib/libreadline/Attic/Makefile,v 1.3 2004/10/23 16:58:53 joerg Exp $ -SUBDIR = history readline +SUBDIR= history readline .include diff --git a/gnu/lib/libreadline/Makefile.inc b/gnu/lib/libreadline/Makefile.inc index 2c489350fd..d5798d77e8 100644 --- a/gnu/lib/libreadline/Makefile.inc +++ b/gnu/lib/libreadline/Makefile.inc @@ -1,14 +1,15 @@ # $FreeBSD: src/gnu/lib/libreadline/Makefile.inc,v 1.4.2.1 2000/07/06 23:11:07 ache Exp $ -# $DragonFly: src/gnu/lib/libreadline/Attic/Makefile.inc,v 1.2 2003/06/17 04:25:44 dillon Exp $ +# $DragonFly: src/gnu/lib/libreadline/Attic/Makefile.inc,v 1.3 2004/10/23 16:58:53 joerg Exp $ -SHLIB_MAJOR= 4 -SHLIB_MINOR= 1 -RL_LIBRARY_VERSION= 4.1 +SHLIB_MAJOR= 5 +RL_LIBRARY_VERSION= 5.0 -SRCDIR= ${.CURDIR}/../../../../contrib/libreadline +RLDIR= ${.CURDIR}/${RELATIVE}../../../../contrib/readline-5.0 +SRCDIR= ${RLDIR} .PATH: ${SRCDIR} ${.CURDIR}/.. LOCAL_CFLAGS= -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' CFLAGS+= -I${.CURDIR}/.. -I${SRCDIR} -DHAVE_CONFIG_H ${LOCAL_CFLAGS} -HISTSRC= history.c histexpand.c histfile.c histsearch.c shell.c +HISTSRC= history.c histexpand.c histfile.c histsearch.c mbutil.c +HISTSRC+= shell.c xmalloc.c diff --git a/gnu/lib/libreadline/config.h b/gnu/lib/libreadline/config.h index b5896ebb11..c3f06eaf7e 100644 --- a/gnu/lib/libreadline/config.h +++ b/gnu/lib/libreadline/config.h @@ -1,7 +1,10 @@ -/* $FreeBSD: src/gnu/lib/libreadline/config.h,v 1.4.6.1 2000/07/06 23:11:07 ache Exp $ */ -/* $DragonFly: src/gnu/lib/libreadline/Attic/config.h,v 1.2 2003/06/17 04:25:44 dillon Exp $ */ -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* $DragonFly: src/gnu/lib/libreadline/Attic/config.h,v 1.3 2004/10/23 16:58:53 joerg Exp $ */ +/* config.h. Generated by configure. */ +/* config.h.in. Maintained by hand. */ + +/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte + characters, even if the OS supports them. */ +/* #undef NO_MULTIBYTE_SUPPORT */ /* Define if on MINIX. */ /* #undef _MINIX */ @@ -9,14 +12,40 @@ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void +#define VOID_SIGHANDLER 1 + +/* Characteristics of the compiler. */ +/* #undef const */ + +/* #undef size_t */ + +/* #undef ssize_t */ + +#define PROTOTYPES 1 + +/* #undef __CHAR_UNSIGNED__ */ + /* Define if the `S_IS*' macros in do not work properly. */ /* #undef STAT_MACROS_BROKEN */ -#define VOID_SIGHANDLER 1 +/* Define if you have the isascii function. */ +#define HAVE_ISASCII 1 + +/* Define if you have the isxdigit function. */ +#define HAVE_ISXDIGIT 1 /* Define if you have the lstat function. */ #define HAVE_LSTAT 1 +/* Define if you have the mbrlen function. */ +/* #undef HAVE_MBRLEN */ + +/* Define if you have the mbrtowc function. */ +/* #undef HAVE_MBRTOWC */ + +/* Define if you have the mbsrtowcs function. */ +/* #undef HAVE_MBSRTOWCS */ + /* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 @@ -29,32 +58,64 @@ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - /* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 -/* Define if you have the tcgetattr function. */ -#define HAVE_TCGETATTR 1 +/* Define if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 /* Define if you have the strcoll function. */ #define HAVE_STRCOLL 1 /* #undef STRCOLL_BROKEN */ +/* Define if you have the strpbrk function. */ +#define HAVE_STRPBRK 1 + +/* Define if you have the tcgetattr function. */ +#define HAVE_TCGETATTR 1 + +/* Define if you have the vsnprintf function. */ +#define HAVE_VSNPRINTF 1 + +/* Define if you have the wctomb function. */ +#define HAVE_WCTOMB 1 + +/* Define if you have the wcwidth function. */ +/* #undef HAVE_WCWIDTH */ + +#define STDC_HEADERS 1 + /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 +/* Define if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +#define HAVE_MEMORY_H 1 + /* Define if you have the header file. */ /* #undef HAVE_NDIR_H */ +/* Define if you have the header file. */ +#define HAVE_STDARG_H 1 + /* Define if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define if you have the header file. */ #define HAVE_STRING_H 1 +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + /* Define if you have the header file. */ /* #undef HAVE_SYS_DIR_H */ @@ -91,15 +152,21 @@ /* Define if you have the header file. */ #define HAVE_VARARGS_H 1 -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 +/* Define if you have the header file. */ +#define HAVE_WCHAR_H 1 -#define HAVE_LOCALE_H 1 +/* Define if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +#define HAVE_MBSTATE_T 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 /* Definitions pulled in from aclocal.m4. */ #define VOID_SIGHANDLER 1 -#define GWINSZ_IN_SYS_IOCTL 1 +/* #undef GWINSZ_IN_SYS_IOCTL */ #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 @@ -113,9 +180,9 @@ #define HAVE_GETPW_DECLS 1 -#define STRUCT_DIRENT_HAS_D_INO 1 +/* #undef STRUCT_DIRENT_HAS_D_INO */ -#define STRUCT_DIRENT_HAS_D_FILENO 1 +/* #undef STRUCT_DIRENT_HAS_D_FILENO */ /* #undef HAVE_BSD_SIGNALS */ @@ -127,7 +194,8 @@ #define HAVE_POSIX_SIGSETJMP 1 -/* config.h.bot */ +#define CTYPE_NON_ASCII 1 + /* modify settings or make new ones based on what autoconf tells us. */ /* Ultrix botches type-ahead when switching from canonical to diff --git a/gnu/lib/libreadline/history/Makefile b/gnu/lib/libreadline/history/Makefile index 3d519cd2b3..25fc1f106a 100644 --- a/gnu/lib/libreadline/history/Makefile +++ b/gnu/lib/libreadline/history/Makefile @@ -1,10 +1,10 @@ # $FreeBSD: src/gnu/lib/libreadline/history/Makefile,v 1.3 1999/08/27 23:32:54 peter Exp $ -# $DragonFly: src/gnu/lib/libreadline/history/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $ +# $DragonFly: src/gnu/lib/libreadline/history/Attic/Makefile,v 1.3 2004/10/23 16:58:53 joerg Exp $ -SUBDIR= doc +SUBDIR= doc -LIB= history +LIB= history -SRCS= $(HISTSRC) xmalloc.c +SRCS= ${HISTSRC} .include diff --git a/gnu/lib/libreadline/history/doc/Makefile b/gnu/lib/libreadline/history/doc/Makefile index dfd2de7cd3..55886a913b 100644 --- a/gnu/lib/libreadline/history/doc/Makefile +++ b/gnu/lib/libreadline/history/doc/Makefile @@ -1,15 +1,15 @@ # $FreeBSD: src/gnu/lib/libreadline/history/doc/Makefile,v 1.2 1999/08/27 23:32:55 peter Exp $ -# $DragonFly: src/gnu/lib/libreadline/history/doc/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $ +# $DragonFly: src/gnu/lib/libreadline/history/doc/Attic/Makefile,v 1.3 2004/10/23 16:58:53 joerg Exp $ -SRCDIR= ${.CURDIR}/../../../../../contrib/libreadline/doc +RELATIVE= ../ +.include "../../Makefile.inc" +SRCDIR= ${RLDIR}/doc -INFO = history +INFO= history -INFOSECTION= "Programming & development tools." -INFOENTRY_history= "* History: (history). The GNU History library." +INFOSECTION= "Programming & development tools." +INFOENTRY_history= "* History: (history). The GNU History library." -SRCS= hist.texinfo - -history.info: hist.texinfo hstech.texinfo hsuser.texinfo manvers.texinfo +history.info: history.texi hstech.texi hsuser.texi version.texi .include diff --git a/gnu/lib/libreadline/readline/Makefile b/gnu/lib/libreadline/readline/Makefile index 74b8c6833f..30807f31bf 100644 --- a/gnu/lib/libreadline/readline/Makefile +++ b/gnu/lib/libreadline/readline/Makefile @@ -1,28 +1,23 @@ # $FreeBSD: src/gnu/lib/libreadline/readline/Makefile,v 1.5.2.3 2002/07/23 10:20:20 ru Exp $ -# $DragonFly: src/gnu/lib/libreadline/readline/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $ +# $DragonFly: src/gnu/lib/libreadline/readline/Attic/Makefile,v 1.3 2004/10/23 16:58:53 joerg Exp $ -SUBDIR= doc +SUBDIR= doc -LIB= readline -MAN= readline.3 +LIB= readline +MAN= doc/readline.3 -TILDESRC= tilde.c -SRCS= readline.c vi_mode.c funmap.c keymaps.c parens.c search.c \ - rltty.c complete.c bind.c isearch.c display.c signals.c \ - util.c kill.c undo.c macro.c input.c callback.c terminal.c \ - nls.c xmalloc.c \ - $(HISTSRC) $(TILDESRC) +SRCS= readline.c vi_mode.c funmap.c keymaps.c parens.c search.c \ + rltty.c complete.c bind.c isearch.c display.c signals.c \ + util.c kill.c undo.c macro.c input.c callback.c terminal.c \ + text.c nls.c misc.c compat.c tilde.c ${HISTSRC} -INSTALLED_HEADERS= readline.h chardefs.h keymaps.h history.h tilde.h \ - rlstdc.h rlconf.h +HEADERS= readline.h chardefs.h keymaps.h history.h tilde.h \ + rlstdc.h rlconf.h rltypedefs.h DPADD= ${LIBNCURSES} LDADD= -lncurses INCSDIR=${INCLUDEDIR}/readline - -.for hdr in ${INSTALLED_HEADERS} -INCS+= ${SRCDIR}/${hdr} -.endfor +INCS= ${HEADERS:S,^,${SRCDIR}/,} .include diff --git a/gnu/lib/libreadline/readline/doc/Makefile b/gnu/lib/libreadline/readline/doc/Makefile index 485c7347fa..819c2d1100 100644 --- a/gnu/lib/libreadline/readline/doc/Makefile +++ b/gnu/lib/libreadline/readline/doc/Makefile @@ -1,21 +1,23 @@ # $FreeBSD: src/gnu/lib/libreadline/readline/doc/Makefile,v 1.2.2.1 2000/07/06 23:11:11 ache Exp $ -# $DragonFly: src/gnu/lib/libreadline/readline/doc/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $ +# $DragonFly: src/gnu/lib/libreadline/readline/doc/Attic/Makefile,v 1.3 2004/10/23 16:58:53 joerg Exp $ -SRCDIR= ${.CURDIR}/../../../../../contrib/libreadline/doc +RELATIVE= ../ +.include "../../Makefile.inc" +SRCDIR= ${RLDIR}/doc -INFO = readline rluserman +INFO= readline rluserman -INFOSECTION= "Programming & development tools." -INFOENTRY_readline= "* Readline: (readline). The GNU Readline library" -INFOENTRY_rluserman= "* Readline: (readline). The GNU readline library API" +INFOSECTION= "Programming & development tools." +INFOENTRY_readline= "* Readline: (readline). The GNU Readline library" +INFOENTRY_rluserman= "* Readline: (readline). The GNU readline library API" -CLEANFILES += readline.texinfo +CLEANFILES += readline.texi -readline.info: rlman.texinfo rltech.texinfo rluser.texinfo manvers.texinfo +readline.info: rlman.texi rltech.texi rluser.texi version.texi rluserman.texi -readline.texinfo: rlman.texinfo - cp ${SRCDIR}/rlman.texinfo ${.TARGET} +readline.texi: rlman.texi + cp ${SRCDIR}/rlman.texi ${.TARGET} -rluserman.info: rluser.texinfo manvers.texinfo +rluserman.info: rluser.texi version.texi .include -- 2.41.0