This commit was generated by cvs2svn to compensate for changes in r47558,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
99b8a16d4c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47559
@ -75,3 +75,142 @@ examples/Makefile.in
|
||||
---
|
||||
configure.in
|
||||
- bumped LIBVERSION up to 2.2
|
||||
|
||||
4/18
|
||||
----
|
||||
[readline-2.2 released]
|
||||
|
||||
4/20
|
||||
----
|
||||
Makefile.in
|
||||
- make `libhistory.a' a dependency of `install'
|
||||
- fixed a typo in the recipe for `install' that copied libreadline.a
|
||||
to libhistory.old right after installing it
|
||||
|
||||
4/27
|
||||
----
|
||||
doc/Makefile.in
|
||||
- install {readline,history}.info out of the source directory if
|
||||
they are not found in the current (build) directory -- only an
|
||||
issue if the libraries are built in a different directory than
|
||||
the source directory
|
||||
|
||||
5/1
|
||||
---
|
||||
support/shobj-conf
|
||||
- script from the bash distribution to do shared object and library
|
||||
configuration
|
||||
|
||||
shlib/Makefile.in
|
||||
- new directory and makefile to handle building shared versions of
|
||||
libreadline and libhistory, controlled by support/shobj-conf
|
||||
|
||||
5/7
|
||||
---
|
||||
doc/Makefile.in
|
||||
- set SHELL to /bin/sh, rather than relying on make to be correct
|
||||
|
||||
5/14
|
||||
----
|
||||
savestring.c
|
||||
- new file, moved from shell.c, for backwards compatibility
|
||||
|
||||
Makefile.in, shlib/Makefile.in
|
||||
- make sure savestring.c is compiled and added to libreadline and
|
||||
libhistory
|
||||
|
||||
[THERE ARE NO MORE #ifdef SHELL LINES IN THE C SOURCE FILES.]
|
||||
|
||||
5/15
|
||||
----
|
||||
README
|
||||
- updated description of shared library creation for the new scheme
|
||||
|
||||
[THERE ARE NO MORE #ifdef SHELL LINES IN ANY OF THE SOURCE FILES.]
|
||||
|
||||
Makefile.in
|
||||
- bumped SHLIB_MAJOR up to 4 since we've augmented the library
|
||||
API
|
||||
- rlconf.h is now one of the installed headers, so applications can
|
||||
find out whether things like vi-mode are available in the installed
|
||||
libreadline
|
||||
|
||||
5/20
|
||||
----
|
||||
configure.in
|
||||
- changed RL_LIBRARY_VERSION to 4.0 to match the version of the
|
||||
installed shared libraries
|
||||
|
||||
6/5
|
||||
---
|
||||
rlstdc.h
|
||||
- new file
|
||||
|
||||
Makefile.in
|
||||
- rlstdc.h is now one of the installed headers
|
||||
|
||||
8/3
|
||||
---
|
||||
shlib/Makefile.in
|
||||
- made the suffix rule that creates xx.so from xx.c write the
|
||||
compiler output to `a.o', which is then mv'd to xx.so, because
|
||||
some compilers (Sun WSpro 4.2, for example) don't allow any
|
||||
suffixes other than `.o' for `cc -c' (not even `a.out')
|
||||
|
||||
9/15
|
||||
----
|
||||
|
||||
Makefile.in
|
||||
- AR and ARFLAGS are now substituted by configure, used in recipes
|
||||
that build the libraries
|
||||
|
||||
configure.in
|
||||
- use AC_CHECK_PROG to check for ar
|
||||
- set ARFLAGS if it has not already been set in the environment
|
||||
|
||||
10/5
|
||||
----
|
||||
Makefile.in
|
||||
- removed savestring.o from object file list
|
||||
|
||||
10/28
|
||||
-----
|
||||
shlib/Makefile.in
|
||||
- don't use a fixed filename in the .c.so suffix rule to avoid
|
||||
problems with parallel makes
|
||||
|
||||
12/21
|
||||
-----
|
||||
support/shlib-install
|
||||
- new script to install shared readline and history libraries
|
||||
|
||||
shlib/Makefile.in
|
||||
- changed to call shlib-install for install and uninstall targets
|
||||
|
||||
[readline-4.0-beta1 frozen]
|
||||
|
||||
12/22
|
||||
-----
|
||||
configure.in
|
||||
- call AC_SUBST for SHOBJ_XLDFLAGS and SHLIB_LIBS
|
||||
|
||||
shlib/Makefile.in
|
||||
- SHOBJ_XLDFLAGS and SHLIB_LIBS are now substituted by configure
|
||||
- add $(SHLIB_LIBS) at end of command line that builds the shared
|
||||
libraries (currently needed only by AIX 4.2)
|
||||
|
||||
12/31
|
||||
-----
|
||||
MANIFEST, MANIFEST.doc
|
||||
- the TOC html files are no longer generated and no longer part of
|
||||
the distribution
|
||||
|
||||
2/18/1999
|
||||
---------
|
||||
configure.in
|
||||
- set MAKE_SHELL to /bin/sh and substitute into the Makefiles
|
||||
|
||||
Makefile.in,{doc,examples,shlib}/Makefile.in
|
||||
- set SHELL from @MAKE_SHELL@
|
||||
|
||||
[readline-4.0 released]
|
||||
|
@ -1,3 +1,131 @@
|
||||
This document details the changes between this version, readline-4.0,
|
||||
and the previous version, readline-2.2.
|
||||
|
||||
1. Changes to Readline
|
||||
|
||||
a. The version number is now 4.0, to match the major and minor version
|
||||
numbers on the shared readline and history libraries. Future
|
||||
releases will maintain the identical numbering.
|
||||
|
||||
b. Fixed a typo in the `make install' recipe that copied libreadline.a
|
||||
to libhistory.old right after installing it.
|
||||
|
||||
c. The readline and history info files are now installed out of the source
|
||||
directory if they are not found in the build directory.
|
||||
|
||||
d. The library no longer exports a function named `savestring' -- backwards
|
||||
compatibility be damned.
|
||||
|
||||
e. There is no longer any #ifdef SHELL code in the source files.
|
||||
|
||||
f. Some changes were made to the key binding code to fix memory leaks and
|
||||
better support Win32 systems.
|
||||
|
||||
g. Fixed a silly typo in the paren matching code -- it's microseconds, not
|
||||
milliseconds.
|
||||
|
||||
h. The readline library should be compilable by C++ compilers.
|
||||
|
||||
i. The readline.h public header file now includes function prototypes for
|
||||
all readline functions, and some changes were made to fix errors in the
|
||||
source files uncovered by the use of prototypes.
|
||||
|
||||
j. The maximum numeric argument is now clamped at 1000000.
|
||||
|
||||
k. Fixes to rl_yank_last_arg to make it behave better.
|
||||
|
||||
l. Fixed a bug in the display code that caused core dumps if the prompt
|
||||
string length exceeded 1024 characters.
|
||||
|
||||
m. The menu completion code was fixed to properly insert a single completion
|
||||
if there is only one match.
|
||||
|
||||
n. A bug was fixed that caused the display code to improperly display tabs
|
||||
after newlines.
|
||||
|
||||
o. A fix was made to the completion code in which a typo caused the wrong
|
||||
value to be passed to the function that computed the longest common
|
||||
prefix of the list of matches.
|
||||
|
||||
p. The completion code now checks the value of rl_filename_completion_desired,
|
||||
which is set by application-supplied completion functions to indicate
|
||||
that filename completion is being performed, to decide whether or not to
|
||||
call an application-supplied `ignore completions' function.
|
||||
|
||||
q. Code was added to the history library to catch history substitutions
|
||||
using `&' without a previous history substitution or search having been
|
||||
performed.
|
||||
|
||||
|
||||
2. New Features in Readline
|
||||
|
||||
a. There is a new script, support/shobj-conf, to do system-specific shared
|
||||
object and library configuration. It generates variables for configure
|
||||
to substitute into makefiles. The README file provides a detailed
|
||||
explanation of the shared library creation process.
|
||||
|
||||
b. Shared libraries and objects are now built in the `shlib' subdirectory.
|
||||
There is a shlib/Makefile.in to control the build process. `make shared'
|
||||
from the top-level directory is still the right way to build shared
|
||||
versions of the libraries.
|
||||
|
||||
c. rlconf.h is now installed, so applications can find out which features
|
||||
have been compiled into the installed readline and history libraries.
|
||||
|
||||
d. rlstdc.h is now an installed header file.
|
||||
|
||||
e. Many changes to the signal handling:
|
||||
o Readline now catches SIGQUIT and cleans up the tty before returning;
|
||||
o A new variable, rl_catch_signals, is available to application writers
|
||||
to indicate to readline whether or not it should install its own
|
||||
signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
|
||||
SIGTTIN, and SIGTTOU;
|
||||
o A new variable, rl_catch_sigwinch, is available to application
|
||||
writers to indicate to readline whether or not it should install its
|
||||
own signal handler for SIGWINCH, which will chain to the calling
|
||||
applications's SIGWINCH handler, if one is installed;
|
||||
o There is a new function, rl_free_line_state, for application signal
|
||||
handlers to call to free up the state associated with the current
|
||||
line after receiving a signal;
|
||||
o There is a new function, rl_cleanup_after_signal, to clean up the
|
||||
display and terminal state after receiving a signal;
|
||||
o There is a new function, rl_reset_after_signal, to reinitialize the
|
||||
terminal and display state after an application signal handler
|
||||
returns and readline continues
|
||||
|
||||
f. There is a new function, rl_resize_terminal, to reset readline's idea of
|
||||
the screen size after a SIGWINCH.
|
||||
|
||||
g. New public functions: rl_save_prompt and rl_restore_prompt. These were
|
||||
previously private functions with a `_' prefix. These functions are
|
||||
used when an application wants to write a message to the `message area'
|
||||
with rl_message and have the prompt restored correctly when the message
|
||||
is erased.
|
||||
|
||||
h. New function hook: rl_pre_input_hook, called just before readline starts
|
||||
reading input, after initialization.
|
||||
|
||||
i. New function hook: rl_display_matches_hook, called when readline would
|
||||
display the list of completion matches. The new function
|
||||
rl_display_match_list is what readline uses internally, and is available
|
||||
for use by application functions called via this hook.
|
||||
|
||||
j. New bindable function, delete-char-or-list, like tcsh.
|
||||
|
||||
k. A new variable, rl_erase_empty_line, which, if set by an application using
|
||||
readline, will cause readline to erase, prompt and all, lines on which the
|
||||
only thing typed was a newline.
|
||||
|
||||
l. There is a new script, support/shlib-install, to install and uninstall
|
||||
the shared readline and history libraries.
|
||||
|
||||
m. A new bindable variable, `isearch-terminators', which is a string
|
||||
containing the set of characters that should terminate an incremental
|
||||
search without being executed as a command.
|
||||
|
||||
n. A new bindable function, forward-backward-delete-char.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
This document details the changes between this version, readline-2.2,
|
||||
and the previous version, readline-2.1.
|
||||
|
||||
@ -63,4 +191,3 @@ g. The key sequence translation code now understands printf-style backslash
|
||||
may be used in key sequence definitions or macro values.
|
||||
|
||||
h. An `$include' inputrc file parser directive has been added.
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
doc d
|
||||
examples d
|
||||
support d
|
||||
shlib d
|
||||
COPYING f
|
||||
README f
|
||||
MANIFEST f
|
||||
@ -27,6 +28,7 @@ posixstat.h f
|
||||
readline.h f
|
||||
rlconf.h f
|
||||
rldefs.h f
|
||||
rlstdc.h f
|
||||
rltty.h f
|
||||
rlwinsize.h f
|
||||
tcap.h f
|
||||
@ -45,6 +47,7 @@ nls.c f
|
||||
parens.c f
|
||||
readline.c f
|
||||
rltty.c f
|
||||
savestring.c f
|
||||
search.c f
|
||||
shell.c f
|
||||
signals.c f
|
||||
@ -60,13 +63,17 @@ history.c f
|
||||
histexpand.c f
|
||||
histfile.c f
|
||||
histsearch.c f
|
||||
shlib/Makefile.in f
|
||||
support/config.guess f
|
||||
support/config.sub f
|
||||
support/install.sh f
|
||||
support/mkdirs f
|
||||
support/mkdist f
|
||||
support/shobj-conf f
|
||||
support/shlib-install f
|
||||
doc/Makefile.in f
|
||||
doc/texinfo.tex f
|
||||
doc/manvers.texinfo f
|
||||
doc/rlman.texinfo f
|
||||
doc/rltech.texinfo f
|
||||
doc/rluser.texinfo f
|
||||
@ -81,5 +88,16 @@ examples/fileman.c f
|
||||
examples/manexamp.c f
|
||||
examples/rltest.c f
|
||||
examples/rl.c f
|
||||
examples/rlversion.c f
|
||||
examples/histexamp.c f
|
||||
examples/Inputrc f
|
||||
# formatted documentation, from MANIFEST.doc
|
||||
doc/readline.ps f
|
||||
doc/history.ps f
|
||||
doc/readline.dvi f
|
||||
doc/history.dvi f
|
||||
doc/readline.info f
|
||||
doc/history.info f
|
||||
doc/readline.html f
|
||||
doc/history.html f
|
||||
doc/readline.0 f
|
||||
|
@ -28,13 +28,15 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
CC = @CC@
|
||||
LD = ld # needed when building shared libraries
|
||||
RANLIB = @RANLIB@
|
||||
AR = ar
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
RM = rm -f
|
||||
CP = cp
|
||||
MV = mv
|
||||
|
||||
SHELL = @MAKE_SHELL@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
@ -47,8 +49,6 @@ infodir = @infodir@
|
||||
|
||||
man3dir = $(mandir)/man3
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
# Programs to make tags files.
|
||||
ETAGS = etags -tw
|
||||
CTAGS = ctags -tw
|
||||
@ -56,7 +56,6 @@ CTAGS = ctags -tw
|
||||
CFLAGS = @CFLAGS@
|
||||
LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @CFLAGS@
|
||||
|
||||
DEFS = @DEFS@
|
||||
LOCAL_DEFS = @LOCAL_DEFS@
|
||||
@ -66,34 +65,14 @@ INCLUDES = -I. -I$(srcdir) -I$(includedir)
|
||||
|
||||
CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
|
||||
|
||||
# these two options need tweaking for compiler/OS versions other than gcc
|
||||
# and SunOS4
|
||||
PICFLAG= -fpic # -pic for some versions of cc
|
||||
SHLIB_OPTS= -assert pure-text -ldl # -Bshareable for some versions of gcc
|
||||
|
||||
MAJOR= 3
|
||||
# shared library systems like SVR4's do not use minor versions
|
||||
MINOR= .0
|
||||
|
||||
.SUFFIXES: .so
|
||||
|
||||
.c.o:
|
||||
${RM} $@
|
||||
$(CC) -c $(CCFLAGS) $<
|
||||
|
||||
.c.so:
|
||||
-mv $*.o z$*.o
|
||||
$(CC) -c $(PICFLAG) $(CCFLAGS) $<
|
||||
mv $*.o $@
|
||||
-mv z$*.o $*.o
|
||||
|
||||
# The name of the main library target.
|
||||
LIBRARY_NAME = libreadline.a
|
||||
STATIC_LIBS = libreadline.a libhistory.a
|
||||
|
||||
SHARED_READLINE = libreadline.so.$(MAJOR)$(MINOR)
|
||||
SHARED_HISTORY = libhistory.so.$(MAJOR)$(MINOR)
|
||||
SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY)
|
||||
|
||||
# The C code source files for this library.
|
||||
CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
|
||||
$(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
|
||||
@ -104,65 +83,50 @@ CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
|
||||
$(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
|
||||
$(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
|
||||
$(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
|
||||
$(srcdir)/shell.c $(srcdir)/tilde.c
|
||||
$(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c
|
||||
|
||||
# The header files for this library.
|
||||
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
|
||||
posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
|
||||
ansi_stdlib.h tcap.h
|
||||
ansi_stdlib.h tcap.h rlstdc.h
|
||||
|
||||
HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o
|
||||
HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o
|
||||
TILDEOBJ = tilde.o
|
||||
OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
|
||||
rltty.o complete.o bind.o isearch.o display.o signals.o \
|
||||
util.o kill.o undo.o macro.o input.o callback.o terminal.o \
|
||||
nls.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
|
||||
|
||||
SHARED_HISTOBJ = history.so histexpand.so histfile.so histsearch.so shell.so
|
||||
SHARED_TILDEOBJ = tilde.so
|
||||
SHARED_OBJ = readline.so vi_mode.so funmap.so keymaps.so parens.so search.so \
|
||||
rltty.so complete.so bind.so isearch.so display.so signals.so \
|
||||
util.so kill.so undo.so macro.so input.so callback.so terminal.so \
|
||||
nls.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ)
|
||||
|
||||
# The texinfo files which document this library.
|
||||
DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
|
||||
DOCOBJECT = doc/readline.dvi
|
||||
DOCSUPPORT = doc/Makefile
|
||||
DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
|
||||
|
||||
CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile
|
||||
CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
|
||||
CREATED_CONFIGURE = config.status config.h config.cache config.log \
|
||||
stamp-config stamp-h
|
||||
CREATED_TAGS = TAGS tags
|
||||
|
||||
INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h
|
||||
INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
|
||||
rlstdc.h rlconf.h
|
||||
|
||||
##########################################################################
|
||||
|
||||
all: static
|
||||
|
||||
static: $(STATIC_LIBS)
|
||||
shared: $(SHARED_LIBS)
|
||||
|
||||
libreadline.a: $(OBJECTS)
|
||||
$(RM) $@
|
||||
$(AR) cr $@ $(OBJECTS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJECTS)
|
||||
-test -n "$(RANLIB)" && $(RANLIB) $@
|
||||
|
||||
libhistory.a: $(HISTOBJ) xmalloc.o
|
||||
$(RM) $@
|
||||
$(AR) cr $@ $(HISTOBJ) xmalloc.o
|
||||
$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
|
||||
-test -n "$(RANLIB)" && $(RANLIB) $@
|
||||
|
||||
$(SHARED_READLINE): $(SHARED_OBJ)
|
||||
$(RM) $@
|
||||
$(LD) ${SHLIB_OPTS} -o $@ $(SHARED_OBJ)
|
||||
|
||||
$(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so
|
||||
$(RM) $@
|
||||
$(LD) ${SHLIB_OPTS} -o $@ $(SHARED_HISTOBJ) xmalloc.so
|
||||
|
||||
readline: $(OBJECTS) readline.h rldefs.h chardefs.h
|
||||
$(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a -ltermcap
|
||||
|
||||
@ -186,6 +150,11 @@ stamp-h: config.status $(srcdir)/config.h.in
|
||||
$(srcdir)/configure: $(srcdir)/configure.in ## Comment-me-out in distribution
|
||||
cd $(srcdir) && autoconf ## Comment-me-out in distribution
|
||||
|
||||
|
||||
shared: force
|
||||
-test -d shlib || mkdir shlib
|
||||
-( cd shlib ; ${MAKE} ${MFLAGS} all )
|
||||
|
||||
documentation: force
|
||||
-test -d doc || mkdir doc
|
||||
-( cd doc && $(MAKE) $(MFLAGS) )
|
||||
@ -196,14 +165,14 @@ examples: force
|
||||
|
||||
force:
|
||||
|
||||
install: installdirs libreadline.a
|
||||
install: installdirs $(STATIC_LIBS)
|
||||
for f in ${INSTALLED_HEADERS}; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \
|
||||
done
|
||||
-$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old
|
||||
$(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
|
||||
-test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a
|
||||
-$(MV) $(libdir)/libreadline.a $(libdir)/libhistory.old
|
||||
-$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old
|
||||
$(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a
|
||||
-test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a
|
||||
-( if test -d doc ; then \
|
||||
@ -222,13 +191,10 @@ uninstall:
|
||||
${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
|
||||
|
||||
install-shared: installdirs shared
|
||||
-$(MV) $(libdir)/$(SHARED_HISTORY) $(libdir)/$(SHARED_HISTORY).old
|
||||
$(INSTALL_DATA) $(SHARED_HISTORY) $(libdir)/$(SHARED_HISTORY)
|
||||
-$(MV) $(libdir)/$(SHARED_READLINE) $(libdir)/$(SHARED_READLINE).old
|
||||
$(INSTALL_DATA) $(SHARED_READLINE) $(libdir)/$(SHARED_READLINE)
|
||||
-( cd shlib ; ${MAKE} ${MFLAGS} install )
|
||||
|
||||
uninstall-shared:
|
||||
-test -n "$(libdir)" && cd $(libdir) && ${RM} ${SHARED_LIBS}
|
||||
-( cd shlib; ${MAKE} ${MFLAGS} uninstall )
|
||||
|
||||
TAGS: force
|
||||
$(ETAGS) $(CSOURCES) $(HSOURCES)
|
||||
@ -238,15 +204,17 @@ tags: force
|
||||
|
||||
clean: force
|
||||
$(RM) $(OBJECTS) $(STATIC_LIBS)
|
||||
$(RM) $(SHARED_OBJ) $(SHARED_LIBS)
|
||||
-( cd shlib && $(MAKE) $(MFLAGS) $@ )
|
||||
-( cd doc && $(MAKE) $(MFLAGS) $@ )
|
||||
-( cd examples && $(MAKE) $(MFLAGS) $@ )
|
||||
|
||||
mostlyclean: clean
|
||||
-( cd shlib && $(MAKE) $(MFLAGS) $@ )
|
||||
-( cd doc && $(MAKE) $(MFLAGS) $@ )
|
||||
-( cd examples && $(MAKE) $(MFLAGS) $@ )
|
||||
|
||||
distclean maintainer-clean: clean
|
||||
-( cd shlib && $(MAKE) $(MFLAGS) $@ )
|
||||
-( cd doc && $(MAKE) $(MFLAGS) $@ )
|
||||
-( cd examples && $(MAKE) $(MFLAGS) $@ )
|
||||
$(RM) Makefile
|
||||
@ -274,89 +242,89 @@ dist: force
|
||||
# Dependencies
|
||||
bind.o: ansi_stdlib.h posixstat.h
|
||||
bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
bind.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
bind.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
|
||||
bind.o: history.h
|
||||
callback.o: rlconf.h
|
||||
callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
callback.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
callback.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
|
||||
complete.o: ansi_stdlib.h posixdir.h posixstat.h
|
||||
complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
complete.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
complete.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
|
||||
display.o: ansi_stdlib.h posixstat.h
|
||||
display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
display.o: tcap.h
|
||||
display.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
display.o: history.h
|
||||
display.o: history.h rlstdc.h
|
||||
funmap.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
funmap.o: rlconf.h ansi_stdlib.h
|
||||
funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
|
||||
funmap.o: ${BUILD_DIR}/config.h
|
||||
histexpand.o: ansi_stdlib.h
|
||||
histexpand.o: history.h histlib.h
|
||||
histexpand.o: history.h histlib.h rlstdc.h
|
||||
histexpand.o: ${BUILD_DIR}/config.h
|
||||
histfile.o: ansi_stdlib.h
|
||||
histfile.o: history.h histlib.h
|
||||
histfile.o: history.h histlib.h rlstdc.h
|
||||
histfile.o: ${BUILD_DIR}/config.h
|
||||
history.o: ansi_stdlib.h
|
||||
history.o: history.h histlib.h
|
||||
history.o: history.h histlib.h rlstdc.h
|
||||
history.o: ${BUILD_DIR}/config.h
|
||||
histsearch.o: ansi_stdlib.h
|
||||
histsearch.o: history.h histlib.h
|
||||
histsearch.o: history.h histlib.h rlstdc.h
|
||||
histsearch.o: ${BUILD_DIR}/config.h
|
||||
input.o: ansi_stdlib.h
|
||||
input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
input.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
input.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
|
||||
isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
isearch.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
isearch.o: ansi_stdlib.h history.h
|
||||
isearch.o: ansi_stdlib.h history.h rlstdc.h
|
||||
keymaps.o: emacs_keymap.c vi_keymap.c
|
||||
keymaps.o: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
|
||||
keymaps.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
keymaps.o: ${BUILD_DIR}/config.h
|
||||
keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
|
||||
kill.o: ansi_stdlib.h
|
||||
kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
kill.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
kill.o: history.h
|
||||
kill.o: history.h rlstdc.h
|
||||
macro.o: ansi_stdlib.h
|
||||
macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
macro.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
macro.o: history.h
|
||||
macro.o: history.h rlstdc.h
|
||||
nls.o: ansi_stdlib.h
|
||||
nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
parens.o: rlconf.h
|
||||
parens.o: ${BUILD_DIR}/config.h
|
||||
parens.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
parens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
|
||||
readline.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
readline.o: history.h
|
||||
readline.o: history.h rlstdc.h
|
||||
readline.o: posixstat.h ansi_stdlib.h posixjmp.h
|
||||
rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
rltty.o: rltty.h
|
||||
rltty.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
rltty.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
|
||||
search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
search.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
search.o: ansi_stdlib.h history.h
|
||||
search.o: ansi_stdlib.h history.h rlstdc.h
|
||||
shell.o: ${BUILD_DIR}/config.h
|
||||
shell.o: ansi_stdlib.h
|
||||
signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
signals.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
signals.o: history.h
|
||||
signals.o: history.h rlstdc.h
|
||||
terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
terminal.o: tcap.h
|
||||
terminal.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
terminal.o: history.h
|
||||
terminal.o: history.h rlstdc.h
|
||||
tilde.o: ansi_stdlib.h
|
||||
tilde.o: ${BUILD_DIR}/config.h
|
||||
tilde.o: tilde.h
|
||||
undo.o: ansi_stdlib.h
|
||||
undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
undo.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
undo.o: history.h
|
||||
undo.o: history.h rlstdc.h
|
||||
util.o: posixjmp.h ansi_stdlib.h
|
||||
util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
util.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
util.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h
|
||||
vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
vi_mode.o: readline.h keymaps.h chardefs.h tilde.h
|
||||
vi_mode.o: history.h ansi_stdlib.h
|
||||
vi_mode.o: history.h ansi_stdlib.h rlstdc.h
|
||||
xmalloc.o: ${BUILD_DIR}/config.h
|
||||
xmalloc.o: ansi_stdlib.h
|
||||
|
||||
@ -385,95 +353,10 @@ history.o: $(srcdir)/history.c
|
||||
histexpand.o: $(srcdir)/histexpand.c
|
||||
histfile.o: $(srcdir)/histfile.c
|
||||
histsearch.o: $(srcdir)/histsearch.c
|
||||
savestring.o: $(srcdir)/savestring.c
|
||||
shell.o: $(srcdir)/shell.c
|
||||
tilde.o: $(srcdir)/tilde.c
|
||||
|
||||
bind.so: ansi_stdlib.h posixstat.h
|
||||
bind.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
bind.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
bind.so: history.h
|
||||
callback.so: rlconf.h
|
||||
callback.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
callback.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
complete.so: ansi_stdlib.h posixdir.h posixstat.h
|
||||
complete.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
complete.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
display.so: ansi_stdlib.h posixstat.h
|
||||
display.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
display.so: tcap.h
|
||||
display.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
display.so: history.h
|
||||
funmap.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
funmap.so: rlconf.h ansi_stdlib.h
|
||||
funmap.so: ${BUILD_DIR}/config.h
|
||||
histexpand.so: ansi_stdlib.h
|
||||
histexpand.so: history.h histlib.h
|
||||
histexpand.so: ${BUILD_DIR}/config.h
|
||||
histfile.so: ansi_stdlib.h
|
||||
histfile.so: history.h histlib.h
|
||||
histfile.so: ${BUILD_DIR}/config.h
|
||||
history.so: ansi_stdlib.h
|
||||
history.so: history.h histlib.h
|
||||
history.so: ${BUILD_DIR}/config.h
|
||||
histsearch.so: ansi_stdlib.h
|
||||
histsearch.so: history.h histlib.h
|
||||
histsearch.so: ${BUILD_DIR}/config.h
|
||||
input.so: ansi_stdlib.h
|
||||
input.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
input.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
isearch.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
isearch.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
isearch.so: ansi_stdlib.h history.h
|
||||
keymaps.so: emacs_keymap.c vi_keymap.c
|
||||
keymaps.so: keymaps.h chardefs.h rlconf.h ansi_stdlib.h
|
||||
keymaps.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
keymaps.so: ${BUILD_DIR}/config.h
|
||||
kill.so: ansi_stdlib.h
|
||||
kill.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
kill.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
kill.so: history.h
|
||||
macro.so: ansi_stdlib.h
|
||||
macro.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
macro.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
macro.so: history.h
|
||||
nls.so: ansi_stdlib.h
|
||||
nls.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
parens.so: rlconf.h
|
||||
parens.so: ${BUILD_DIR}/config.h
|
||||
parens.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
readline.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
readline.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
readline.so: history.h
|
||||
readline.so: posixstat.h ansi_stdlib.h posixjmp.h
|
||||
rltty.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
rltty.so: rltty.h
|
||||
rltty.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
search.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
search.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
search.so: ansi_stdlib.h history.h
|
||||
signals.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
signals.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
signals.so: history.h
|
||||
terminal.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
terminal.so: tcap.h
|
||||
terminal.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
terminal.so: history.h
|
||||
tilde.so: ansi_stdlib.h
|
||||
tilde.so: ${BUILD_DIR}/config.h
|
||||
tilde.so: tilde.h
|
||||
undo.so: ansi_stdlib.h
|
||||
undo.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
undo.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
undo.so: history.h
|
||||
util.so: posixjmp.h ansi_stdlib.h
|
||||
util.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
util.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
vi_mode.so: rldefs.h ${BUILD_DIR}/config.h rlconf.h
|
||||
vi_mode.so: readline.h keymaps.h chardefs.h tilde.h
|
||||
vi_mode.so: history.h ansi_stdlib.h
|
||||
xmalloc.so: ${BUILD_DIR}/config.h
|
||||
xmalloc.so: ansi_stdlib.h
|
||||
|
||||
readline.o: readline.c
|
||||
vi_mode.o: vi_mode.c
|
||||
funmap.o: funmap.c
|
||||
@ -499,61 +382,6 @@ history.o: history.c
|
||||
histexpand.o: histexpand.c
|
||||
histfile.o: histfile.c
|
||||
histsearch.o: histsearch.c
|
||||
savestring.o: savestring.c
|
||||
shell.o: shell.c
|
||||
tilde.o: tilde.c
|
||||
|
||||
readline.so: $(srcdir)/readline.c
|
||||
vi_mode.so: $(srcdir)/vi_mode.c
|
||||
funmap.so: $(srcdir)/funmap.c
|
||||
keymaps.so: $(srcdir)/keymaps.c
|
||||
parens.so: $(srcdir)/parens.c
|
||||
search.so: $(srcdir)/search.c
|
||||
rltty.so: $(srcdir)/rltty.c
|
||||
complete.so: $(srcdir)/complete.c
|
||||
bind.so: $(srcdir)/bind.c
|
||||
isearch.so: $(srcdir)/isearch.c
|
||||
display.so: $(srcdir)/display.c
|
||||
signals.so: $(srcdir)/signals.c
|
||||
util.so: $(srcdir)/util.c
|
||||
kill.so: $(srcdir)/kill.c
|
||||
undo.so: $(srcdir)/undo.c
|
||||
macro.so: $(srcdir)/macro.c
|
||||
input.so: $(srcdir)/input.c
|
||||
callback.so: $(srcdir)/callback.c
|
||||
terminal.so: $(srcdir)/terminal.c
|
||||
nls.so: $(srcdir)/nls.c
|
||||
xmalloc.so: $(srcdir)/xmalloc.c
|
||||
history.so: $(srcdir)/history.c
|
||||
histexpand.so: $(srcdir)/histexpand.c
|
||||
histfile.so: $(srcdir)/histfile.c
|
||||
histsearch.so: $(srcdir)/histsearch.c
|
||||
shell.so: $(srcdir)/shell.c
|
||||
tilde.so: $(srcdir)/tilde.c
|
||||
|
||||
readline.so: readline.c
|
||||
vi_mode.so: vi_mode.c
|
||||
funmap.so: funmap.c
|
||||
keymaps.so: keymaps.c
|
||||
parens.so: parens.c
|
||||
search.so: search.c
|
||||
rltty.so: rltty.c
|
||||
complete.so: complete.c
|
||||
bind.so: bind.c
|
||||
isearch.so: isearch.c
|
||||
display.so: display.c
|
||||
signals.so: signals.c
|
||||
util.so: util.c
|
||||
kill.so: kill.c
|
||||
undo.so: undo.c
|
||||
macro.so: macro.c
|
||||
input.so: input.c
|
||||
callback.so: callback.c
|
||||
terminal.so: terminal.c
|
||||
nls.so: nls.c
|
||||
xmalloc.so: xmalloc.c
|
||||
history.so: history.c
|
||||
histexpand.so: histexpand.c
|
||||
histfile.so: histfile.c
|
||||
histsearch.so: histsearch.c
|
||||
shell.so: shell.c
|
||||
tilde.so: tilde.c
|
||||
|
@ -1,7 +1,7 @@
|
||||
Introduction
|
||||
============
|
||||
|
||||
This is the Gnu Readline library, version 2.2
|
||||
This is the Gnu Readline library, version 4.0.
|
||||
|
||||
The Readline library provides a set of functions for use by applications
|
||||
that allow users to edit command lines as they are typed in. Both
|
||||
@ -34,8 +34,8 @@ may work:
|
||||
Read the file INSTALL in this directory for more information about how
|
||||
to customize and control the build process.
|
||||
|
||||
The file rlconf.h contains defines that enable and disable certain
|
||||
Readline features.
|
||||
The file rlconf.h contains C preprocessor defines that enable and disable
|
||||
certain Readline features.
|
||||
|
||||
Examples
|
||||
========
|
||||
@ -49,32 +49,83 @@ Shared Libraries
|
||||
================
|
||||
|
||||
There is skeletal support for building shared versions of the
|
||||
Readline and History libraries.
|
||||
Readline and History libraries. The configure script creates
|
||||
a Makefile in the `shlib' subdirectory, and typing `make shared'
|
||||
will cause shared versions of the Readline and History libraries
|
||||
to be built on supported platforms.
|
||||
|
||||
Typing `make shared' will cause shared versions of the Readline and
|
||||
History libraries to be built on SunOS 4.1.x. For versions of Unix
|
||||
other than SunOS, you will have to make some changes to Makefile.in.
|
||||
The relevant variables are:
|
||||
Configure calls the script support/shobj-conf to test whether or
|
||||
not shared library creation is supported and to generate the values
|
||||
of variables that are substituted into shlib/Makefile. If you
|
||||
try to build shared libraries on an unsupported platform, `make'
|
||||
will display a message asking you to update support/shobj-conf for
|
||||
your platform.
|
||||
|
||||
PICFLAG Options to give to the compiler to produce position-independent
|
||||
code. The value `-fpic' works for most versions of gcc.
|
||||
SHLIB_OPTS Options to give to the linker to produce a shared library.
|
||||
The value `-assert pure-text -ldl' works on SunOS 4.1.x.
|
||||
The value `-Bshareable' works for some versions of GNU ld.
|
||||
If you need to update support/shobj-conf, you will need to create
|
||||
a `stanza' for your operating system and compiler. The script uses
|
||||
the value of host_os and ${CC} as determined by configure. For
|
||||
instance, FreeBSD 2.2.5 with any version of gcc is identified as
|
||||
`freebsd2.2.5-gcc*'.
|
||||
|
||||
MAJOR The major version number of the shared library. You should
|
||||
not need to change this.
|
||||
MINOR The minor version number of the shared library. Some systems,
|
||||
such as SVR4 and its descendents (e.g., Solaris, Unixware),
|
||||
do not use minor version numbers. For those systems, this
|
||||
variable should be left unset.
|
||||
In the stanza for your operating system-compiler pair, you will need to
|
||||
define several variables. They are:
|
||||
|
||||
LD The linker. The value of `ld' is correct for SunOS 4.1.x.
|
||||
You may need to change it to `gcc'; make sure to change
|
||||
SHLIB_OPTS if you do so.
|
||||
SHOBJ_CC The C compiler used to compile source files into shareable
|
||||
object files. This is normally set to the value of ${CC}
|
||||
by configure, and should not need to be changed.
|
||||
|
||||
Once you have edited Makefile.in, type `make Makefile' to rebuild the
|
||||
Makefile, then `make shared' to build the shared libraries.
|
||||
SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create
|
||||
position-independent code. If you are using gcc, this
|
||||
should probably be set to `-fpic'.
|
||||
|
||||
SHOBJ_LD The link editor to be used to create the shared library from
|
||||
the object files created by $SHOBJ_CC. If you are using
|
||||
gcc, a value of `gcc' will probably work.
|
||||
|
||||
SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation.
|
||||
If you are using gcc, `-shared' may be all that is necessary.
|
||||
These should be the flags needed for generic shared object
|
||||
creation.
|
||||
|
||||
SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
|
||||
creation. Many systems use the -R option to the link
|
||||
editor to embed a path within the library for run-time
|
||||
library searches. A reasonable value for such systems would
|
||||
be `-R$(libdir)'.
|
||||
|
||||
SHLIB_LIBS Any additional libraries that shared libraries should be
|
||||
linked against when they are created.
|
||||
|
||||
SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
|
||||
generating the filename of the shared library. Many systems
|
||||
use `so'; HP-UX uses `sl'.
|
||||
|
||||
SHLIB_LIBVERSION The string to append to the filename to indicate the version
|
||||
of the shared library. It should begin with $(SHLIB_LIBSUFF),
|
||||
and possibly include version information that allows the
|
||||
run-time loader to load the version of the shared library
|
||||
appropriate for a particular program. Systems using shared
|
||||
libraries similar to SunOS 4.x use major and minor library
|
||||
version numbers; for those systems a value of
|
||||
`$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate.
|
||||
Systems based on System V Release 4 don't use minor version
|
||||
numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
|
||||
Other Unix versions use different schemes.
|
||||
|
||||
SHLIB_STATUS Set this to `supported' when you have defined the other
|
||||
necessary variables. Make uses this to determine whether
|
||||
or not shared library creation should be attempted.
|
||||
|
||||
You should look at the existing stanzas in support/shobj-conf for ideas.
|
||||
|
||||
Once you have updated support/shobj-conf, re-run configure and type
|
||||
`make shared'. The shared libraries will be created in the shlib
|
||||
subdirectory.
|
||||
|
||||
Since shared libraries are not created on all platforms, `make install'
|
||||
will not automatically install the shared libraries. To install them,
|
||||
change the current directory to shlib and type `make install'. Running
|
||||
`make install-shared' from the top-level build directory will also work.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
@ -93,7 +144,7 @@ Bug reports for Readline should be sent to:
|
||||
|
||||
When reporting a bug, please include the following information:
|
||||
|
||||
* the version number and release status of Readline (e.g., 2.2-release)
|
||||
* the version number and release status of Readline (e.g., 4.0-release)
|
||||
* the machine and OS that it is running on
|
||||
* a list of the compilation flags or the contents of `config.h', if
|
||||
appropriate
|
||||
|
167
contrib/libreadline/aclocal.m4
vendored
167
contrib/libreadline/aclocal.m4
vendored
@ -26,7 +26,7 @@ main()
|
||||
exit(fl != 1);
|
||||
}
|
||||
], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
|
||||
[AC_MSG_ERROR(cannot check dup2 if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
|
||||
bash_cv_dup2_broken=no])
|
||||
])
|
||||
AC_MSG_RESULT($bash_cv_dup2_broken)
|
||||
@ -129,7 +129,7 @@ main()
|
||||
exit(ok ? 0 : 5);
|
||||
}
|
||||
], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
|
||||
[AC_MSG_ERROR(cannot check pgrp synchronization if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
|
||||
bash_cv_pgrp_pipe=no])
|
||||
])
|
||||
AC_MSG_RESULT($bash_cv_pgrp_pipe)
|
||||
@ -187,7 +187,7 @@ main()
|
||||
#endif
|
||||
exit(1);
|
||||
}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
|
||||
[AC_MSG_ERROR(cannot check quad_t if cross compiling -- defaulting to long)
|
||||
[AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
|
||||
bash_cv_type_rlimit=long])])
|
||||
])
|
||||
AC_MSG_RESULT($bash_cv_type_rlimit)
|
||||
@ -211,7 +211,7 @@ AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
|
||||
#include <unistd.h>
|
||||
#endif], [ char *msg = _sys_siglist[2]; ],
|
||||
bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
|
||||
[AC_MSG_ERROR(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
|
||||
[AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
|
||||
AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
|
||||
if test $bash_cv_decl_under_sys_siglist = yes; then
|
||||
AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
|
||||
@ -237,7 +237,7 @@ char *msg = (char *)_sys_siglist[2];
|
||||
exit(msg == 0);
|
||||
}],
|
||||
bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
|
||||
[AC_MSG_ERROR(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
|
||||
bash_cv_under_sys_siglist=no])])
|
||||
AC_MSG_RESULT($bash_cv_under_sys_siglist)
|
||||
if test $bash_cv_under_sys_siglist = yes; then
|
||||
@ -264,7 +264,7 @@ char *msg = sys_siglist[2];
|
||||
exit(msg == 0);
|
||||
}],
|
||||
bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
|
||||
[AC_MSG_ERROR(cannot check for sys_siglist if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
|
||||
bash_cv_sys_siglist=no])])
|
||||
AC_MSG_RESULT($bash_cv_sys_siglist)
|
||||
if test $bash_cv_sys_siglist = yes; then
|
||||
@ -325,7 +325,7 @@ dir = opendir("/tmp/not_a_directory");
|
||||
unlink("/tmp/not_a_directory");
|
||||
exit (dir == 0);
|
||||
}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
|
||||
[AC_MSG_ERROR(cannot check opendir if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
|
||||
bash_cv_opendir_not_robust=no]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_opendir_not_robust)
|
||||
@ -356,109 +356,47 @@ fi
|
||||
|
||||
AC_DEFUN(BASH_TYPE_INT32_T,
|
||||
[
|
||||
if test "X$bash_cv_type_int32_t" = "X"; then
|
||||
_bash_needmsg=yes
|
||||
if test "$ac_cv_sizeof_int" = 4; then
|
||||
AC_CHECK_TYPE(int32_t, int)
|
||||
elif test "$ac_cv_sizeof_long" = 4; then
|
||||
AC_CHECK_TYPE(int32_t, long)
|
||||
else
|
||||
AC_MSG_CHECKING(which builtin C type is 32 bits wide)
|
||||
_bash_needmsg=
|
||||
fi
|
||||
AC_CACHE_VAL(bash_cv_type_int32_t,
|
||||
[AC_TRY_RUN([
|
||||
main()
|
||||
{
|
||||
#if SIZEOF_INT == 4
|
||||
exit (0);
|
||||
#else
|
||||
# if SIZEOF_LONG == 4
|
||||
exit (1);
|
||||
# else
|
||||
# error cannot find 32 bit type...
|
||||
# endif
|
||||
#endif
|
||||
}], bash_cv_type_int32_t=int, bash_cv_type_int32_t=long,
|
||||
[AC_MSG_ERROR(cannot check type sizes if cross-compiling -- defaulting to int)
|
||||
bash_cv_type_int32_t=int]
|
||||
)])
|
||||
if test "X$_bash_needmsg" = "Xyes"; then
|
||||
AC_MSG_CHECKING(which builtin C type is 32 bits wide)
|
||||
fi
|
||||
AC_MSG_RESULT($bash_cv_type_int32_t);
|
||||
if test "$bash_cv_type_int32_t" = "int"; then
|
||||
AC_DEFINE(int32_t, int)
|
||||
else
|
||||
AC_DEFINE(int32_t, long)
|
||||
AC_CHECK_TYPE(int32_t, int)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(BASH_TYPE_U_INT32_T,
|
||||
[
|
||||
if test "X$bash_cv_type_u_int32_t" = "X"; then
|
||||
_bash_needmsg=yes
|
||||
if test "$ac_cv_sizeof_int" = 4; then
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned int)
|
||||
elif test "$ac_cv_sizeof_long" = 4; then
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned long)
|
||||
else
|
||||
AC_MSG_CHECKING(which unsigned builtin C type is 32 bits wide)
|
||||
_bash_needmsg=
|
||||
fi
|
||||
AC_CACHE_VAL(bash_cv_type_u_int32_t,
|
||||
[AC_TRY_RUN([
|
||||
main()
|
||||
{
|
||||
#if SIZEOF_INT == 4
|
||||
exit (0);
|
||||
#else
|
||||
# if SIZEOF_LONG == 4
|
||||
exit (1);
|
||||
# else
|
||||
# error cannot find 32 bit type...
|
||||
# endif
|
||||
#endif
|
||||
}], bash_cv_type_u_int32_t=int, bash_cv_type_u_int32_t=long,
|
||||
[AC_MSG_ERROR(cannot check type sizes if cross-compiling -- defaulting to int)
|
||||
bash_cv_type_u_int32_t=int]
|
||||
)])
|
||||
if test "X$_bash_needmsg" = "Xyes"; then
|
||||
AC_MSG_CHECKING(which unsigned builtin C type is 32 bits wide)
|
||||
fi
|
||||
AC_MSG_RESULT($bash_cv_type_u_int32_t);
|
||||
if test "$bash_cv_type_u_int32_t" = "int"; then
|
||||
AC_DEFINE(u_int32_t, unsigned int)
|
||||
else
|
||||
AC_DEFINE(u_int32_t, unsigned long)
|
||||
AC_CHECK_TYPE(u_int32_t, unsigned int)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(BASH_TYPE_PTRDIFF_T,
|
||||
[
|
||||
if test "X$bash_cv_type_ptrdiff_t" = "X"; then
|
||||
_bash_needmsg=yes
|
||||
if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
|
||||
AC_CHECK_TYPE(ptrdiff_t, int)
|
||||
elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
|
||||
AC_CHECK_TYPE(ptrdiff_t, long)
|
||||
else
|
||||
AC_MSG_CHECKING(which builtin C type is correct for ptrdiff_t)
|
||||
_bash_needmsg=
|
||||
AC_CHECK_TYPE(ptrdiff_t, int)
|
||||
fi
|
||||
AC_CACHE_VAL(bash_cv_type_ptrdiff_t,
|
||||
[AC_TRY_RUN([
|
||||
main()
|
||||
{
|
||||
#if SIZEOF_CHAR_P == SIZEOF_INT
|
||||
exit (0);
|
||||
#else
|
||||
# if SIZEOF_CHAR_P == SIZEOF_LONG
|
||||
exit (1);
|
||||
# else
|
||||
# error cannot find type for pointer arithmetic...
|
||||
# endif
|
||||
#endif
|
||||
}], bash_cv_type_ptrdiff_t=int, bash_cv_type_ptrdiff_t=long,
|
||||
[AC_MSG_ERROR(cannot check type sizes if cross-compiling -- defaulting to int)
|
||||
bash_cv_type_ptrdiff_t=int]
|
||||
)])
|
||||
if test "X$_bash_needmsg" = "Xyes"; then
|
||||
AC_MSG_CHECKING(which builtin C type is correct for ptrdiff_t)
|
||||
fi
|
||||
AC_MSG_RESULT($bash_cv_type_ptrdiff_t);
|
||||
if test "$bash_cv_type_ptrdiff_t" = "int"; then
|
||||
AC_DEFINE(ptrdiff_t, int)
|
||||
])
|
||||
|
||||
AC_DEFUN(BASH_TYPE_BITS64_T,
|
||||
[
|
||||
if test "$ac_sv_sizeof_char_p" = 8; then
|
||||
AC_CHECK_TYPE(bits64_t, char *)
|
||||
elif test "$ac_cv_sizeof_double" = 8; then
|
||||
AC_CHECK_TYPE(bits64_t, double)
|
||||
elif test "$ac_cv_sizeof_long" = 8; then
|
||||
AC_CHECK_TYPE(bits64_t, long)
|
||||
else
|
||||
AC_DEFINE(ptrdiff_t, long)
|
||||
AC_CHECK_TYPE(bits64_t, double)
|
||||
fi
|
||||
])
|
||||
|
||||
@ -548,7 +486,7 @@ s = getenv("ABCDE");
|
||||
exit(s == 0); /* force optimizer to leave getenv in */
|
||||
}
|
||||
], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
|
||||
[AC_MSG_ERROR(cannot check getenv redefinition if cross compiling -- defaulting to yes)
|
||||
[AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
|
||||
bash_cv_getenv_redef=yes]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_getenv_redef)
|
||||
@ -574,7 +512,7 @@ pf = (_bashfunc) printf;
|
||||
exit(pf == 0);
|
||||
}
|
||||
], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
|
||||
[AC_MSG_ERROR(cannot check printf declaration if cross compiling -- defaulting to yes)
|
||||
[AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
|
||||
bash_cv_printf_declared=yes]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_printf_declared)
|
||||
@ -593,7 +531,7 @@ long maxfds = ulimit(4, 0L);
|
||||
exit (maxfds == -1L);
|
||||
}
|
||||
], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
|
||||
[AC_MSG_ERROR(cannot check ulimit if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
|
||||
bash_cv_ulimit_maxfds=no]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_ulimit_maxfds)
|
||||
@ -690,7 +628,7 @@ main()
|
||||
exit (popen_called);
|
||||
}
|
||||
], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
|
||||
[AC_MSG_ERROR(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
|
||||
bash_cv_getcwd_calls_popen=no]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
|
||||
@ -814,7 +752,7 @@ main()
|
||||
exit(nsigint != 2);
|
||||
}
|
||||
], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
|
||||
[AC_MSG_ERROR(cannot check signal handling if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
|
||||
bash_cv_must_reinstall_sighandlers=no]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
|
||||
@ -883,7 +821,7 @@ exit(1);
|
||||
|
||||
exit(0);
|
||||
}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
|
||||
[AC_MSG_ERROR(cannot check job control if cross-compiling -- defaulting to missing)
|
||||
[AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
|
||||
bash_cv_job_control_missing=missing]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_job_control_missing)
|
||||
@ -928,7 +866,7 @@ close(fd);
|
||||
unlink ("/tmp/sh-np-autoconf");
|
||||
exit(0);
|
||||
}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
|
||||
[AC_MSG_ERROR(cannot check for named pipes if cross-compiling -- defaulting to missing)
|
||||
[AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
|
||||
bash_cv_sys_named_pipes=missing]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_sys_named_pipes)
|
||||
@ -979,7 +917,7 @@ siglongjmp(xx, 10);
|
||||
exit(1);
|
||||
#endif
|
||||
}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
|
||||
[AC_MSG_ERROR(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
|
||||
[AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
|
||||
bash_cv_func_sigsetjmp=missing]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_func_sigsetjmp)
|
||||
@ -1246,7 +1184,7 @@ char *v[];
|
||||
exit (r1 > 0 && r2 > 0);
|
||||
}
|
||||
], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
|
||||
[AC_MSG_ERROR(cannot check strcoll if cross compiling -- defaulting to no)
|
||||
[AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
|
||||
bash_cv_func_strcoll_broken=no]
|
||||
)])
|
||||
AC_MSG_RESULT($bash_cv_func_strcoll_broken)
|
||||
@ -1336,9 +1274,28 @@ main ()
|
||||
#endif
|
||||
}
|
||||
], bash_cv_sys_restartable_syscalls=yes, bash_cv_sys_restartable_syscalls=no,
|
||||
AC_MSG_ERROR(cannot check restartable syscalls if cross compiling))
|
||||
AC_MSG_WARN(cannot check restartable syscalls if cross compiling))
|
||||
])
|
||||
if test $bash_cv_sys_restartable_syscalls = yes; then
|
||||
AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
|
||||
fi
|
||||
])
|
||||
dnl
|
||||
dnl Check for 64-bit off_t -- used for malloc alignment
|
||||
dnl
|
||||
dnl C does not allow duplicate case labels, so the compile will fail if
|
||||
dnl sizeof(off_t) is > 4.
|
||||
dnl
|
||||
AC_DEFUN(BASH_CHECK_OFF_T_64,
|
||||
[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
],[
|
||||
switch (0) case 0: case (sizeof (off_t) <= 4):;
|
||||
], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
|
||||
if test $bash_cv_off_t_64 = yes; then
|
||||
AC_DEFINE(HAVE_OFF_T_64)
|
||||
fi])
|
||||
|
@ -83,6 +83,7 @@ extern int rl_complete_with_tilde_expansion;
|
||||
extern int rl_completion_query_items;
|
||||
extern int rl_inhibit_completion;
|
||||
extern char *_rl_comment_begin;
|
||||
extern unsigned char *_rl_isearch_terminators;
|
||||
|
||||
extern int rl_explicit_arg;
|
||||
extern int rl_editing_mode;
|
||||
@ -207,13 +208,17 @@ rl_unbind_function_in_map (func, map)
|
||||
Function *func;
|
||||
Keymap map;
|
||||
{
|
||||
register int i;
|
||||
register int i, rval;
|
||||
|
||||
for (i = 0; i < KEYMAP_SIZE; i++)
|
||||
for (i = rval = 0; i < KEYMAP_SIZE; i++)
|
||||
{
|
||||
if (map[i].type == ISFUNC && map[i].function == func)
|
||||
map[i].function = (Function *)NULL;
|
||||
{
|
||||
map[i].function = (Function *)NULL;
|
||||
rval = 1;
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
int
|
||||
@ -222,7 +227,6 @@ rl_unbind_command_in_map (command, map)
|
||||
Keymap map;
|
||||
{
|
||||
Function *func;
|
||||
register int i;
|
||||
|
||||
func = rl_named_function (command);
|
||||
if (func == 0)
|
||||
@ -663,7 +667,11 @@ _rl_read_file (filename, sizep)
|
||||
i = read (file, buffer, file_size);
|
||||
close (file);
|
||||
|
||||
#if 0
|
||||
if (i < file_size)
|
||||
#else
|
||||
if (i < 0)
|
||||
#endif
|
||||
{
|
||||
free (buffer);
|
||||
return ((char *)NULL);
|
||||
@ -727,6 +735,8 @@ _rl_read_init_file (filename, include_level)
|
||||
|
||||
openname = tilde_expand (filename);
|
||||
buffer = _rl_read_file (openname, &file_size);
|
||||
free (openname);
|
||||
|
||||
if (buffer == 0)
|
||||
return (errno);
|
||||
|
||||
@ -1338,7 +1348,34 @@ rl_variable_bind (name, value)
|
||||
else
|
||||
_rl_bell_preference = AUDIBLE_BELL;
|
||||
}
|
||||
else if (_rl_stricmp (name, "isearch-terminators") == 0)
|
||||
{
|
||||
/* Isolate the value and translate it into a character string. */
|
||||
int beg, end;
|
||||
char *v;
|
||||
|
||||
v = savestring (value);
|
||||
FREE (_rl_isearch_terminators);
|
||||
if (v[0] == '"' || v[0] == '\'')
|
||||
{
|
||||
int delim = v[0];
|
||||
for (beg = end = 1; v[end] && v[end] != delim; end++)
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (beg = end = 0; whitespace (v[end]) == 0; end++)
|
||||
;
|
||||
}
|
||||
|
||||
v[end] = '\0';
|
||||
/* The value starts at v + beg. Translate it into a character string. */
|
||||
_rl_isearch_terminators = (unsigned char *)xmalloc (2 * strlen (v) + 1);
|
||||
rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end);
|
||||
_rl_isearch_terminators[end] = '\0';
|
||||
free (v);
|
||||
}
|
||||
|
||||
/* For the time being, unknown variable names are simply ignored. */
|
||||
return 0;
|
||||
}
|
||||
@ -1492,7 +1529,7 @@ _rl_get_keyname (key)
|
||||
int key;
|
||||
{
|
||||
char *keyname;
|
||||
int i, c, v;
|
||||
int i, c;
|
||||
|
||||
keyname = (char *)xmalloc (8);
|
||||
|
||||
@ -1897,6 +1934,21 @@ rl_variable_dumper (print_readably)
|
||||
fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none");
|
||||
else
|
||||
fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none");
|
||||
|
||||
/* isearch-terminators */
|
||||
if (_rl_isearch_terminators)
|
||||
{
|
||||
char *disp;
|
||||
|
||||
disp = _rl_untranslate_macro_value (_rl_isearch_terminators);
|
||||
|
||||
if (print_readably)
|
||||
fprintf (rl_outstream, "set isearch-terminators \"%s\"\n", disp);
|
||||
else
|
||||
fprintf (rl_outstream, "isearch-terminators is set to \"%s\"\n", disp);
|
||||
|
||||
free (disp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Print all of the current variables and their values to
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "rldefs.h"
|
||||
#include "readline.h"
|
||||
|
||||
extern void readline_internal_startup ();
|
||||
extern void readline_internal_setup ();
|
||||
extern char *readline_internal_teardown ();
|
||||
extern int readline_internal_char ();
|
||||
extern void _rl_init_line_state ();
|
||||
|
301
contrib/libreadline/configure
vendored
301
contrib/libreadline/configure
vendored
@ -1,7 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
# From configure.in for Readline 2.2, version 2.07, from autoconf version 2.12
|
||||
LIBVERSION=2.2
|
||||
# From configure.in for Readline 4.0, version 2.14, from autoconf version 2.12
|
||||
LIBVERSION=4.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -639,7 +642,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:643: checking host system type" >&5
|
||||
echo "configure:646: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
@ -680,7 +683,7 @@ test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
|
||||
# Extract the first word of "gcc", so it can be a program name with args.
|
||||
set dummy gcc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:684: checking for $ac_word" >&5
|
||||
echo "configure:687: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -709,7 +712,7 @@ if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:713: checking for $ac_word" >&5
|
||||
echo "configure:716: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -757,7 +760,7 @@ fi
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
@ -767,11 +770,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 771 "configure"
|
||||
#line 774 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||
if (./conftest; exit) 2>/dev/null; then
|
||||
@ -791,12 +794,12 @@ if test $ac_cv_prog_cc_works = no; then
|
||||
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||
fi
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||
echo "configure:795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:798: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
echo "configure:800: checking whether we are using GNU C" >&5
|
||||
echo "configure:803: checking whether we are using GNU C" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -805,7 +808,7 @@ else
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
@ -820,7 +823,7 @@ if test $ac_cv_prog_gcc = yes; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||
echo "configure:824: checking whether ${CC-cc} accepts -g" >&5
|
||||
echo "configure:827: checking whether ${CC-cc} accepts -g" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -848,7 +851,7 @@ else
|
||||
fi
|
||||
|
||||
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
||||
echo "configure:852: checking how to run the C preprocessor" >&5
|
||||
echo "configure:855: checking how to run the C preprocessor" >&5
|
||||
# On Suns, sometimes $CPP names a directory.
|
||||
if test -n "$CPP" && test -d "$CPP"; then
|
||||
CPP=
|
||||
@ -863,13 +866,13 @@ else
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 867 "configure"
|
||||
#line 870 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@ -880,13 +883,13 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 884 "configure"
|
||||
#line 887 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@ -910,17 +913,17 @@ echo "$ac_t""$CPP" 1>&6
|
||||
|
||||
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
|
||||
echo "configure:914: checking for minix/config.h" >&5
|
||||
echo "configure:917: checking for minix/config.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 919 "configure"
|
||||
#line 922 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <minix/config.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -963,13 +966,13 @@ test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||
echo "configure:967: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:970: checking whether ${CC-cc} needs -traditional" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_pattern="Autoconf.*'x'"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 973 "configure"
|
||||
#line 976 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
@ -987,7 +990,7 @@ rm -f conftest*
|
||||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 991 "configure"
|
||||
#line 994 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
@ -1019,7 +1022,7 @@ fi
|
||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:1023: checking for a BSD compatible install" >&5
|
||||
echo "configure:1026: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -1068,10 +1071,39 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
||||
|
||||
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||
|
||||
# Extract the first word of "ar", so it can be a program name with args.
|
||||
set dummy ar; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1078: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$AR"; then
|
||||
ac_cv_prog_AR="$AR" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_AR="ar"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
AR="$ac_cv_prog_AR"
|
||||
if test -n "$AR"; then
|
||||
echo "$ac_t""$AR" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -n "$ARFLAGS" || ARFLAGS="cr"
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1075: checking for $ac_word" >&5
|
||||
echo "configure:1107: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1098,13 +1130,16 @@ else
|
||||
fi
|
||||
|
||||
|
||||
MAKE_SHELL=/bin/sh
|
||||
|
||||
|
||||
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
|
||||
echo "configure:1103: checking return type of signal handlers" >&5
|
||||
echo "configure:1138: checking return type of signal handlers" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1108 "configure"
|
||||
#line 1143 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@ -1121,7 +1156,7 @@ int main() {
|
||||
int i;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_type_signal=void
|
||||
else
|
||||
@ -1141,12 +1176,12 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
|
||||
echo "configure:1145: checking whether stat file-mode macros are broken" >&5
|
||||
echo "configure:1180: checking whether stat file-mode macros are broken" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1150 "configure"
|
||||
#line 1185 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -1201,12 +1236,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
|
||||
echo "configure:1205: checking for $ac_hdr that defines DIR" >&5
|
||||
echo "configure:1240: checking for $ac_hdr that defines DIR" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1210 "configure"
|
||||
#line 1245 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <$ac_hdr>
|
||||
@ -1214,7 +1249,7 @@ int main() {
|
||||
DIR *dirp = 0;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_dirent_$ac_safe=yes"
|
||||
else
|
||||
@ -1239,7 +1274,7 @@ done
|
||||
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
|
||||
if test $ac_header_dirent = dirent.h; then
|
||||
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
|
||||
echo "configure:1243: checking for opendir in -ldir" >&5
|
||||
echo "configure:1278: checking for opendir in -ldir" >&5
|
||||
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -1247,7 +1282,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldir $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1251 "configure"
|
||||
#line 1286 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -1258,7 +1293,7 @@ int main() {
|
||||
opendir()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -1280,7 +1315,7 @@ fi
|
||||
|
||||
else
|
||||
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
|
||||
echo "configure:1284: checking for opendir in -lx" >&5
|
||||
echo "configure:1319: checking for opendir in -lx" >&5
|
||||
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -1288,7 +1323,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lx $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1292 "configure"
|
||||
#line 1327 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -1299,7 +1334,7 @@ int main() {
|
||||
opendir()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -1325,12 +1360,12 @@ fi
|
||||
for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:1329: checking for $ac_func" >&5
|
||||
echo "configure:1364: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1334 "configure"
|
||||
#line 1369 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -1353,7 +1388,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -1379,7 +1414,7 @@ done
|
||||
|
||||
|
||||
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
|
||||
echo "configure:1383: checking for working strcoll" >&5
|
||||
echo "configure:1418: checking for working strcoll" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -1387,7 +1422,7 @@ else
|
||||
ac_cv_func_strcoll_works=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1391 "configure"
|
||||
#line 1426 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
main ()
|
||||
@ -1397,7 +1432,7 @@ main ()
|
||||
strcoll ("123", "456") >= 0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:1436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_func_strcoll_works=yes
|
||||
else
|
||||
@ -1426,17 +1461,17 @@ for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1430: checking for $ac_hdr" >&5
|
||||
echo "configure:1465: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1435 "configure"
|
||||
#line 1470 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@ -1465,13 +1500,13 @@ done
|
||||
|
||||
|
||||
echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
|
||||
echo "configure:1469: checking for type of signal functions" >&5
|
||||
echo "configure:1504: checking for type of signal functions" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1475 "configure"
|
||||
#line 1510 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <signal.h>
|
||||
int main() {
|
||||
@ -1484,7 +1519,7 @@ int main() {
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
bash_cv_signal_vintage=posix
|
||||
else
|
||||
@ -1493,7 +1528,7 @@ else
|
||||
rm -rf conftest*
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1497 "configure"
|
||||
#line 1532 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <signal.h>
|
||||
int main() {
|
||||
@ -1503,7 +1538,7 @@ int main() {
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
bash_cv_signal_vintage=4.2bsd
|
||||
else
|
||||
@ -1512,7 +1547,7 @@ else
|
||||
rm -rf conftest*
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1516 "configure"
|
||||
#line 1551 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <signal.h>
|
||||
@ -1525,7 +1560,7 @@ int main() {
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
bash_cv_signal_vintage=svr3
|
||||
else
|
||||
@ -1566,17 +1601,17 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
|
||||
echo "configure:1570: checking if signal handlers must be reinstalled when invoked" >&5
|
||||
echo "configure:1605: checking if signal handlers must be reinstalled when invoked" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: cannot check signal handling if cross compiling -- defaulting to no" 1>&2; exit 1; }
|
||||
echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2
|
||||
bash_cv_must_reinstall_sighandlers=no
|
||||
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1580 "configure"
|
||||
#line 1615 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <signal.h>
|
||||
@ -1623,7 +1658,7 @@ main()
|
||||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
bash_cv_must_reinstall_sighandlers=no
|
||||
else
|
||||
@ -1648,17 +1683,17 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
|
||||
echo "configure:1652: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
|
||||
echo "configure:1687: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2; exit 1; }
|
||||
echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2
|
||||
bash_cv_func_sigsetjmp=missing
|
||||
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1662 "configure"
|
||||
#line 1697 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
@ -1699,7 +1734,7 @@ exit(1);
|
||||
#endif
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
bash_cv_func_sigsetjmp=present
|
||||
else
|
||||
@ -1722,12 +1757,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for lstat""... $ac_c" 1>&6
|
||||
echo "configure:1726: checking for lstat" >&5
|
||||
echo "configure:1761: checking for lstat" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1731 "configure"
|
||||
#line 1766 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -1737,7 +1772,7 @@ int main() {
|
||||
lstat(".",(struct stat *)0);
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
bash_cv_func_lstat=yes
|
||||
else
|
||||
@ -1758,12 +1793,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
|
||||
echo "configure:1762: checking whether programs are able to redeclare getpw functions" >&5
|
||||
echo "configure:1797: checking whether programs are able to redeclare getpw functions" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1767 "configure"
|
||||
#line 1802 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
@ -1774,7 +1809,7 @@ int main() {
|
||||
struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_can_redecl_getpw=yes
|
||||
else
|
||||
@ -1796,17 +1831,17 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
|
||||
echo "configure:1800: checking whether or not strcoll and strcmp differ" >&5
|
||||
echo "configure:1835: checking whether or not strcoll and strcmp differ" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: cannot check strcoll if cross compiling -- defaulting to no" 1>&2; exit 1; }
|
||||
echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2
|
||||
bash_cv_func_strcoll_broken=no
|
||||
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1810 "configure"
|
||||
#line 1845 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -1845,7 +1880,7 @@ char *v[];
|
||||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:1849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
bash_cv_func_strcoll_broken=yes
|
||||
else
|
||||
@ -1869,12 +1904,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
|
||||
echo "configure:1873: checking whether signal handlers are of type void" >&5
|
||||
echo "configure:1908: checking whether signal handlers are of type void" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1878 "configure"
|
||||
#line 1913 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@ -1889,7 +1924,7 @@ int main() {
|
||||
int i;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_void_sighandler=yes
|
||||
else
|
||||
@ -1909,12 +1944,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
|
||||
echo "configure:1913: checking for TIOCGWINSZ in sys/ioctl.h" >&5
|
||||
echo "configure:1948: checking for TIOCGWINSZ in sys/ioctl.h" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1918 "configure"
|
||||
#line 1953 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -1922,7 +1957,7 @@ int main() {
|
||||
int x = TIOCGWINSZ;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_tiocgwinsz_in_ioctl=yes
|
||||
else
|
||||
@ -1943,12 +1978,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
|
||||
echo "configure:1947: checking for TIOCSTAT in sys/ioctl.h" >&5
|
||||
echo "configure:1982: checking for TIOCSTAT in sys/ioctl.h" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1952 "configure"
|
||||
#line 1987 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -1956,7 +1991,7 @@ int main() {
|
||||
int x = TIOCSTAT;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_tiocstat_in_ioctl=yes
|
||||
else
|
||||
@ -1977,12 +2012,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
|
||||
echo "configure:1981: checking for FIONREAD in sys/ioctl.h" >&5
|
||||
echo "configure:2016: checking for FIONREAD in sys/ioctl.h" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1986 "configure"
|
||||
#line 2021 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -1990,7 +2025,7 @@ int main() {
|
||||
int x = FIONREAD;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_fionread_in_ioctl=yes
|
||||
else
|
||||
@ -2011,19 +2046,19 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
|
||||
echo "configure:2015: checking for speed_t in sys/types.h" >&5
|
||||
echo "configure:2050: checking for speed_t in sys/types.h" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2020 "configure"
|
||||
#line 2055 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
int main() {
|
||||
speed_t x;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_speed_t_in_sys_types=yes
|
||||
else
|
||||
@ -2044,12 +2079,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
|
||||
echo "configure:2048: checking for struct winsize in sys/ioctl.h and termios.h" >&5
|
||||
echo "configure:2083: checking for struct winsize in sys/ioctl.h and termios.h" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2053 "configure"
|
||||
#line 2088 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -2057,7 +2092,7 @@ int main() {
|
||||
struct winsize x;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_struct_winsize_header=ioctl_h
|
||||
else
|
||||
@ -2065,7 +2100,7 @@ else
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2069 "configure"
|
||||
#line 2104 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <termios.h>
|
||||
@ -2073,7 +2108,7 @@ int main() {
|
||||
struct winsize x;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_struct_winsize_header=termios_h
|
||||
else
|
||||
@ -2106,12 +2141,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
|
||||
echo "configure:2110: checking if struct dirent has a d_ino member" >&5
|
||||
echo "configure:2145: checking if struct dirent has a d_ino member" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2115 "configure"
|
||||
#line 2150 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2140,7 +2175,7 @@ struct dirent d; int z; z = d.d_ino;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_dirent_has_dino=yes
|
||||
else
|
||||
@ -2162,12 +2197,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
|
||||
echo "configure:2166: checking if struct dirent has a d_fileno member" >&5
|
||||
echo "configure:2201: checking if struct dirent has a d_fileno member" >&5
|
||||
if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2171 "configure"
|
||||
#line 2206 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2196,7 +2231,7 @@ struct dirent d; int z; z = d.d_fileno;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bash_cv_dirent_has_d_fileno=yes
|
||||
else
|
||||
@ -2225,14 +2260,14 @@ if test "X$bash_cv_termcap_lib" = "X"; then
|
||||
_bash_needmsg=yes
|
||||
else
|
||||
echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
|
||||
echo "configure:2229: checking which library has the termcap functions" >&5
|
||||
echo "configure:2264: checking which library has the termcap functions" >&5
|
||||
_bash_needmsg=
|
||||
fi
|
||||
if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
|
||||
echo "configure:2236: checking for tgetent in -ltermcap" >&5
|
||||
echo "configure:2271: checking for tgetent in -ltermcap" >&5
|
||||
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -2240,7 +2275,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ltermcap $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2244 "configure"
|
||||
#line 2279 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -2251,7 +2286,7 @@ int main() {
|
||||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -2270,7 +2305,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
|
||||
echo "configure:2274: checking for tgetent in -lcurses" >&5
|
||||
echo "configure:2309: checking for tgetent in -lcurses" >&5
|
||||
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -2278,7 +2313,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lcurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2282 "configure"
|
||||
#line 2317 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -2289,7 +2324,7 @@ int main() {
|
||||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -2308,7 +2343,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
|
||||
echo "configure:2312: checking for tgetent in -lncurses" >&5
|
||||
echo "configure:2347: checking for tgetent in -lncurses" >&5
|
||||
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -2316,7 +2351,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lncurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2320 "configure"
|
||||
#line 2355 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -2327,7 +2362,7 @@ int main() {
|
||||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -2356,7 +2391,7 @@ fi
|
||||
|
||||
if test "X$_bash_needmsg" = "Xyes"; then
|
||||
echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
|
||||
echo "configure:2360: checking which library has the termcap functions" >&5
|
||||
echo "configure:2395: checking which library has the termcap functions" >&5
|
||||
fi
|
||||
echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
|
||||
if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
|
||||
@ -2386,6 +2421,30 @@ case "$host_os" in
|
||||
isc*) LOCAL_CFLAGS=-Disc386 ;;
|
||||
esac
|
||||
|
||||
# shared library configuration section
|
||||
#
|
||||
# Shared object configuration section. These values are generated by
|
||||
# ${srcdir}/support/shobj-conf
|
||||
#
|
||||
if test -f ${srcdir}/support/shobj-conf; then
|
||||
echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6
|
||||
echo "configure:2432: checking configuration for building shared libraries" >&5
|
||||
eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "$ac_t""$SHLIB_STATUS" 1>&6
|
||||
fi
|
||||
|
||||
BUILD_DIR=`pwd`
|
||||
|
||||
|
||||
@ -2401,6 +2460,9 @@ BUILD_DIR=`pwd`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@ -2502,7 +2564,7 @@ done
|
||||
ac_given_srcdir=$srcdir
|
||||
ac_given_INSTALL="$INSTALL"
|
||||
|
||||
trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile shlib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
@ -2541,11 +2603,26 @@ s%@CC@%$CC%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
s%@MAKE_SHELL@%$MAKE_SHELL%g
|
||||
s%@SHOBJ_CC@%$SHOBJ_CC%g
|
||||
s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g
|
||||
s%@SHOBJ_LD@%$SHOBJ_LD%g
|
||||
s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g
|
||||
s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g
|
||||
s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g
|
||||
s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g
|
||||
s%@SHLIB_STATUS@%$SHLIB_STATUS%g
|
||||
s%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g
|
||||
s%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g
|
||||
s%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g
|
||||
s%@SHLIB_LIBS@%$SHLIB_LIBS%g
|
||||
s%@BUILD_DIR@%$BUILD_DIR%g
|
||||
s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
|
||||
s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
|
||||
s%@LOCAL_DEFS@%$LOCAL_DEFS%g
|
||||
s%@ARFLAGS@%$ARFLAGS%g
|
||||
s%@LIBVERSION@%$LIBVERSION%g
|
||||
s%@TERMCAP_LIB@%$TERMCAP_LIB%g
|
||||
|
||||
@ -2589,7 +2666,7 @@ EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile examples/Makefile"}
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile examples/Makefile shlib/Makefile"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
|
@ -4,8 +4,8 @@ dnl
|
||||
dnl report bugs to chet@po.cwru.edu
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_REVISION([for Readline 2.2, version 2.07, from autoconf version] AC_ACVERSION)
|
||||
LIBVERSION=2.2
|
||||
AC_REVISION([for Readline 4.0, version 2.14, from autoconf version] AC_ACVERSION)
|
||||
LIBVERSION=4.0
|
||||
|
||||
AC_INIT(readline.h)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
@ -39,8 +39,15 @@ test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
|
||||
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_PROG_INSTALL
|
||||
AC_CHECK_PROG(AR, ar, ar)
|
||||
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
|
||||
dnl This allows people to set it when running configure or make
|
||||
test -n "$ARFLAGS" || ARFLAGS="cr"
|
||||
AC_PROG_RANLIB
|
||||
|
||||
MAKE_SHELL=/bin/sh
|
||||
AC_SUBST(MAKE_SHELL)
|
||||
|
||||
AC_RETSIGTYPE
|
||||
|
||||
AC_HEADER_STAT
|
||||
@ -88,6 +95,29 @@ case "$host_os" in
|
||||
isc*) LOCAL_CFLAGS=-Disc386 ;;
|
||||
esac
|
||||
|
||||
# shared library configuration section
|
||||
#
|
||||
# Shared object configuration section. These values are generated by
|
||||
# ${srcdir}/support/shobj-conf
|
||||
#
|
||||
if test -f ${srcdir}/support/shobj-conf; then
|
||||
AC_MSG_CHECKING(configuration for building shared libraries)
|
||||
eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
|
||||
AC_SUBST(SHOBJ_CC)
|
||||
AC_SUBST(SHOBJ_CFLAGS)
|
||||
AC_SUBST(SHOBJ_LD)
|
||||
AC_SUBST(SHOBJ_LDFLAGS)
|
||||
AC_SUBST(SHOBJ_XLDFLAGS)
|
||||
AC_SUBST(SHOBJ_LIBS)
|
||||
AC_SUBST(SHOBJ_STATUS)
|
||||
AC_SUBST(SHLIB_STATUS)
|
||||
AC_SUBST(SHLIB_XLDFLAGS)
|
||||
AC_SUBST(SHLIB_LIBSUFF)
|
||||
AC_SUBST(SHLIB_LIBVERSION)
|
||||
AC_SUBST(SHLIB_LIBS)
|
||||
AC_MSG_RESULT($SHLIB_STATUS)
|
||||
fi
|
||||
|
||||
BUILD_DIR=`pwd`
|
||||
AC_SUBST(BUILD_DIR)
|
||||
|
||||
@ -96,6 +126,9 @@ AC_SUBST(LOCAL_CFLAGS)
|
||||
AC_SUBST(LOCAL_LDFLAGS)
|
||||
AC_SUBST(LOCAL_DEFS)
|
||||
|
||||
AC_SUBST(AR)
|
||||
AC_SUBST(ARFLAGS)
|
||||
|
||||
AC_SUBST(host_cpu)
|
||||
AC_SUBST(host_os)
|
||||
|
||||
@ -103,7 +136,7 @@ AC_SUBST(LIBVERSION)
|
||||
|
||||
AC_SUBST(TERMCAP_LIB)
|
||||
|
||||
AC_OUTPUT([Makefile doc/Makefile examples/Makefile],
|
||||
AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile],
|
||||
[
|
||||
# Makefile uses this timestamp file to record whether config.h is up to date.
|
||||
echo > stamp-h
|
||||
|
@ -10,6 +10,7 @@ infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
man3dir = $(mandir)/man3
|
||||
|
||||
SHELL = @MAKE_SHELL@
|
||||
RM = rm -f
|
||||
|
||||
TEXINPUTDIR = $(srcdir)
|
||||
@ -25,9 +26,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \
|
||||
$(srcdir)/rltech.texinfo
|
||||
$(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo
|
||||
HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \
|
||||
$(srcdir)/hstech.texinfo
|
||||
$(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo
|
||||
|
||||
# This should be a program that converts troff to an ascii-readable format
|
||||
NROFF = groff -Tascii
|
||||
@ -42,6 +43,8 @@ HTMLOBJ = readline.html history.html
|
||||
HTMLTOC = readline_toc.html history_toc.html
|
||||
TEXTOBJ = readline.0
|
||||
|
||||
INTERMEDIATE_OBJ = rlman.dvi hist.dvi
|
||||
|
||||
CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(HTMLTOC) $(TEXTOBJ)
|
||||
|
||||
.SUFFIXES: .0 .3 .ps .txt .dvi
|
||||
@ -76,16 +79,14 @@ history.ps: history.dvi
|
||||
$(DVIPS) history.dvi
|
||||
|
||||
readline.html: ${RLSRC}
|
||||
$(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
|
||||
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman.html > readline.html
|
||||
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman_toc.html > readline_toc.html
|
||||
$(RM) rlman.html rlman_toc.html
|
||||
$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo
|
||||
sed -e 's:rlman.html:readline.html:' rlman.html > readline.html
|
||||
$(RM) rlman.html
|
||||
|
||||
history.html: ${HISTSRC}
|
||||
$(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo
|
||||
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist.html > history.html
|
||||
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist_toc.html > history_toc.html
|
||||
$(RM) hist.html hist_toc.html
|
||||
$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo
|
||||
sed -e 's:hist.html:history.html:' hist.html > history.html
|
||||
$(RM) hist.html
|
||||
|
||||
info: $(INFOOBJ)
|
||||
dvi: $(DVIOBJ)
|
||||
@ -101,20 +102,30 @@ clean:
|
||||
|
||||
distclean: clean
|
||||
$(RM) $(CREATED_DOCS)
|
||||
$(RM) $(INTERMEDIATE_OBJ)
|
||||
$(RM) Makefile
|
||||
|
||||
mostlyclean: clean
|
||||
|
||||
maintainer-clean: clean
|
||||
$(RM) $(CREATED_DOCS)
|
||||
$(RM) $(INTERMEDIATE_OBJ)
|
||||
$(RM) Makefile
|
||||
|
||||
installdirs: $(top_srcdir)/support/mkdirs
|
||||
-$(SHELL) $(top_srcdir)/support/mkdirs $(infodir) $(man3dir)
|
||||
|
||||
install: installdirs info
|
||||
${INSTALL_DATA} readline.info $(infodir)/readline.info
|
||||
${INSTALL_DATA} history.info $(infodir)/history.info
|
||||
install: installdirs
|
||||
if test -f readline.info; then \
|
||||
${INSTALL_DATA} readline.info $(infodir)/readline.info; \
|
||||
else \
|
||||
${INSTALL_DATA} $(srcdir)/readline.info $(infodir)/readline.info; \
|
||||
fi
|
||||
if test -f history.info; then \
|
||||
${INSTALL_DATA} history.info $(infodir)/history.info; \
|
||||
else \
|
||||
${INSTALL_DATA} $(srcdir)/history.info $(infodir)/history.info; \
|
||||
fi
|
||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||
install-info --dir-file=$(infodir)/dir $(infodir)/readline.info ; \
|
||||
install-info --dir-file=$(infodir)/dir $(infodir)/history.info ; \
|
||||
|
@ -6,26 +6,19 @@
|
||||
|
||||
@setchapternewpage odd
|
||||
|
||||
@ignore
|
||||
last change: Thu Apr 2 14:38:22 EST 1998
|
||||
@end ignore
|
||||
|
||||
@set EDITION 2.2
|
||||
@set VERSION 2.2
|
||||
@set UPDATED 2 April 1998
|
||||
@set UPDATE-MONTH April 1998
|
||||
@include manvers.texinfo
|
||||
|
||||
@ifinfo
|
||||
@dircategory Libraries
|
||||
@direntry
|
||||
* History: (history). The GNU history library API
|
||||
@end direntry
|
||||
|
||||
@ifinfo
|
||||
This document describes the GNU History library, a programming tool that
|
||||
provides a consistent user interface for recalling lines of previously
|
||||
typed input.
|
||||
|
||||
Copyright (C) 1988, 1991, 1993, 1995, 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-1999 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@ -46,7 +39,7 @@ notice identical to this one.
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation approved
|
||||
by the Foundation.
|
||||
by the Free Software Foundation.
|
||||
@end ifinfo
|
||||
|
||||
@titlepage
|
||||
@ -77,10 +70,10 @@ notice identical to this one.
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation approved
|
||||
by the Foundation.
|
||||
by the Free Software Foundation.
|
||||
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988-1999 Free Software Foundation, Inc.
|
||||
@end titlepage
|
||||
|
||||
@ifinfo
|
||||
|
6
contrib/libreadline/doc/manvers.texinfo
Normal file
6
contrib/libreadline/doc/manvers.texinfo
Normal file
@ -0,0 +1,6 @@
|
||||
@set EDITION 4.0
|
||||
@set VERSION 4.0
|
||||
@set UPDATED 31 December 1998
|
||||
@set UPDATE-MONTH December 1998
|
||||
|
||||
@set LASTCHANGE Thu Dec 31 10:17:05 EST 1998
|
@ -6,26 +6,19 @@
|
||||
@synindex vr fn
|
||||
@setchapternewpage odd
|
||||
|
||||
@ignore
|
||||
last change: Thu Apr 2 14:39:03 EST 1998
|
||||
@end ignore
|
||||
|
||||
@set EDITION 2.2
|
||||
@set VERSION 2.2
|
||||
@set UPDATED 2 April 1998
|
||||
@set UPDATE-MONTH April 1998
|
||||
@include manvers.texinfo
|
||||
|
||||
@ifinfo
|
||||
@dircategory Libraries
|
||||
@direntry
|
||||
* Readline: (readline). The GNU readline library API
|
||||
@end direntry
|
||||
|
||||
@ifinfo
|
||||
This document describes the GNU Readline Library, a utility which aids
|
||||
in the consistency of user interface across discrete programs that need
|
||||
to provide a command line interface.
|
||||
|
||||
Copyright (C) 1988, 1991, 1993, 1996, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-1999 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@ -46,7 +39,7 @@ notice identical to this one.
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation approved
|
||||
by the Foundation.
|
||||
by the Free Software Foundation.
|
||||
@end ifinfo
|
||||
|
||||
@titlepage
|
||||
@ -77,10 +70,10 @@ notice identical to this one.
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation approved
|
||||
by the Foundation.
|
||||
by the Free Software Foundation.
|
||||
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1988-1999 Free Software Foundation, Inc.
|
||||
@end titlepage
|
||||
|
||||
@ifinfo
|
||||
|
@ -8,7 +8,7 @@ This document describes the GNU Readline Library, a utility for aiding
|
||||
in the consitency of user interface across discrete programs that need
|
||||
to provide a command line interface.
|
||||
|
||||
Copyright (C) 1988, 1994, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 1994, 1996, 1998, 1999 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission notice
|
||||
@ -47,7 +47,9 @@ in your own programs, this section is for you.
|
||||
* Readline Variables:: Variables accessible to custom
|
||||
functions.
|
||||
* Readline Convenience Functions:: Functions which Readline supplies to
|
||||
aid in writing your own
|
||||
aid in writing your own custom
|
||||
functions.
|
||||
* Readline Signal Handling:: How Readline behaves when it receives signals.
|
||||
* Custom Completers:: Supplanting or supplementing Readline's
|
||||
completion functions.
|
||||
@end menu
|
||||
@ -268,6 +270,13 @@ Setting this to a value makes it the next keystroke read. This is a
|
||||
way to stuff a single character into the input stream.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar int rl_erase_empty_line
|
||||
Setting this to a non-zero value causes Readline to completely erase
|
||||
the current line, including any prompt, any time a newline is typed as
|
||||
the only character on an otherwise-empty line. The cursor is moved to
|
||||
the beginning of the newly-blank line.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {char *} rl_prompt
|
||||
The prompt Readline uses. This is set from the argument to
|
||||
@code{readline ()}, and should not be assigned to directly.
|
||||
@ -300,6 +309,12 @@ If non-zero, this is the address of a function to call just
|
||||
before @code{readline} prints the first prompt.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {Function *} rl_pre_input_hook
|
||||
If non-zero, this is the address of a function to call after
|
||||
the first prompt has been printed and just before @code{readline}
|
||||
starts reading input characters.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {Function *} rl_event_hook
|
||||
If non-zero, this is the address of a function to call periodically
|
||||
when readline is waiting for terminal input.
|
||||
@ -619,6 +634,16 @@ is also used to display numeric arguments and search strings.
|
||||
Clear the message in the echo area.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void rl_save_prompt ()
|
||||
Save the local Readline prompt display state in preparation for
|
||||
displaying a new message in the message area with @code{rl_message}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void rl_restore_prompt ()
|
||||
Restore the local Readline prompt display state saved by the most
|
||||
recent call to @code{rl_save_prompt}.
|
||||
@end deftypefun
|
||||
|
||||
@node Modifying Text
|
||||
@subsection Modifying Text
|
||||
|
||||
@ -689,6 +714,16 @@ Return 1 if @var{c} is a numeric character.
|
||||
Ring the terminal bell, obeying the setting of @code{bell-style}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void rl_display_match_list (char **matches, int len, int max)
|
||||
A convenience function for displaying a list of strings in
|
||||
columnar format on Readline's output stream. @code{matches} is the list
|
||||
of strings, in argv format, such as a list of completion matches.
|
||||
@code{len} is the number of strings in @code{matches}, and @code{max}
|
||||
is the length of the longest string in @code{matches}. This function uses
|
||||
the setting of @code{print-completions-horizontally} to select how the
|
||||
matches are displayed (@pxref{Readline Init File Syntax}).
|
||||
@end deftypefun
|
||||
|
||||
The following are implemented as macros, defined in @code{chartypes.h}.
|
||||
|
||||
@deftypefun int uppercase_p (int c)
|
||||
@ -814,6 +849,116 @@ invert_case_line (count, key)
|
||||
@}
|
||||
@end example
|
||||
|
||||
@node Readline Signal Handling
|
||||
@section Readline Signal Handling
|
||||
|
||||
Signals are asynchronous events sent to a process by the Unix kernel,
|
||||
sometimes on behalf of another process. They are intended to indicate
|
||||
exceptional events, like a user pressing the interrupt key on his
|
||||
terminal, or a network connection being broken. There is a class of
|
||||
signals that can be sent to the process currently reading input from
|
||||
the keyboard. Since Readline changes the terminal attributes when it
|
||||
is called, it needs to perform special processing when a signal is
|
||||
received to restore the terminal to a sane state, or provide application
|
||||
writers with functions to do so manually.
|
||||
|
||||
Readline contains an internal signal handler that is installed for a
|
||||
number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM},
|
||||
@code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}).
|
||||
When one of these signals is received, the signal handler
|
||||
will reset the terminal attributes to those that were in effect before
|
||||
@code{readline ()} was called, reset the signal handling to what it was
|
||||
before @code{readline ()} was called, and resend the signal to the calling
|
||||
application.
|
||||
If and when the calling application's signal handler returns, Readline
|
||||
will reinitialize the terminal and continue to accept input.
|
||||
When a @code{SIGINT} is received, the Readline signal handler performs
|
||||
some additional work, which will cause any partially-entered line to be
|
||||
aborted (see the description of @code{rl_free_line_state ()}).
|
||||
|
||||
There is an additional Readline signal handler, for @code{SIGWINCH}, which
|
||||
the kernel sends to a process whenever the terminal's size changes (for
|
||||
example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH}
|
||||
handler updates Readline's internal screen size state, and then calls any
|
||||
@code{SIGWINCH} signal handler the calling application has installed.
|
||||
Readline calls the application's @code{SIGWINCH} signal handler without
|
||||
resetting the terminal to its original state. If the application's signal
|
||||
handler does more than update its idea of the terminal size and return (for
|
||||
example, a @code{longjmp} back to a main processing loop), it @emph{must}
|
||||
call @code{rl_cleanup_after_signal ()} (described below), to restore the
|
||||
terminal state.
|
||||
|
||||
Readline provides two variables that allow application writers to
|
||||
control whether or not it will catch certain signals and act on them
|
||||
when they are received. It is important that applications change the
|
||||
values of these variables only when calling @code{readline ()}, not in
|
||||
a signal handler, so Readline's internal signal state is not corrupted.
|
||||
|
||||
@deftypevar int rl_catch_signals
|
||||
If this variable is non-zero, Readline will install signal handlers for
|
||||
@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM},
|
||||
@code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}.
|
||||
|
||||
The default value of @code{rl_catch_signals} is 1.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar int rl_catch_sigwinch
|
||||
If this variable is non-zero, Readline will install a signal handler for
|
||||
@code{SIGWINCH}.
|
||||
|
||||
The default value of @code{rl_catch_sigwinch} is 1.
|
||||
@end deftypevar
|
||||
|
||||
If an application does not wish to have Readline catch any signals, or
|
||||
to handle signals other than those Readline catches (@code{SIGHUP},
|
||||
for example),
|
||||
Readline provides convenience functions to do the necessary terminal
|
||||
and internal state cleanup upon receipt of a signal.
|
||||
|
||||
@deftypefun void rl_cleanup_after_signal (void)
|
||||
This function will reset the state of the terminal to what it was before
|
||||
@code{readline ()} was called, and remove the Readline signal handlers for
|
||||
all signals, depending on the values of @code{rl_catch_signals} and
|
||||
@code{rl_catch_sigwinch}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void rl_free_line_state (void)
|
||||
This will free any partial state associated with the current input line
|
||||
(undo information, any partial history entry, any partially-entered
|
||||
keyboard macro, and any partially-entered numeric argument). This
|
||||
should be called before @code{rl_cleanup_after_signal ()}. The
|
||||
Readline signal handler for @code{SIGINT} calls this to abort the
|
||||
current input line.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void rl_reset_after_signal (void)
|
||||
This will reinitialize the terminal and reinstall any Readline signal
|
||||
handlers, depending on the values of @code{rl_catch_signals} and
|
||||
@code{rl_catch_sigwinch}.
|
||||
@end deftypefun
|
||||
|
||||
If an application does not wish Readline to catch @code{SIGWINCH}, it may
|
||||
call @code{rl_resize_terminal ()} to force Readline to update its idea of
|
||||
the terminal size when a @code{SIGWINCH} is received.
|
||||
|
||||
@deftypefun void rl_resize_terminal (void)
|
||||
Update Readline's internal screen size.
|
||||
@end deftypefun
|
||||
|
||||
The following functions install and remove Readline's signal handlers.
|
||||
|
||||
@deftypefun int rl_set_signals (void)
|
||||
Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT},
|
||||
@code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN},
|
||||
@code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of
|
||||
@code{rl_catch_signals} and @code{rl_catch_sigwinch}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun int rl_clear_signals (void)
|
||||
Remove all of the Readline signal handlers installed by
|
||||
@code{rl_set_signals ()}.
|
||||
@end deftypefun
|
||||
|
||||
@node Custom Completers
|
||||
@section Custom Completers
|
||||
|
||||
@ -1108,6 +1253,20 @@ string (the current directory name) as an argument. It could be used
|
||||
to expand symbolic links or shell variables in pathnames.
|
||||
@end deftypevar
|
||||
|
||||
@deftypevar {VFunction *} rl_completion_display_matches_hook
|
||||
If non-zero, then this is the address of a function to call when
|
||||
completing a word would normally display the list of possible matches.
|
||||
This function is called in lieu of Readline displaying the list.
|
||||
It takes three arguments:
|
||||
(@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length})
|
||||
where @var{matches} is the array of matching strings,
|
||||
@var{num_matches} is the number of strings in that array, and
|
||||
@var{max_length} is the length of the longest string in that array.
|
||||
Readline provides a convenience function, @code{rl_display_match_list},
|
||||
that takes care of doing the display to Readline's output stream. That
|
||||
function may be called from this hook.
|
||||
@end deftypevar
|
||||
|
||||
@node A Short Completion Example
|
||||
@subsection A Short Completion Example
|
||||
|
||||
|
@ -97,7 +97,7 @@ regardless of the location of the cursor within the line.
|
||||
* Readline Killing Commands:: How to delete text, and how to get it back!
|
||||
* Readline Arguments:: Giving numeric arguments to commands.
|
||||
* Searching:: Searching through previous lines.
|
||||
@end menu
|
||||
@end menu
|
||||
|
||||
@node Readline Bare Essentials
|
||||
@subsection Readline Bare Essentials
|
||||
@ -252,8 +252,10 @@ As each character of the search string is typed, Readline displays
|
||||
the next entry from the history matching the string typed so far.
|
||||
An incremental search requires only as many characters as needed to
|
||||
find the desired history entry.
|
||||
The @key{ESC} character is used to terminate an incremental search.
|
||||
@key{C-j} will also terminate the search.
|
||||
The characters present in the value of the @var{isearch-terminators} variable
|
||||
are used to terminate an incremental search.
|
||||
If that variable has not been assigned a value, the @key{ESC} and
|
||||
@key{C-J} characters will terminate an incremental search.
|
||||
@key{C-g} will abort an incremental search and restore the original line.
|
||||
When the search is terminated, the history entry containing the
|
||||
search string becomes the current line.
|
||||
@ -396,6 +398,22 @@ horizontally on a single screen line when they are longer than the width
|
||||
of the screen, instead of wrapping onto a new screen line. By default,
|
||||
this variable is set to @samp{off}.
|
||||
|
||||
@item input-meta
|
||||
@vindex input-meta
|
||||
@vindex meta-flag
|
||||
If set to @samp{on}, Readline will enable eight-bit input (it
|
||||
will not strip the eighth bit from the characters it reads),
|
||||
regardless of what the terminal claims it can support. The
|
||||
default value is @samp{off}. The name @code{meta-flag} is a
|
||||
synonym for this variable.
|
||||
|
||||
@item isearch-terminators
|
||||
@vindex isearch-terminators
|
||||
The string of characters that should terminate an incremental search without
|
||||
subsequently executing the character as a command (@pxref{Searching}).
|
||||
If this variable has not been given a value, the characters @key{ESC} and
|
||||
@key{C-J} will terminate an incremental search.
|
||||
|
||||
@item keymap
|
||||
@vindex keymap
|
||||
Sets Readline's idea of the current keymap for key binding commands.
|
||||
@ -422,15 +440,6 @@ This variable, when set to @samp{on}, causes Readline to display an
|
||||
asterisk (@samp{*}) at the start of history lines which have been modified.
|
||||
This variable is @samp{off} by default.
|
||||
|
||||
@item input-meta
|
||||
@vindex input-meta
|
||||
@vindex meta-flag
|
||||
If set to @samp{on}, Readline will enable eight-bit input (it
|
||||
will not strip the eighth bit from the characters it reads),
|
||||
regardless of what the terminal claims it can support. The
|
||||
default value is @samp{off}. The name @code{meta-flag} is a
|
||||
synonym for this variable.
|
||||
|
||||
@item output-meta
|
||||
@vindex output-meta
|
||||
If set to @samp{on}, Readline will display characters with the
|
||||
@ -876,6 +885,11 @@ return @code{EOF}.
|
||||
Delete the character behind the cursor. A numeric argument means
|
||||
to kill the characters instead of deleting them.
|
||||
|
||||
@item forward-backward-delete-char ()
|
||||
Delete the character under the cursor, unless the cursor is at the
|
||||
end of the line, in which case the character behind the cursor is
|
||||
deleted. By default, this is not bound to a key.
|
||||
|
||||
@item quoted-insert (C-q, C-v)
|
||||
Add the next character typed to the line verbatim. This is
|
||||
how to insert key sequences like @key{C-q}, for example.
|
||||
@ -1039,6 +1053,13 @@ through the list.
|
||||
This command is intended to be bound to @code{TAB}, but is unbound
|
||||
by default.
|
||||
|
||||
@item delete-char-or-list ()
|
||||
Deletes the character under the cursor if not at the beginning or
|
||||
end of the line (like @code{delete-char}).
|
||||
If at the end of the line, behaves identically to
|
||||
@code{possible-completions}.
|
||||
This command is unbound by default.
|
||||
|
||||
@ifset BashFeatures
|
||||
@item complete-filename (M-/)
|
||||
Attempt filename completion on the text before point.
|
||||
@ -1141,7 +1162,12 @@ Incremental undo, separately remembered for each line.
|
||||
Undo all changes made to this line. This is like executing the @code{undo}
|
||||
command enough times to get back to the beginning.
|
||||
|
||||
@ifset BashFeatures
|
||||
@item tilde-expand (M-&)
|
||||
@end ifset
|
||||
@ifclear BashFeatures
|
||||
@item tilde-expand (M-~)
|
||||
@end ifclear
|
||||
Perform tilde expansion on the current word.
|
||||
|
||||
@item set-mark (C-@@)
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This is the Makefile for the examples subdirectory of readline. -*- text -*-
|
||||
#
|
||||
SHELL = /bin/sh
|
||||
SHELL = @MAKE_SHELL@
|
||||
RM = rm -f
|
||||
|
||||
srcdir = @srcdir@
|
||||
@ -14,7 +14,7 @@ CFLAGS = @CFLAGS@
|
||||
LOCAL_CFLAGS = @LOCAL_CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I $(srcdir) -I $(top_srcdir) -I..
|
||||
INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
|
||||
|
||||
CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS)
|
||||
LDFLAGS = -g -L..
|
||||
@ -22,10 +22,11 @@ LDFLAGS = -g -L..
|
||||
TERMCAP_LIB = @TERMCAP_LIB@
|
||||
|
||||
.c.o:
|
||||
${RM} $@
|
||||
$(CC) $(CCFLAGS) -c $<
|
||||
|
||||
EXECUTABLES = fileman rltest rl
|
||||
OBJECTS = fileman.o rltest.o rl.o
|
||||
EXECUTABLES = fileman rltest rl rlversion
|
||||
OBJECTS = fileman.o rltest.o rl.o rlversion.o
|
||||
|
||||
all: $(EXECUTABLES)
|
||||
|
||||
@ -38,6 +39,9 @@ fileman: fileman.o
|
||||
rltest: rltest.o
|
||||
$(CC) $(LDFLAGS) -o $@ rltest.o -lreadline $(TERMCAP_LIB)
|
||||
|
||||
rlversion: rlversion.o
|
||||
$(CC) $(LDFLAGS) -o $@ rlversion.o -lreadline $(TERMCAP_LIB)
|
||||
|
||||
clean mostlyclean:
|
||||
$(RM) $(OBJECTS)
|
||||
$(RM) $(EXECUTABLES)
|
||||
@ -48,3 +52,4 @@ distclean maintainer-clean: clean
|
||||
fileman.o: fileman.c
|
||||
rltest.o: rltest.c
|
||||
rl.o: rl.c
|
||||
rlversion.o: rlversion.c
|
||||
|
@ -42,6 +42,7 @@ set_deftext ()
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
usage()
|
||||
{
|
||||
fprintf (stderr, "%s: usage: %s [-p prompt] [-u unit] [-d default]\n",
|
||||
@ -54,7 +55,7 @@ main (argc, argv)
|
||||
{
|
||||
char *temp, *prompt;
|
||||
struct stat sb;
|
||||
int done, opt, fd;
|
||||
int opt, fd;
|
||||
FILE *ifp;
|
||||
|
||||
progname = strrchr(argv[0], '/');
|
||||
|
21
contrib/libreadline/examples/rlversion.c
Normal file
21
contrib/libreadline/examples/rlversion.c
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* rlversion -- print out readline's version number
|
||||
*/
|
||||
|
||||
#define READLINE_LIBRARY
|
||||
|
||||
#if defined (HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "posixstat.h"
|
||||
|
||||
#include "readline.h"
|
||||
|
||||
main()
|
||||
{
|
||||
printf ("%s\n", rl_library_version ? rl_library_version : "unknown");
|
||||
exit (0);
|
||||
}
|
@ -71,6 +71,7 @@ static FUNMAP default_funmap[] = {
|
||||
{ "copy-forward-word", rl_copy_forward_word },
|
||||
{ "copy-region-as-kill", rl_copy_region_to_kill },
|
||||
{ "delete-char", rl_delete },
|
||||
{ "delete-char-or-list", rl_delete_or_show_completions },
|
||||
{ "delete-horizontal-space", rl_delete_horizontal_space },
|
||||
{ "digit-argument", rl_digit_argument },
|
||||
{ "do-lowercase-version", rl_do_lowercase_version },
|
||||
@ -83,6 +84,7 @@ static FUNMAP default_funmap[] = {
|
||||
{ "end-of-history", rl_end_of_history },
|
||||
{ "end-of-line", rl_end_of_line },
|
||||
{ "exchange-point-and-mark", rl_exchange_point_and_mark },
|
||||
{ "forward-backward-delete-char", rl_rubout_or_delete },
|
||||
{ "forward-char", rl_forward },
|
||||
{ "forward-search-history", rl_forward_search_history },
|
||||
{ "forward-word", rl_forward_word },
|
||||
|
@ -365,6 +365,10 @@ hist_error(s, start, current, errtype)
|
||||
emsg = "unrecognized history modifier";
|
||||
elen = 29;
|
||||
break;
|
||||
case NO_PREV_SUBST:
|
||||
emsg = "no previous substitution";
|
||||
elen = 24;
|
||||
break;
|
||||
default:
|
||||
emsg = "unknown expansion error";
|
||||
elen = 23;
|
||||
@ -654,15 +658,6 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is no lhs, the substitution can't succeed. */
|
||||
if (subst_lhs_len == 0)
|
||||
{
|
||||
*ret_string = hist_error (string, starting_index, i, SUBST_FAILED);
|
||||
free (result);
|
||||
free (temp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
FREE (subst_rhs);
|
||||
subst_rhs = get_subst_pattern (string, &i, delimiter, 1, &subst_rhs_len);
|
||||
|
||||
@ -674,6 +669,15 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
|
||||
else
|
||||
i += 2;
|
||||
|
||||
/* If there is no lhs, the substitution can't succeed. */
|
||||
if (subst_lhs_len == 0)
|
||||
{
|
||||
*ret_string = hist_error (string, starting_index, i, NO_PREV_SUBST);
|
||||
free (result);
|
||||
free (temp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
l_temp = strlen (temp);
|
||||
/* Ignore impossible cases. */
|
||||
if (subst_lhs_len > l_temp)
|
||||
|
@ -155,7 +155,11 @@ read_history_range (filename, from, to)
|
||||
}
|
||||
|
||||
buffer = xmalloc (file_size + 1);
|
||||
#if 0
|
||||
if (read (file, buffer, file_size) != file_size)
|
||||
#else
|
||||
if (read (file, buffer, file_size) < 0)
|
||||
#endif
|
||||
{
|
||||
error_and_exit:
|
||||
if (file >= 0)
|
||||
@ -217,7 +221,7 @@ read_history_range (filename, from, to)
|
||||
int
|
||||
history_truncate_file (fname, lines)
|
||||
char *fname;
|
||||
register int lines;
|
||||
int lines;
|
||||
{
|
||||
register int i;
|
||||
int file, chars_read;
|
||||
@ -276,6 +280,12 @@ history_truncate_file (fname, lines)
|
||||
if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
|
||||
{
|
||||
write (file, buffer + i, file_size - i);
|
||||
|
||||
#if defined (__BEOS__)
|
||||
/* BeOS ignores O_TRUNC. */
|
||||
ftruncate (file, file_size - i);
|
||||
#endif
|
||||
|
||||
close (file);
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ extern char *strchr ();
|
||||
#define BAD_WORD_SPEC 1
|
||||
#define SUBST_FAILED 2
|
||||
#define BAD_MODIFIER 3
|
||||
#define NO_PREV_SUBST 4
|
||||
|
||||
/* Possible definitions for history starting point specification. */
|
||||
#define ANCHORED_SEARCH 1
|
||||
|
@ -278,7 +278,7 @@ HIST_ENTRY *
|
||||
replace_history_entry (which, line, data)
|
||||
int which;
|
||||
char *line;
|
||||
char *data;
|
||||
histdata_t data;
|
||||
{
|
||||
HIST_ENTRY *temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
|
||||
HIST_ENTRY *old_value;
|
||||
|
@ -22,6 +22,16 @@
|
||||
#ifndef _HISTORY_H_
|
||||
#define _HISTORY_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined READLINE_LIBRARY
|
||||
# include "rlstdc.h"
|
||||
#else
|
||||
# include <readline/rlstdc.h>
|
||||
#endif
|
||||
|
||||
#if !defined (_FUNCTION_DEF)
|
||||
# define _FUNCTION_DEF
|
||||
typedef int Function ();
|
||||
@ -30,10 +40,16 @@ typedef char *CPFunction ();
|
||||
typedef char **CPPFunction ();
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
typedef void *histdata_t;
|
||||
#else
|
||||
typedef char *histdata_t;
|
||||
#endif
|
||||
|
||||
/* The structure used to store a history entry. */
|
||||
typedef struct _hist_entry {
|
||||
char *line;
|
||||
char *data;
|
||||
histdata_t data;
|
||||
} HIST_ENTRY;
|
||||
|
||||
/* A structure used to pass the current state of the history stuff around. */
|
||||
@ -52,81 +68,81 @@ typedef struct _hist_state {
|
||||
|
||||
/* Begin a session in which the history functions might be used. This
|
||||
just initializes the interactive variables. */
|
||||
extern void using_history ();
|
||||
extern void using_history __P((void));
|
||||
|
||||
/* Return the current HISTORY_STATE of the history. */
|
||||
extern HISTORY_STATE *history_get_history_state ();
|
||||
extern HISTORY_STATE *history_get_history_state __P((void));
|
||||
|
||||
/* Set the state of the current history array to STATE. */
|
||||
extern void history_set_history_state ();
|
||||
extern void history_set_history_state __P((HISTORY_STATE *));
|
||||
|
||||
/* Manage the history list. */
|
||||
|
||||
/* Place STRING at the end of the history list.
|
||||
The associated data field (if any) is set to NULL. */
|
||||
extern void add_history ();
|
||||
extern void add_history __P((char *));
|
||||
|
||||
/* A reasonably useless function, only here for completeness. WHICH
|
||||
is the magic number that tells us which element to delete. The
|
||||
elements are numbered from 0. */
|
||||
extern HIST_ENTRY *remove_history ();
|
||||
extern HIST_ENTRY *remove_history __P((int));
|
||||
|
||||
/* Make the history entry at WHICH have LINE and DATA. This returns
|
||||
the old entry so you can dispose of the data. In the case of an
|
||||
invalid WHICH, a NULL pointer is returned. */
|
||||
extern HIST_ENTRY *replace_history_entry ();
|
||||
extern HIST_ENTRY *replace_history_entry __P((int, char *, histdata_t));
|
||||
|
||||
/* Clear the history list and start over. */
|
||||
extern void clear_history ();
|
||||
extern void clear_history __P((void));
|
||||
|
||||
/* Stifle the history list, remembering only MAX number of entries. */
|
||||
extern void stifle_history ();
|
||||
extern void stifle_history __P((int));
|
||||
|
||||
/* Stop stifling the history. This returns the previous amount the
|
||||
history was stifled by. The value is positive if the history was
|
||||
stifled, negative if it wasn't. */
|
||||
extern int unstifle_history ();
|
||||
extern int unstifle_history __P((void));
|
||||
|
||||
/* Return 1 if the history is stifled, 0 if it is not. */
|
||||
extern int history_is_stifled ();
|
||||
extern int history_is_stifled __P((void));
|
||||
|
||||
/* Information about the history list. */
|
||||
|
||||
/* Return a NULL terminated array of HIST_ENTRY which is the current input
|
||||
history. Element 0 of this list is the beginning of time. If there
|
||||
is no history, return NULL. */
|
||||
extern HIST_ENTRY **history_list ();
|
||||
extern HIST_ENTRY **history_list __P((void));
|
||||
|
||||
/* Returns the number which says what history element we are now
|
||||
looking at. */
|
||||
extern int where_history ();
|
||||
extern int where_history __P((void));
|
||||
|
||||
/* Return the history entry at the current position, as determined by
|
||||
history_offset. If there is no entry there, return a NULL pointer. */
|
||||
HIST_ENTRY *current_history ();
|
||||
HIST_ENTRY *current_history __P((void));
|
||||
|
||||
/* Return the history entry which is logically at OFFSET in the history
|
||||
array. OFFSET is relative to history_base. */
|
||||
extern HIST_ENTRY *history_get ();
|
||||
extern HIST_ENTRY *history_get __P((int));
|
||||
|
||||
/* Return the number of bytes that the primary history entries are using.
|
||||
This just adds up the lengths of the_history->lines. */
|
||||
extern int history_total_bytes ();
|
||||
extern int history_total_bytes __P((void));
|
||||
|
||||
/* Moving around the history list. */
|
||||
|
||||
/* Set the position in the history list to POS. */
|
||||
int history_set_pos ();
|
||||
int history_set_pos __P((int));
|
||||
|
||||
/* Back up history_offset to the previous history entry, and return
|
||||
a pointer to that entry. If there is no previous entry, return
|
||||
a NULL pointer. */
|
||||
extern HIST_ENTRY *previous_history ();
|
||||
extern HIST_ENTRY *previous_history __P((void));
|
||||
|
||||
/* Move history_offset forward to the next item in the input_history,
|
||||
and return the a pointer to that entry. If there is no next entry,
|
||||
return a NULL pointer. */
|
||||
extern HIST_ENTRY *next_history ();
|
||||
extern HIST_ENTRY *next_history __P((void));
|
||||
|
||||
/* Searching the history list. */
|
||||
|
||||
@ -136,44 +152,45 @@ extern HIST_ENTRY *next_history ();
|
||||
current_history () is the history entry, and the value of this function
|
||||
is the offset in the line of that history entry that the string was
|
||||
found in. Otherwise, nothing is changed, and a -1 is returned. */
|
||||
extern int history_search ();
|
||||
extern int history_search __P((char *, int));
|
||||
|
||||
/* Search the history for STRING, starting at history_offset.
|
||||
The search is anchored: matching lines must begin with string. */
|
||||
extern int history_search_prefix ();
|
||||
The search is anchored: matching lines must begin with string.
|
||||
DIRECTION is as in history_search(). */
|
||||
extern int history_search_prefix __P((char *, int));
|
||||
|
||||
/* Search for STRING in the history list, starting at POS, an
|
||||
absolute index into the list. DIR, if negative, says to search
|
||||
backwards from POS, else forwards.
|
||||
Returns the absolute index of the history element where STRING
|
||||
was found, or -1 otherwise. */
|
||||
extern int history_search_pos ();
|
||||
extern int history_search_pos __P((char *, int, int));
|
||||
|
||||
/* Managing the history file. */
|
||||
|
||||
/* Add the contents of FILENAME to the history list, a line at a time.
|
||||
If FILENAME is NULL, then read from ~/.history. Returns 0 if
|
||||
successful, or errno if not. */
|
||||
extern int read_history ();
|
||||
extern int read_history __P((char *));
|
||||
|
||||
/* Read a range of lines from FILENAME, adding them to the history list.
|
||||
Start reading at the FROM'th line and end at the TO'th. If FROM
|
||||
is zero, start at the beginning. If TO is less than FROM, read
|
||||
until the end of the file. If FILENAME is NULL, then read from
|
||||
~/.history. Returns 0 if successful, or errno if not. */
|
||||
extern int read_history_range ();
|
||||
extern int read_history_range __P((char *, int, int));
|
||||
|
||||
/* Write the current history to FILENAME. If FILENAME is NULL,
|
||||
then write the history list to ~/.history. Values returned
|
||||
are as in read_history (). */
|
||||
extern int write_history ();
|
||||
extern int write_history __P((char *));
|
||||
|
||||
/* Append NELEMENT entries to FILENAME. The entries appended are from
|
||||
the end of the list minus NELEMENTs up to the end of the list. */
|
||||
int append_history ();
|
||||
int append_history __P((int, char *));
|
||||
|
||||
/* Truncate the history file, leaving only the last NLINES lines. */
|
||||
extern int history_truncate_file ();
|
||||
extern int history_truncate_file __P((char *, int));
|
||||
|
||||
/* History expansion. */
|
||||
|
||||
@ -189,20 +206,24 @@ extern int history_truncate_file ();
|
||||
|
||||
If an error ocurred in expansion, then OUTPUT contains a descriptive
|
||||
error message. */
|
||||
extern int history_expand ();
|
||||
extern int history_expand __P((char *, char **));
|
||||
|
||||
/* Extract a string segment consisting of the FIRST through LAST
|
||||
arguments present in STRING. Arguments are broken up as in
|
||||
the shell. */
|
||||
extern char *history_arg_extract ();
|
||||
extern char *history_arg_extract __P((int, int, char *));
|
||||
|
||||
/* Return the text of the history event beginning at the current
|
||||
offset into STRING. */
|
||||
extern char *get_history_event ();
|
||||
offset into STRING. Pass STRING with *INDEX equal to the
|
||||
history_expansion_char that begins this specification.
|
||||
DELIMITING_QUOTE is a character that is allowed to end the string
|
||||
specification for what to search for in addition to the normal
|
||||
characters `:', ` ', `\t', `\n', and sometimes `?'. */
|
||||
extern char *get_history_event __P((char *, int *, int));
|
||||
|
||||
/* Return an array of tokens, much as the shell might. The tokens are
|
||||
parsed out of STRING. */
|
||||
extern char **history_tokenize ();
|
||||
extern char **history_tokenize __P((char *));
|
||||
|
||||
/* Exported history variables. */
|
||||
extern int history_base;
|
||||
@ -220,4 +241,8 @@ extern int history_quotes_inhibit_expansion;
|
||||
application and not expanded. */
|
||||
extern Function *history_inhibit_expansion_function;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_HISTORY_H_ */
|
||||
|
@ -124,38 +124,13 @@ _rl_any_typein ()
|
||||
return any_typein;
|
||||
}
|
||||
|
||||
/* Add KEY to the buffer of characters to be read. */
|
||||
int
|
||||
rl_stuff_char (key)
|
||||
int key;
|
||||
{
|
||||
if (key == EOF)
|
||||
{
|
||||
key = NEWLINE;
|
||||
rl_pending_input = EOF;
|
||||
}
|
||||
ibuffer[push_index++] = key;
|
||||
if (push_index >= ibuffer_len)
|
||||
push_index = 0;
|
||||
return push_index;
|
||||
}
|
||||
|
||||
/* Make C be the next command to be executed. */
|
||||
int
|
||||
rl_execute_next (c)
|
||||
int c;
|
||||
{
|
||||
rl_pending_input = c;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return the amount of space available in the
|
||||
buffer for stuffing characters. */
|
||||
/* Return the amount of space available in the buffer for stuffing
|
||||
characters. */
|
||||
static int
|
||||
ibuffer_space ()
|
||||
{
|
||||
if (pop_index > push_index)
|
||||
return (pop_index - push_index);
|
||||
return (pop_index - push_index - 1);
|
||||
else
|
||||
return (ibuffer_len - (push_index - pop_index));
|
||||
}
|
||||
@ -341,6 +316,36 @@ _rl_insert_typein (c)
|
||||
free (string);
|
||||
}
|
||||
|
||||
/* Add KEY to the buffer of characters to be read. Returns 1 if the
|
||||
character was stuffed correctly; 0 otherwise. */
|
||||
int
|
||||
rl_stuff_char (key)
|
||||
int key;
|
||||
{
|
||||
if (ibuffer_space () == 0)
|
||||
return 0;
|
||||
|
||||
if (key == EOF)
|
||||
{
|
||||
key = NEWLINE;
|
||||
rl_pending_input = EOF;
|
||||
}
|
||||
ibuffer[push_index++] = key;
|
||||
if (push_index >= ibuffer_len)
|
||||
push_index = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Make C be the next command to be executed. */
|
||||
int
|
||||
rl_execute_next (c)
|
||||
int c;
|
||||
{
|
||||
rl_pending_input = c;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
/* Character Input */
|
||||
@ -409,6 +414,11 @@ rl_getc (stream)
|
||||
if (result == 0)
|
||||
return (EOF);
|
||||
|
||||
#if defined (__BEOS__)
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
#if defined (EWOULDBLOCK)
|
||||
if (errno == EWOULDBLOCK)
|
||||
{
|
||||
|
@ -48,6 +48,9 @@
|
||||
#include "readline.h"
|
||||
#include "history.h"
|
||||
|
||||
/* Variables exported to other files in the readline library. */
|
||||
unsigned char *_rl_isearch_terminators = (unsigned char *)NULL;
|
||||
|
||||
/* Variables imported from other files in the readline library. */
|
||||
extern Keymap _rl_keymap;
|
||||
extern HIST_ENTRY *saved_line_for_history;
|
||||
@ -55,9 +58,6 @@ extern int rl_line_buffer_len;
|
||||
extern int rl_point, rl_end;
|
||||
extern char *rl_line_buffer;
|
||||
|
||||
extern void _rl_save_prompt ();
|
||||
extern void _rl_restore_prompt ();
|
||||
|
||||
extern int rl_execute_next ();
|
||||
extern void rl_extend_line_buffer ();
|
||||
|
||||
@ -178,12 +178,20 @@ rl_search_history (direction, invoking_key)
|
||||
/* Non-zero if we are doing a reverse search. */
|
||||
int reverse;
|
||||
|
||||
/* The list of characters which terminate the search, but are not
|
||||
subsequently executed. If the variable isearch-terminators has
|
||||
been set, we use that value, otherwise we use ESC and C-J. */
|
||||
unsigned char *isearch_terminators;
|
||||
|
||||
orig_point = rl_point;
|
||||
last_found_line = orig_line = where_history ();
|
||||
reverse = direction < 0;
|
||||
hlist = history_list ();
|
||||
allocated_line = (char *)NULL;
|
||||
|
||||
isearch_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
|
||||
: (unsigned char *)"\033\012";
|
||||
|
||||
/* Create an arrary of pointers to the lines that we want to search. */
|
||||
maybe_replace_line ();
|
||||
i = 0;
|
||||
@ -211,7 +219,7 @@ rl_search_history (direction, invoking_key)
|
||||
/* The line where we start the search. */
|
||||
i = orig_line;
|
||||
|
||||
_rl_save_prompt ();
|
||||
rl_save_prompt ();
|
||||
|
||||
/* Initialize search parameters. */
|
||||
search_string = xmalloc (search_string_size = 128);
|
||||
@ -246,10 +254,18 @@ rl_search_history (direction, invoking_key)
|
||||
c = !reverse ? -1 : -2;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Let NEWLINE (^J) terminate the search for people who don't like
|
||||
using ESC. ^M can still be used to terminate the search and
|
||||
immediately execute the command. */
|
||||
if (c == ESC || c == NEWLINE)
|
||||
#else
|
||||
/* The characters in isearch_terminators (set from the user-settable
|
||||
variable isearch-terminators) are used to terminate the search but
|
||||
not subsequently execute the character as a command. The default
|
||||
value is "\033\012" (ESC and C-J). */
|
||||
if (strchr (isearch_terminators, c))
|
||||
#endif
|
||||
{
|
||||
/* ESC still terminates the search, but if there is pending
|
||||
input or if input arrives within 0.1 seconds (on systems
|
||||
@ -291,7 +307,7 @@ rl_search_history (direction, invoking_key)
|
||||
strcpy (rl_line_buffer, lines[orig_line]);
|
||||
rl_point = orig_point;
|
||||
rl_end = strlen (rl_line_buffer);
|
||||
_rl_restore_prompt();
|
||||
rl_restore_prompt();
|
||||
rl_clear_message ();
|
||||
if (allocated_line)
|
||||
free (allocated_line);
|
||||
@ -409,15 +425,15 @@ rl_search_history (direction, invoking_key)
|
||||
/* First put back the original state. */
|
||||
strcpy (rl_line_buffer, lines[orig_line]);
|
||||
|
||||
_rl_restore_prompt ();
|
||||
rl_restore_prompt ();
|
||||
|
||||
/* Free the search string. */
|
||||
free (search_string);
|
||||
|
||||
if (last_found_line < orig_line)
|
||||
rl_get_previous_history (orig_line - last_found_line);
|
||||
rl_get_previous_history (orig_line - last_found_line, 0);
|
||||
else
|
||||
rl_get_next_history (last_found_line - orig_line);
|
||||
rl_get_next_history (last_found_line - orig_line, 0);
|
||||
|
||||
/* If the string was not found, put point at the end of the line. */
|
||||
if (line_index < 0)
|
||||
|
@ -124,7 +124,7 @@ rl_make_keymap ()
|
||||
/* Free the storage associated with MAP. */
|
||||
void
|
||||
rl_discard_keymap (map)
|
||||
Keymap (map);
|
||||
Keymap map;
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -24,8 +24,10 @@
|
||||
#define _KEYMAPS_H_
|
||||
|
||||
#if defined (READLINE_LIBRARY)
|
||||
# include "rlstdc.h"
|
||||
# include "chardefs.h"
|
||||
#else
|
||||
# include <readline/rlstdc.h>
|
||||
# include <readline/chardefs.h>
|
||||
#endif
|
||||
|
||||
@ -70,26 +72,29 @@ extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap;
|
||||
|
||||
/* Return a new, empty keymap.
|
||||
Free it with free() when you are done. */
|
||||
extern Keymap rl_make_bare_keymap ();
|
||||
extern Keymap rl_make_bare_keymap __P((void));
|
||||
|
||||
/* Return a new keymap which is a copy of MAP. */
|
||||
extern Keymap rl_copy_keymap ();
|
||||
extern Keymap rl_copy_keymap __P((Keymap));
|
||||
|
||||
/* Return a new keymap with the printing characters bound to rl_insert,
|
||||
the lowercase Meta characters bound to run their equivalents, and
|
||||
the Meta digits bound to produce numeric arguments. */
|
||||
extern Keymap rl_make_keymap ();
|
||||
extern Keymap rl_make_keymap __P((void));
|
||||
|
||||
extern void rl_discard_keymap ();
|
||||
/* Free the storage associated with a keymap. */
|
||||
extern void rl_discard_keymap __P((Keymap));
|
||||
|
||||
/* These functions actually appear in bind.c */
|
||||
|
||||
/* Return the keymap corresponding to a given name. Names look like
|
||||
`emacs' or `emacs-meta' or `vi-insert'. */
|
||||
extern Keymap rl_get_keymap_by_name ();
|
||||
`emacs' or `emacs-meta' or `vi-insert'. */
|
||||
extern Keymap rl_get_keymap_by_name __P((char *));
|
||||
|
||||
/* Return the current keymap. */
|
||||
extern Keymap rl_get_keymap ();
|
||||
extern Keymap rl_get_keymap __P((void));
|
||||
|
||||
/* Set the current keymap to MAP. */
|
||||
extern void rl_set_keymap ();
|
||||
extern void rl_set_keymap __P((Keymap));
|
||||
|
||||
#endif /* _KEYMAPS_H_ */
|
||||
|
@ -572,6 +572,8 @@ rl_yank_last_arg (count, key)
|
||||
static int explicit_arg_p = 0;
|
||||
static int count_passed = 1;
|
||||
static int direction = 1;
|
||||
static int undo_needed = 0;
|
||||
int retval;
|
||||
|
||||
if (rl_last_func != rl_yank_last_arg)
|
||||
{
|
||||
@ -582,19 +584,22 @@ rl_yank_last_arg (count, key)
|
||||
}
|
||||
else
|
||||
{
|
||||
rl_do_undo ();
|
||||
if (undo_needed)
|
||||
rl_do_undo ();
|
||||
if (count < 1)
|
||||
direction = -direction;
|
||||
history_skip += direction;
|
||||
if (history_skip < 0)
|
||||
history_skip = 0;
|
||||
count_passed = count;
|
||||
}
|
||||
|
||||
if (explicit_arg_p)
|
||||
return (rl_yank_nth_arg_internal (count, key, history_skip));
|
||||
retval = rl_yank_nth_arg_internal (count_passed, key, history_skip);
|
||||
else
|
||||
return (rl_yank_nth_arg_internal ('$', key, history_skip));
|
||||
retval = rl_yank_nth_arg_internal ('$', key, history_skip);
|
||||
|
||||
undo_needed = retval == 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* A special paste command for users of Cygnus's cygwin32. */
|
||||
|
@ -102,7 +102,7 @@ rl_insert_close (count, invoking_key)
|
||||
FD_ZERO (&readfds);
|
||||
FD_SET (fileno (rl_instream), &readfds);
|
||||
timer.tv_sec = 0;
|
||||
timer.tv_usec = 500;
|
||||
timer.tv_usec = 500000;
|
||||
|
||||
orig_point = rl_point;
|
||||
rl_point = match_point;
|
||||
|
@ -9,10 +9,12 @@
|
||||
|
||||
#if defined (HAVE_POSIX_SIGSETJMP)
|
||||
# define procenv_t sigjmp_buf
|
||||
# undef setjmp
|
||||
# define setjmp(x) sigsetjmp((x), 1)
|
||||
# undef longjmp
|
||||
# define longjmp(x, n) siglongjmp((x), (n))
|
||||
# if !defined (__OPENNT)
|
||||
# undef setjmp
|
||||
# define setjmp(x) sigsetjmp((x), 1)
|
||||
# undef longjmp
|
||||
# define longjmp(x, n) siglongjmp((x), (n))
|
||||
# endif /* !__OPENNT */
|
||||
#else
|
||||
# define procenv_t jmp_buf
|
||||
#endif
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include "history.h"
|
||||
|
||||
#ifndef RL_LIBRARY_VERSION
|
||||
# define RL_LIBRARY_VERSION "2.2-bash"
|
||||
# define RL_LIBRARY_VERSION "4.0"
|
||||
#endif
|
||||
|
||||
/* Evaluates its arguments multiple times. */
|
||||
@ -83,7 +83,6 @@ extern void _rl_output_character_function ();
|
||||
#else
|
||||
extern int _rl_output_character_function ();
|
||||
#endif
|
||||
extern void _rl_get_screen_size ();
|
||||
|
||||
extern int _rl_enable_meta;
|
||||
extern int _rl_term_autowrap;
|
||||
@ -100,7 +99,6 @@ extern int alphabetic ();
|
||||
|
||||
/* Functions imported from bind.c. */
|
||||
extern void _rl_bind_if_unbound ();
|
||||
extern int rl_set_keymap_from_edit_mode ();
|
||||
|
||||
/* Functions imported from input.c. */
|
||||
extern int _rl_any_typein ();
|
||||
@ -118,9 +116,7 @@ extern void _rl_move_vert ();
|
||||
extern void _rl_update_final ();
|
||||
extern void _rl_clear_to_eol ();
|
||||
extern void _rl_clear_screen ();
|
||||
|
||||
extern void _rl_save_prompt ();
|
||||
extern void _rl_restore_prompt ();
|
||||
extern void _rl_erase_entire_line ();
|
||||
|
||||
extern void _rl_erase_at_end_of_line ();
|
||||
extern void _rl_move_cursor_relative ();
|
||||
@ -253,9 +249,14 @@ int rl_visible_prompt_length = 0;
|
||||
int rl_key_sequence_length = 0;
|
||||
|
||||
/* If non-zero, then this is the address of a function to call just
|
||||
before readline_internal () prints the first prompt. */
|
||||
before readline_internal_setup () prints the first prompt. */
|
||||
Function *rl_startup_hook = (Function *)NULL;
|
||||
|
||||
/* If non-zero, this is the address of a function to call just before
|
||||
readline_internal_setup () returns and readline_internal starts
|
||||
reading input characters. */
|
||||
Function *rl_pre_input_hook = (Function *)NULL;
|
||||
|
||||
/* What we use internally. You should always refer to RL_LINE_BUFFER. */
|
||||
static char *the_line;
|
||||
|
||||
@ -286,6 +287,9 @@ char *_rl_comment_begin;
|
||||
/* Keymap holding the function currently being executed. */
|
||||
Keymap rl_executing_keymap;
|
||||
|
||||
/* Non-zero means to erase entire line, including prompt, on empty input lines. */
|
||||
int rl_erase_empty_line = 0;
|
||||
|
||||
/* Line buffer and maintenence. */
|
||||
char *rl_line_buffer = (char *)NULL;
|
||||
int rl_line_buffer_len = 0;
|
||||
@ -388,6 +392,9 @@ readline_internal_setup ()
|
||||
rl_vi_insertion_mode (1, 0);
|
||||
#endif /* VI_MODE */
|
||||
}
|
||||
|
||||
if (rl_pre_input_hook)
|
||||
(*rl_pre_input_hook) ();
|
||||
}
|
||||
|
||||
STATIC_CALLBACK char *
|
||||
@ -405,7 +412,7 @@ readline_internal_teardown (eof)
|
||||
{
|
||||
temp = savestring (the_line);
|
||||
rl_revert_line (1, 0);
|
||||
entry = replace_history_entry (where_history (), the_line, (HIST_ENTRY *)NULL);
|
||||
entry = replace_history_entry (where_history (), the_line, (histdata_t)NULL);
|
||||
_rl_free_history_entry (entry);
|
||||
|
||||
strcpy (the_line, temp);
|
||||
@ -488,6 +495,12 @@ readline_internal_charloop ()
|
||||
if (rl_done == 0)
|
||||
(*rl_redisplay_function) ();
|
||||
|
||||
/* If the application writer has told us to erase the entire line if
|
||||
the only character typed was something bound to rl_newline, do so. */
|
||||
if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
|
||||
rl_point == 0 && rl_end == 0)
|
||||
_rl_erase_entire_line ();
|
||||
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
return 0;
|
||||
#else
|
||||
@ -501,7 +514,7 @@ readline_internal_charloop ()
|
||||
static int
|
||||
readline_internal_charloop ()
|
||||
{
|
||||
int eof;
|
||||
int eof = 1;
|
||||
|
||||
while (rl_done == 0)
|
||||
eof = readline_internal_char ();
|
||||
@ -837,11 +850,19 @@ rl_digit_loop ()
|
||||
{
|
||||
int key, c, sawminus, sawdigits;
|
||||
|
||||
_rl_save_prompt ();
|
||||
rl_save_prompt ();
|
||||
|
||||
sawminus = sawdigits = 0;
|
||||
while (1)
|
||||
{
|
||||
if (rl_numeric_arg > 1000000)
|
||||
{
|
||||
sawdigits = rl_explicit_arg = rl_numeric_arg = 0;
|
||||
ding ();
|
||||
rl_restore_prompt ();
|
||||
rl_clear_message ();
|
||||
return 1;
|
||||
}
|
||||
rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
|
||||
key = c = rl_read_key ();
|
||||
|
||||
@ -858,7 +879,7 @@ rl_digit_loop ()
|
||||
else
|
||||
{
|
||||
key = rl_read_key ();
|
||||
_rl_restore_prompt ();
|
||||
rl_restore_prompt ();
|
||||
rl_clear_message ();
|
||||
return (_rl_dispatch (key, _rl_keymap));
|
||||
}
|
||||
@ -881,7 +902,7 @@ rl_digit_loop ()
|
||||
/* Make M-- command equivalent to M--1 command. */
|
||||
if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0)
|
||||
rl_explicit_arg = 1;
|
||||
_rl_restore_prompt ();
|
||||
rl_restore_prompt ();
|
||||
rl_clear_message ();
|
||||
return (_rl_dispatch (key, _rl_keymap));
|
||||
}
|
||||
@ -1231,7 +1252,8 @@ rl_backward_word (count, key)
|
||||
|
||||
/* Clear the current line. Numeric argument to C-l does this. */
|
||||
int
|
||||
rl_refresh_line ()
|
||||
rl_refresh_line (ignore1, ignore2)
|
||||
int ignore1, ignore2;
|
||||
{
|
||||
int curr_line, nleft;
|
||||
|
||||
@ -1278,7 +1300,7 @@ rl_clear_screen (count, key)
|
||||
{
|
||||
if (rl_explicit_arg)
|
||||
{
|
||||
rl_refresh_line ();
|
||||
rl_refresh_line (count, key);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1428,6 +1450,11 @@ rl_newline (count, key)
|
||||
}
|
||||
#endif /* VI_MODE */
|
||||
|
||||
/* If we've been asked to erase empty lines, suppress the final update,
|
||||
since _rl_update_final calls crlf(). */
|
||||
if (rl_erase_empty_line && rl_point == 0 && rl_end == 0)
|
||||
return 0;
|
||||
|
||||
if (readline_echoing_p)
|
||||
_rl_update_final ();
|
||||
return 0;
|
||||
@ -1507,9 +1534,22 @@ rl_delete (count, key)
|
||||
}
|
||||
else
|
||||
return (rl_delete_text (rl_point, rl_point + 1));
|
||||
|
||||
}
|
||||
|
||||
/* Delete the character under the cursor, unless the insertion
|
||||
point is at the end of the line, in which case the character
|
||||
behind the cursor is deleted. COUNT is obeyed and may be used
|
||||
to delete forward or backward that many characters. */
|
||||
int
|
||||
rl_rubout_or_delete (count, key)
|
||||
int count, key;
|
||||
{
|
||||
if (rl_end != 0 && rl_point == rl_end)
|
||||
return (rl_rubout (count, key));
|
||||
else
|
||||
return (rl_delete (count, key));
|
||||
}
|
||||
|
||||
/* Delete all spaces and tabs around point. */
|
||||
int
|
||||
rl_delete_horizontal_space (count, ignore)
|
||||
@ -1533,6 +1573,19 @@ rl_delete_horizontal_space (count, ignore)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Like the tcsh editing function delete-char-or-list. The eof character
|
||||
is caught before this is invoked, so this really does the same thing as
|
||||
delete-char-or-list-or-eof, as long as it's bound to the eof character. */
|
||||
int
|
||||
rl_delete_or_show_completions (count, key)
|
||||
int count, key;
|
||||
{
|
||||
if (rl_end != 0 && rl_point == rl_end)
|
||||
return (rl_possible_completions (count, key));
|
||||
else
|
||||
return (rl_delete (count, key));
|
||||
}
|
||||
|
||||
#ifndef RL_COMMENT_BEGIN_DEFAULT
|
||||
#define RL_COMMENT_BEGIN_DEFAULT "#"
|
||||
#endif
|
||||
@ -1859,7 +1912,7 @@ maybe_replace_line ()
|
||||
/* If the current line has changed, save the changes. */
|
||||
if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list))
|
||||
{
|
||||
temp = replace_history_entry (where_history (), the_line, rl_undo_list);
|
||||
temp = replace_history_entry (where_history (), the_line, (histdata_t)rl_undo_list);
|
||||
free (temp->line);
|
||||
free (temp);
|
||||
}
|
||||
|
79
contrib/libreadline/rlstdc.h
Normal file
79
contrib/libreadline/rlstdc.h
Normal file
@ -0,0 +1,79 @@
|
||||
/* stdc.h -- macros to make source compile on both ANSI C and K&R C
|
||||
compilers. */
|
||||
|
||||
/* Copyright (C) 1993 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 1, or (at your option)
|
||||
any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#if !defined (_RL_STDC_H_)
|
||||
#define _RL_STDC_H_
|
||||
|
||||
/* Adapted from BSD /usr/include/sys/cdefs.h. */
|
||||
|
||||
/* A function can be defined using prototypes and compile on both ANSI C
|
||||
and traditional C compilers with something like this:
|
||||
extern char *func __P((char *, char *, int)); */
|
||||
|
||||
#if defined (__STDC__)
|
||||
|
||||
# if !defined (__P)
|
||||
# define __P(protos) protos
|
||||
# endif
|
||||
# define __STRING(x) #x
|
||||
|
||||
# if !defined (__GNUC__)
|
||||
# define inline
|
||||
# endif
|
||||
|
||||
#else /* !__STDC__ */
|
||||
|
||||
# if !defined (__P)
|
||||
# define __P(protos) ()
|
||||
# endif
|
||||
# define __STRING(x) "x"
|
||||
|
||||
#if defined (__GNUC__) /* gcc with -traditional */
|
||||
# if !defined (const)
|
||||
# define const __const
|
||||
# endif
|
||||
# if !defined (inline)
|
||||
# define inline __inline
|
||||
# endif
|
||||
# if !defined (signed)
|
||||
# define signed __signed
|
||||
# endif
|
||||
# if !defined (volatile)
|
||||
# define volatile __volatile
|
||||
# endif
|
||||
#else /* !__GNUC__ */
|
||||
# if !defined (const)
|
||||
# define const
|
||||
# endif
|
||||
# if !defined (inline)
|
||||
# define inline
|
||||
# endif
|
||||
# if !defined (signed)
|
||||
# define signed
|
||||
# endif
|
||||
# if !defined (volatile)
|
||||
# define volatile
|
||||
# endif
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
#endif /* !__STDC__ */
|
||||
|
||||
#endif /* !_RL_STDC_H_ */
|
@ -37,9 +37,9 @@
|
||||
|
||||
#include "rldefs.h"
|
||||
|
||||
#if !defined (SHELL) && defined (GWINSZ_IN_SYS_IOCTL)
|
||||
#if defined (GWINSZ_IN_SYS_IOCTL)
|
||||
# include <sys/ioctl.h>
|
||||
#endif /* !SHELL && GWINSZ_IN_SYS_IOCTL */
|
||||
#endif /* GWINSZ_IN_SYS_IOCTL */
|
||||
|
||||
#include "rltty.h"
|
||||
#include "readline.h"
|
||||
@ -144,7 +144,7 @@ static int terminal_prepped;
|
||||
static int ksrflow;
|
||||
#endif
|
||||
|
||||
#if !defined (SHELL) && defined (TIOCGWINSZ)
|
||||
#if defined (TIOCGWINSZ)
|
||||
/* Dummy call to force a backgrounded readline to stop before it tries
|
||||
to get the tty settings. */
|
||||
static void
|
||||
@ -156,9 +156,7 @@ set_winsize (tty)
|
||||
if (ioctl (tty, TIOCGWINSZ, &w) == 0)
|
||||
(void) ioctl (tty, TIOCSWINSZ, &w);
|
||||
}
|
||||
#else /* SHELL || !TIOCGWINSZ */
|
||||
# define set_winsize(tty)
|
||||
#endif /* SHELL || !TIOCGWINSZ */
|
||||
#endif /* TIOCGWINSZ */
|
||||
|
||||
#if defined (NEW_TTY_DRIVER)
|
||||
|
||||
@ -389,6 +387,7 @@ get_tty_settings (tty, tiop)
|
||||
TIOTYPE *tiop;
|
||||
{
|
||||
int ioctl_ret;
|
||||
|
||||
set_winsize (tty);
|
||||
|
||||
while (1)
|
||||
|
33
contrib/libreadline/savestring.c
Normal file
33
contrib/libreadline/savestring.c
Normal file
@ -0,0 +1,33 @@
|
||||
/* savestring.c */
|
||||
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library, a library for
|
||||
reading lines of text with interactive input and history editing.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 1, or
|
||||
(at your option) any later version.
|
||||
|
||||
The GNU Readline Library is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The GNU General Public License is often shipped with GNU software, and
|
||||
is generally kept in a file called COPYING or LICENSE. If you do not
|
||||
have a copy of the license, write to the Free Software Foundation,
|
||||
675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
extern char *strcpy ();
|
||||
extern char *xmalloc ();
|
||||
|
||||
/* Backwards compatibility, now that savestring has been removed from
|
||||
all `public' readline header files. */
|
||||
char *
|
||||
savestring (s)
|
||||
char *s;
|
||||
{
|
||||
return ((char *)strcpy (xmalloc (1 + (int)strlen (s)), (s)));
|
||||
}
|
@ -61,7 +61,6 @@ extern Function *rl_last_func;
|
||||
/* Functions imported from the rest of the library. */
|
||||
extern int _rl_free_history_entry ();
|
||||
extern char *_rl_make_prompt_for_search ();
|
||||
extern void _rl_restore_prompt ();
|
||||
extern void rl_extend_line_buffer ();
|
||||
|
||||
static char *noninc_search_string = (char *) NULL;
|
||||
@ -172,7 +171,7 @@ noninc_search (dir, pchar)
|
||||
rl_message (p, 0, 0);
|
||||
free (p);
|
||||
|
||||
#define SEARCH_RETURN _rl_restore_prompt (); return
|
||||
#define SEARCH_RETURN rl_restore_prompt (); return
|
||||
|
||||
/* Read the search string. */
|
||||
while (c = rl_read_key ())
|
||||
@ -241,7 +240,7 @@ noninc_search (dir, pchar)
|
||||
noninc_search_string = savestring (rl_line_buffer);
|
||||
}
|
||||
|
||||
_rl_restore_prompt ();
|
||||
rl_restore_prompt ();
|
||||
noninc_dosearch (noninc_search_string, dir);
|
||||
}
|
||||
|
||||
|
316
contrib/libreadline/shlib/Makefile.in
Normal file
316
contrib/libreadline/shlib/Makefile.in
Normal file
@ -0,0 +1,316 @@
|
||||
## -*- text -*- ##
|
||||
# Makefile for the GNU readline library shared library support.
|
||||
#
|
||||
# Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
RL_LIBRARY_VERSION = @LIBVERSION@
|
||||
RL_LIBRARY_NAME = readline
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = .:@top_srcdir@
|
||||
topdir = @top_srcdir@
|
||||
BUILD_DIR = @BUILD_DIR@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
CC = @CC@
|
||||
RANLIB = @RANLIB@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
RM = rm -f
|
||||
CP = cp
|
||||
MV = mv
|
||||
|
||||
SHELL = @MAKE_SHELL@
|
||||
|
||||
host_os = @host_os@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @libdir@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @CFLAGS@
|
||||
|
||||
DEFS = @DEFS@
|
||||
LOCAL_DEFS = @LOCAL_DEFS@
|
||||
|
||||
#
|
||||
# These values are generated for configure by ${topdir}/support/shobj-conf.
|
||||
# If your system is not supported by that script, but includes facilities for
|
||||
# dynamic loading of shared objects, please update the script and send the
|
||||
# changes to bash-maintainers@gnu.org.
|
||||
#
|
||||
SHOBJ_CC = @SHOBJ_CC@
|
||||
SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
|
||||
SHOBJ_LD = @SHOBJ_LD@
|
||||
|
||||
SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
|
||||
SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
|
||||
SHOBJ_LIBS = @SHOBJ_LIBS@
|
||||
|
||||
SHLIB_XLDFLAGS = @SHLIB_XLDFLAGS@
|
||||
SHLIB_LIBS = @SHLIB_LIBS@
|
||||
SHLIB_LIBSUFF = @SHLIB_LIBSUFF@
|
||||
|
||||
SHLIB_LIBVERSION = @SHLIB_LIBVERSION@
|
||||
|
||||
SHLIB_STATUS = @SHLIB_STATUS@
|
||||
|
||||
# shared library versioning
|
||||
SHLIB_MAJOR= 4
|
||||
# shared library systems like SVR4's do not use minor versions
|
||||
SHLIB_MINOR= .0
|
||||
|
||||
# For libraries which include headers from other libraries.
|
||||
INCLUDES = -I. -I.. -I$(topdir) -I$(includedir)
|
||||
|
||||
CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
|
||||
|
||||
.SUFFIXES: .so
|
||||
|
||||
.c.so:
|
||||
${RM} $@
|
||||
$(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_CFLAGS) -o $*.o $<
|
||||
$(MV) $*.o $@
|
||||
|
||||
# The name of the main library target.
|
||||
|
||||
SHARED_READLINE = libreadline.$(SHLIB_LIBVERSION)
|
||||
SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION)
|
||||
SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY)
|
||||
|
||||
# The C code source files for this library.
|
||||
CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \
|
||||
$(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \
|
||||
$(topdir)/complete.c $(topdir)/bind.c $(topdir)/isearch.c \
|
||||
$(topdir)/display.c $(topdir)/signals.c $(topdir)/emacs_keymap.c \
|
||||
$(topdir)/vi_keymap.c $(topdir)/util.c $(topdir)/kill.c \
|
||||
$(topdir)/undo.c $(topdir)/macro.c $(topdir)/input.c \
|
||||
$(topdir)/callback.c $(topdir)/terminal.c $(topdir)/xmalloc.c \
|
||||
$(topdir)/history.c $(topdir)/histsearch.c $(topdir)/histexpand.c \
|
||||
$(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \
|
||||
$(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c
|
||||
|
||||
# The header files for this library.
|
||||
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
|
||||
posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
|
||||
ansi_stdlib.h tcap.h
|
||||
|
||||
SHARED_HISTOBJ = history.so histexpand.so histfile.so histsearch.so shell.so
|
||||
SHARED_TILDEOBJ = tilde.so
|
||||
SHARED_OBJ = readline.so vi_mode.so funmap.so keymaps.so parens.so search.so \
|
||||
rltty.so complete.so bind.so isearch.so display.so signals.so \
|
||||
util.so kill.so undo.so macro.so input.so callback.so terminal.so \
|
||||
nls.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ)
|
||||
|
||||
##########################################################################
|
||||
|
||||
all: $(SHLIB_STATUS)
|
||||
|
||||
supported: $(SHARED_LIBS)
|
||||
|
||||
unsupported:
|
||||
@echo "Your system and compiler (${host_os}-${CC}) are not supported by the"
|
||||
@echo "${topdir}/support/shobj-conf script."
|
||||
@echo "If your operating system provides facilities for creating"
|
||||
@echo "shared libraries, please update the script and re-run configure.
|
||||
@echo "Please send the changes you made to bash-maintainers@gnu.org"
|
||||
@echo "for inclusion in future bash and readline releases."
|
||||
|
||||
$(SHARED_READLINE): $(SHARED_OBJ)
|
||||
$(RM) $@
|
||||
$(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS)
|
||||
|
||||
$(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so
|
||||
$(RM) $@
|
||||
$(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so $(SHLIB_LIBS)
|
||||
|
||||
installdirs: $(topdir)/support/mkdirs
|
||||
-$(SHELL) $(topdir)/support/mkdirs $(libdir)
|
||||
|
||||
install: installdirs $(SHLIB_STATUS)
|
||||
$(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(libdir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
|
||||
$(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(libdir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
|
||||
@echo install: you may need to run ldconfig
|
||||
|
||||
uninstall:
|
||||
$(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(libdir) -U $(SHARED_HISTORY)
|
||||
$(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(libdir) -U $(SHARED_READLINE)
|
||||
@echo uninstall: you may need to run ldconfig
|
||||
|
||||
clean mostlyclean: force
|
||||
$(RM) $(SHARED_OBJ) $(SHARED_LIBS)
|
||||
|
||||
distclean maintainer-clean: clean
|
||||
$(RM) Makefile
|
||||
|
||||
force:
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
# Dependencies
|
||||
bind.so: $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h
|
||||
bind.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
bind.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
bind.so: $(topdir)/tilde.h $(topdir)/history.h
|
||||
callback.so: $(topdir)/rlconf.h
|
||||
callback.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h
|
||||
callback.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
callback.so: $(topdir)/tilde.h
|
||||
complete.so: $(topdir)/ansi_stdlib.h posixdir.h $(topdir)/posixstat.h
|
||||
complete.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
complete.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
complete.so: $(topdir)/tilde.h
|
||||
display.so: $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h
|
||||
display.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
display.so: $(topdir)/tcap.h
|
||||
display.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
display.so: $(topdir)/tilde.h $(topdir)/history.h
|
||||
funmap.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
funmap.so: $(topdir)/rlconf.h $(topdir)/ansi_stdlib.h
|
||||
funmap.so: ${BUILD_DIR}/config.h $(topdir)/tilde.h
|
||||
histexpand.so: $(topdir)/ansi_stdlib.h
|
||||
histexpand.so: $(topdir)/history.h histlib.h
|
||||
histexpand.so: ${BUILD_DIR}/config.h
|
||||
histfile.so: $(topdir)/ansi_stdlib.h
|
||||
histfile.so: $(topdir)/history.h histlib.h
|
||||
histfile.so: ${BUILD_DIR}/config.h
|
||||
history.so: $(topdir)/ansi_stdlib.h
|
||||
history.so: $(topdir)/history.h histlib.h
|
||||
history.so: ${BUILD_DIR}/config.h
|
||||
histsearch.so: $(topdir)/ansi_stdlib.h
|
||||
histsearch.so: $(topdir)/history.h histlib.h
|
||||
histsearch.so: ${BUILD_DIR}/config.h
|
||||
input.so: $(topdir)/ansi_stdlib.h
|
||||
input.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
input.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
input.so: $(topdir)/tilde.h
|
||||
isearch.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
isearch.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
isearch.so: $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h
|
||||
keymaps.so: emacs_keymap.c vi_keymap.c
|
||||
keymaps.so: $(topdir)/keymaps.h $(topdir)/chardefs.h $(topdir)/rlconf.h
|
||||
keymaps.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
keymaps.so: ${BUILD_DIR}/config.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h
|
||||
kill.so: $(topdir)/ansi_stdlib.h
|
||||
kill.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
kill.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
kill.so: $(topdir)/tilde.h $(topdir)/history.h
|
||||
macro.so: $(topdir)/ansi_stdlib.h
|
||||
macro.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
macro.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
macro.so: $(topdir)/tilde.h $(topdir)/history.h
|
||||
nls.so: $(topdir)/ansi_stdlib.h
|
||||
nls.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
parens.so: $(topdir)/rlconf.h ${BUILD_DIR}/config.h
|
||||
parens.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
parens.so: $(topdir)/tilde.h
|
||||
readline.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
readline.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
readline.so: $(topdir)/history.h $(topdir)/tilde.h
|
||||
readline.so: $(topdir)/posixstat.h $(topdir)/ansi_stdlib.h $(topdir)/posixjmp.h
|
||||
rltty.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
rltty.so: $(topdir)/rltty.h $(topdir)/tilde.h
|
||||
rltty.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
search.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
search.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
search.so: $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h
|
||||
signals.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
signals.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
signals.so: $(topdir)/history.h $(topdir)/tilde.h
|
||||
terminal.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
terminal.so: $(topdir)/tcap.h
|
||||
terminal.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
terminal.so: $(topdir)/tilde.h $(topdir)/history.h
|
||||
tilde.so: $(topdir)/ansi_stdlib.h ${BUILD_DIR}/config.h $(topdir)/tilde.h
|
||||
undo.so: $(topdir)/ansi_stdlib.h
|
||||
undo.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
undo.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
undo.so: $(topdir)/tilde.h $(topdir)/history.h
|
||||
util.so: $(topdir)/posixjmp.h $(topdir)/ansi_stdlib.h
|
||||
util.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
util.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
util.so: $(topdir)/tilde.h
|
||||
vi_mode.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h
|
||||
vi_mode.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h
|
||||
vi_mode.so: $(topdir)/history.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h
|
||||
xmalloc.so: ${BUILD_DIR}/config.h
|
||||
xmalloc.so: $(topdir)/ansi_stdlib.h
|
||||
|
||||
readline.so: $(topdir)/readline.c
|
||||
vi_mode.so: $(topdir)/vi_mode.c
|
||||
funmap.so: $(topdir)/funmap.c
|
||||
keymaps.so: $(topdir)/keymaps.c
|
||||
parens.so: $(topdir)/parens.c
|
||||
search.so: $(topdir)/search.c
|
||||
rltty.so: $(topdir)/rltty.c
|
||||
complete.so: $(topdir)/complete.c
|
||||
bind.so: $(topdir)/bind.c
|
||||
isearch.so: $(topdir)/isearch.c
|
||||
display.so: $(topdir)/display.c
|
||||
signals.so: $(topdir)/signals.c
|
||||
util.so: $(topdir)/util.c
|
||||
kill.so: $(topdir)/kill.c
|
||||
undo.so: $(topdir)/undo.c
|
||||
macro.so: $(topdir)/macro.c
|
||||
input.so: $(topdir)/input.c
|
||||
callback.so: $(topdir)/callback.c
|
||||
terminal.so: $(topdir)/terminal.c
|
||||
nls.so: $(topdir)/nls.c
|
||||
xmalloc.so: $(topdir)/xmalloc.c
|
||||
history.so: $(topdir)/history.c
|
||||
histexpand.so: $(topdir)/histexpand.c
|
||||
histfile.so: $(topdir)/histfile.c
|
||||
histsearch.so: $(topdir)/histsearch.c
|
||||
savestring.so: $(topdir)/savestring.c
|
||||
shell.so: $(topdir)/shell.c
|
||||
tilde.so: $(topdir)/tilde.c
|
||||
|
||||
readline.so: readline.c
|
||||
vi_mode.so: vi_mode.c
|
||||
funmap.so: funmap.c
|
||||
keymaps.so: keymaps.c
|
||||
parens.so: parens.c
|
||||
search.so: search.c
|
||||
rltty.so: rltty.c
|
||||
complete.so: complete.c
|
||||
bind.so: bind.c
|
||||
isearch.so: isearch.c
|
||||
display.so: display.c
|
||||
signals.so: signals.c
|
||||
util.so: util.c
|
||||
kill.so: kill.c
|
||||
undo.so: undo.c
|
||||
macro.so: macro.c
|
||||
input.so: input.c
|
||||
callback.so: callback.c
|
||||
terminal.so: terminal.c
|
||||
nls.so: nls.c
|
||||
xmalloc.so: xmalloc.c
|
||||
history.so: history.c
|
||||
histexpand.so: histexpand.c
|
||||
histfile.so: histfile.c
|
||||
histsearch.so: histsearch.c
|
||||
savestring.so: savestring.c
|
||||
shell.so: shell.c
|
||||
tilde.so: tilde.c
|
@ -49,18 +49,6 @@
|
||||
#include "readline.h"
|
||||
#include "history.h"
|
||||
|
||||
extern int readline_echoing_p;
|
||||
extern int rl_pending_input;
|
||||
extern int _rl_meta_flag;
|
||||
|
||||
extern void free_undo_list ();
|
||||
extern void _rl_get_screen_size ();
|
||||
extern void _rl_redisplay_after_sigwinch ();
|
||||
extern void _rl_clean_up_for_exit ();
|
||||
extern void _rl_kill_kbd_macro ();
|
||||
extern void _rl_init_argument ();
|
||||
extern void rl_deprep_terminal (), rl_prep_terminal ();
|
||||
|
||||
#if !defined (RETSIGTYPE)
|
||||
# if defined (VOID_SIGHANDLER)
|
||||
# define RETSIGTYPE void
|
||||
@ -79,40 +67,52 @@ extern void rl_deprep_terminal (), rl_prep_terminal ();
|
||||
to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
|
||||
typedef RETSIGTYPE SigHandler ();
|
||||
|
||||
extern int readline_echoing_p;
|
||||
extern int rl_pending_input;
|
||||
extern int _rl_meta_flag;
|
||||
|
||||
extern void free_undo_list ();
|
||||
extern void _rl_get_screen_size ();
|
||||
extern void _rl_redisplay_after_sigwinch ();
|
||||
extern void _rl_clean_up_for_exit ();
|
||||
extern void _rl_kill_kbd_macro ();
|
||||
extern void _rl_init_argument ();
|
||||
extern void rl_deprep_terminal (), rl_prep_terminal ();
|
||||
|
||||
static SigHandler *rl_set_sighandler ();
|
||||
|
||||
/* Exported variables for use by applications. */
|
||||
|
||||
/* If non-zero, readline will install its own signal handlers for
|
||||
SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */
|
||||
int rl_catch_signals = 1;
|
||||
|
||||
/* If non-zero, readline will install a signal handler for SIGWINCH. */
|
||||
#ifdef SIGWINCH
|
||||
int rl_catch_sigwinch = 1;
|
||||
#endif
|
||||
|
||||
static int signals_set_flag;
|
||||
static int sigwinch_set_flag;
|
||||
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
/* Signal Handling */
|
||||
/* */
|
||||
/* **************************************************************** */
|
||||
|
||||
/* If we're not being compiled as part of bash, initialize handlers for
|
||||
and catch the job control signals (SIGTTIN, SIGTTOU, SIGTSTP) and
|
||||
SIGTERM. */
|
||||
#if !defined (SHELL)
|
||||
# define HANDLE_JOB_SIGNALS
|
||||
# define HANDLE_SIGTERM
|
||||
#endif /* !SHELL */
|
||||
|
||||
#if defined (HAVE_POSIX_SIGNALS)
|
||||
typedef struct sigaction sighandler_cxt;
|
||||
# define rl_sigaction(s, nh, oh) sigaction(s, nh, oh)
|
||||
#else
|
||||
typedef struct { SigHandler *sa_handler; } sighandler_cxt;
|
||||
typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt;
|
||||
# define sigemptyset(m)
|
||||
#endif /* !HAVE_POSIX_SIGNALS */
|
||||
|
||||
static sighandler_cxt old_int, old_alrm;
|
||||
|
||||
#if defined (HANDLE_JOB_SIGNALS)
|
||||
static sighandler_cxt old_int, old_term, old_alrm, old_quit;
|
||||
#if defined (SIGTSTP)
|
||||
static sighandler_cxt old_tstp, old_ttou, old_ttin;
|
||||
#endif /* HANDLE_JOB_SIGNALS */
|
||||
|
||||
#if defined (HANDLE_SIGTERM)
|
||||
static sighandler_cxt old_term;
|
||||
#endif
|
||||
|
||||
#if defined (SIGWINCH)
|
||||
static sighandler_cxt old_winch;
|
||||
#endif
|
||||
@ -143,18 +143,8 @@ rl_signal_handler (sig)
|
||||
switch (sig)
|
||||
{
|
||||
case SIGINT:
|
||||
{
|
||||
register HIST_ENTRY *entry;
|
||||
|
||||
free_undo_list ();
|
||||
|
||||
entry = current_history ();
|
||||
if (entry)
|
||||
entry->data = (char *)NULL;
|
||||
}
|
||||
_rl_kill_kbd_macro ();
|
||||
rl_clear_message ();
|
||||
_rl_init_argument ();
|
||||
rl_free_line_state ();
|
||||
/* FALLTHROUGH */
|
||||
|
||||
#if defined (SIGTSTP)
|
||||
case SIGTSTP:
|
||||
@ -163,10 +153,8 @@ rl_signal_handler (sig)
|
||||
#endif /* SIGTSTP */
|
||||
case SIGALRM:
|
||||
case SIGTERM:
|
||||
_rl_clean_up_for_exit ();
|
||||
(*rl_deprep_term_function) ();
|
||||
rl_clear_signals ();
|
||||
rl_pending_input = 0;
|
||||
case SIGQUIT:
|
||||
rl_cleanup_after_signal ();
|
||||
|
||||
#if defined (HAVE_POSIX_SIGNALS)
|
||||
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
|
||||
@ -188,8 +176,7 @@ rl_signal_handler (sig)
|
||||
# endif /* HAVE_BSD_SIGNALS */
|
||||
#endif /* !HAVE_POSIX_SIGNALS */
|
||||
|
||||
(*rl_prep_term_function) (_rl_meta_flag);
|
||||
rl_set_signals ();
|
||||
rl_reset_after_signal ();
|
||||
}
|
||||
|
||||
SIGHANDLER_RETURN;
|
||||
@ -197,7 +184,7 @@ rl_signal_handler (sig)
|
||||
|
||||
#if defined (SIGWINCH)
|
||||
static RETSIGTYPE
|
||||
rl_handle_sigwinch (sig)
|
||||
rl_sigwinch_handler (sig)
|
||||
int sig;
|
||||
{
|
||||
SigHandler *oh;
|
||||
@ -209,14 +196,10 @@ rl_handle_sigwinch (sig)
|
||||
disposition set by the calling application. We need this state
|
||||
because we call the application's SIGWINCH handler after updating
|
||||
our own idea of the screen size. */
|
||||
rl_set_sighandler (SIGWINCH, rl_handle_sigwinch, &dummy_winch);
|
||||
rl_set_sighandler (SIGWINCH, rl_sigwinch_handler, &dummy_winch);
|
||||
#endif
|
||||
|
||||
if (readline_echoing_p)
|
||||
{
|
||||
_rl_get_screen_size (fileno (rl_instream), 1);
|
||||
_rl_redisplay_after_sigwinch ();
|
||||
}
|
||||
rl_resize_terminal ();
|
||||
|
||||
/* If another sigwinch handler has been installed, call it. */
|
||||
oh = (SigHandler *)old_winch.sa_handler;
|
||||
@ -263,62 +246,66 @@ rl_set_sighandler (sig, handler, ohandler)
|
||||
return (ohandler->sa_handler);
|
||||
}
|
||||
|
||||
static void
|
||||
rl_maybe_set_sighandler (sig, handler, ohandler)
|
||||
int sig;
|
||||
SigHandler *handler;
|
||||
sighandler_cxt *ohandler;
|
||||
{
|
||||
sighandler_cxt dummy;
|
||||
SigHandler *oh;
|
||||
|
||||
sigemptyset (&dummy.sa_mask);
|
||||
oh = rl_set_sighandler (sig, handler, ohandler);
|
||||
if (oh == (SigHandler *)SIG_IGN)
|
||||
rl_sigaction (sig, ohandler, &dummy);
|
||||
}
|
||||
|
||||
int
|
||||
rl_set_signals ()
|
||||
{
|
||||
sighandler_cxt dummy;
|
||||
SigHandler *oh;
|
||||
|
||||
#if defined (HAVE_POSIX_SIGNALS)
|
||||
sigemptyset (&dummy.sa_mask);
|
||||
#endif
|
||||
if (rl_catch_signals && signals_set_flag == 0)
|
||||
{
|
||||
rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
|
||||
rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term);
|
||||
rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit);
|
||||
|
||||
oh = rl_set_sighandler (SIGINT, rl_signal_handler, &old_int);
|
||||
if (oh == (SigHandler *)SIG_IGN)
|
||||
rl_sigaction (SIGINT, &old_int, &dummy);
|
||||
|
||||
oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm);
|
||||
if (oh == (SigHandler *)SIG_IGN)
|
||||
rl_sigaction (SIGALRM, &old_alrm, &dummy);
|
||||
oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm);
|
||||
if (oh == (SigHandler *)SIG_IGN)
|
||||
rl_sigaction (SIGALRM, &old_alrm, &dummy);
|
||||
#if defined (HAVE_POSIX_SIGNALS) && defined (SA_RESTART)
|
||||
/* If the application using readline has already installed a signal
|
||||
handler with SA_RESTART, SIGALRM will cause reads to be restarted
|
||||
automatically, so readline should just get out of the way. Since
|
||||
we tested for SIG_IGN above, we can just test for SIG_DFL here. */
|
||||
if (oh != (SigHandler *)SIG_DFL && (old_alrm.sa_flags & SA_RESTART))
|
||||
rl_sigaction (SIGALRM, &old_alrm, &dummy);
|
||||
/* If the application using readline has already installed a signal
|
||||
handler with SA_RESTART, SIGALRM will cause reads to be restarted
|
||||
automatically, so readline should just get out of the way. Since
|
||||
we tested for SIG_IGN above, we can just test for SIG_DFL here. */
|
||||
if (oh != (SigHandler *)SIG_DFL && (old_alrm.sa_flags & SA_RESTART))
|
||||
rl_sigaction (SIGALRM, &old_alrm, &dummy);
|
||||
#endif /* HAVE_POSIX_SIGNALS */
|
||||
|
||||
#if defined (HANDLE_JOB_SIGNALS)
|
||||
|
||||
#if defined (SIGTSTP)
|
||||
oh = rl_set_sighandler (SIGTSTP, rl_signal_handler, &old_tstp);
|
||||
if (oh == (SigHandler *)SIG_IGN)
|
||||
rl_sigaction (SIGTSTP, &old_tstp, &dummy);
|
||||
#else
|
||||
oh = (SigHandler *)NULL;
|
||||
rl_maybe_set_sighandler (SIGTSTP, rl_signal_handler, &old_tstp);
|
||||
#endif /* SIGTSTP */
|
||||
|
||||
#if defined (SIGTTOU)
|
||||
rl_set_sighandler (SIGTTOU, rl_signal_handler, &old_ttou);
|
||||
rl_set_sighandler (SIGTTIN, rl_signal_handler, &old_ttin);
|
||||
|
||||
if (oh == (SigHandler *)SIG_IGN)
|
||||
{
|
||||
rl_set_sighandler (SIGTTOU, SIG_IGN, &dummy);
|
||||
rl_set_sighandler (SIGTTIN, SIG_IGN, &dummy);
|
||||
}
|
||||
rl_maybe_set_sighandler (SIGTTOU, rl_signal_handler, &old_ttou);
|
||||
#endif /* SIGTTOU */
|
||||
|
||||
#endif /* HANDLE_JOB_SIGNALS */
|
||||
#if defined (SIGTTIN)
|
||||
rl_maybe_set_sighandler (SIGTTIN, rl_signal_handler, &old_ttin);
|
||||
#endif /* SIGTTIN */
|
||||
|
||||
#if defined (HANDLE_SIGTERM)
|
||||
/* Handle SIGTERM if we're not being compiled as part of bash. */
|
||||
rl_set_sighandler (SIGTERM, rl_signal_handler, &old_term);
|
||||
#endif /* HANDLE_SIGTERM */
|
||||
signals_set_flag = 1;
|
||||
}
|
||||
|
||||
#if defined (SIGWINCH)
|
||||
rl_set_sighandler (SIGWINCH, rl_handle_sigwinch, &old_winch);
|
||||
if (rl_catch_sigwinch && sigwinch_set_flag == 0)
|
||||
{
|
||||
rl_maybe_set_sighandler (SIGWINCH, rl_sigwinch_handler, &old_winch);
|
||||
sigwinch_set_flag = 1;
|
||||
}
|
||||
#endif /* SIGWINCH */
|
||||
|
||||
return 0;
|
||||
@ -329,35 +316,79 @@ rl_clear_signals ()
|
||||
{
|
||||
sighandler_cxt dummy;
|
||||
|
||||
#if defined (HAVE_POSIX_SIGNALS)
|
||||
sigemptyset (&dummy.sa_mask);
|
||||
#endif
|
||||
if (rl_catch_signals && signals_set_flag == 1)
|
||||
{
|
||||
sigemptyset (&dummy.sa_mask);
|
||||
|
||||
rl_sigaction (SIGINT, &old_int, &dummy);
|
||||
rl_sigaction (SIGALRM, &old_alrm, &dummy);
|
||||
|
||||
#if defined (HANDLE_JOB_SIGNALS)
|
||||
rl_sigaction (SIGINT, &old_int, &dummy);
|
||||
rl_sigaction (SIGTERM, &old_term, &dummy);
|
||||
rl_sigaction (SIGQUIT, &old_quit, &dummy);
|
||||
rl_sigaction (SIGALRM, &old_alrm, &dummy);
|
||||
|
||||
#if defined (SIGTSTP)
|
||||
rl_sigaction (SIGTSTP, &old_tstp, &dummy);
|
||||
#endif
|
||||
rl_sigaction (SIGTSTP, &old_tstp, &dummy);
|
||||
#endif /* SIGTSTP */
|
||||
|
||||
#if defined (SIGTTOU)
|
||||
rl_sigaction (SIGTTOU, &old_ttou, &dummy);
|
||||
rl_sigaction (SIGTTIN, &old_ttin, &dummy);
|
||||
rl_sigaction (SIGTTOU, &old_ttou, &dummy);
|
||||
#endif /* SIGTTOU */
|
||||
|
||||
#endif /* HANDLE_JOB_SIGNALS */
|
||||
#if defined (SIGTTIN)
|
||||
rl_sigaction (SIGTTIN, &old_ttin, &dummy);
|
||||
#endif /* SIGTTIN */
|
||||
|
||||
#if defined (HANDLE_SIGTERM)
|
||||
rl_sigaction (SIGTERM, &old_term, &dummy);
|
||||
#endif /* HANDLE_SIGTERM */
|
||||
signals_set_flag = 0;
|
||||
}
|
||||
|
||||
#if defined (SIGWINCH)
|
||||
sigemptyset (&dummy.sa_mask);
|
||||
rl_sigaction (SIGWINCH, &old_winch, &dummy);
|
||||
if (rl_catch_sigwinch && sigwinch_set_flag == 1)
|
||||
{
|
||||
sigemptyset (&dummy.sa_mask);
|
||||
rl_sigaction (SIGWINCH, &old_winch, &dummy);
|
||||
sigwinch_set_flag = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Clean up the terminal and readline state after catching a signal, before
|
||||
resending it to the calling application. */
|
||||
void
|
||||
rl_cleanup_after_signal ()
|
||||
{
|
||||
_rl_clean_up_for_exit ();
|
||||
(*rl_deprep_term_function) ();
|
||||
rl_clear_signals ();
|
||||
rl_pending_input = 0;
|
||||
}
|
||||
|
||||
/* Reset the terminal and readline state after a signal handler returns. */
|
||||
void
|
||||
rl_reset_after_signal ()
|
||||
{
|
||||
(*rl_prep_term_function) (_rl_meta_flag);
|
||||
rl_set_signals ();
|
||||
}
|
||||
|
||||
/* Free up the readline variable line state for the current line (undo list,
|
||||
any partial history entry, any keyboard macros in progress, and any
|
||||
numeric arguments in process) after catching a signal, before calling
|
||||
rl_cleanup_after_signal(). */
|
||||
void
|
||||
rl_free_line_state ()
|
||||
{
|
||||
register HIST_ENTRY *entry;
|
||||
|
||||
free_undo_list ();
|
||||
|
||||
entry = current_history ();
|
||||
if (entry)
|
||||
entry->data = (char *)NULL;
|
||||
|
||||
_rl_kill_kbd_macro ();
|
||||
rl_clear_message ();
|
||||
_rl_init_argument ();
|
||||
}
|
||||
|
||||
#endif /* HANDLE_SIGNALS */
|
||||
|
26
contrib/libreadline/support/config.guess
vendored
26
contrib/libreadline/support/config.guess
vendored
@ -151,6 +151,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:QNX:*:42*)
|
||||
echo i386-qssl-qnx`echo ${UNAME_VERSION}`
|
||||
exit 0 ;;
|
||||
BeBox:BeOS:*:*)
|
||||
echo powerpc-be-beos
|
||||
exit 0 ;;
|
||||
BeMac:BeOS:*:*)
|
||||
echo powerpc-apple-beos
|
||||
exit 0 ;;
|
||||
BePC:BeOS:*:*)
|
||||
echo i586-pc-beos
|
||||
exit 0 ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# end cases added for Bash
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
@ -213,6 +225,9 @@ EOF
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-cbm-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@ -315,10 +330,10 @@ EOF
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power?Macintosh:Rhapsody:*:*)
|
||||
echo powerpc-apple-nextstep${UNAME_RELEASE}
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-nextstep${UNAME_RELEASE}
|
||||
echo ${UNAME_MACHINE}-unknown-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
@ -737,6 +752,11 @@ EOF
|
||||
i?86:DYNIX/ptx:4*:*)
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
# added by chet for bash based on usenet posting from <hops@sco.com> and
|
||||
# documentation on SCO's web site -- UnixWare 7 (SVR5)
|
||||
i?86:UnixWare:5*:*)
|
||||
echo ${UNAME_MACHINE}-pc-sysv5uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
@ -862,7 +882,7 @@ EOF
|
||||
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
|
69
contrib/libreadline/support/config.sub
vendored
69
contrib/libreadline/support/config.sub
vendored
@ -94,7 +94,7 @@ case $os in
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple)
|
||||
-apple )
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
@ -102,7 +102,7 @@ case $os in
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco5)
|
||||
os=sco3.2v5
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
@ -175,7 +175,8 @@ case $basic_machine in
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
|
||||
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
|
||||
| alpha-* | we32k-* | cydra-* | ns16k-* \
|
||||
| alpha-* | alphaev5-* | alphaev56-* | alphapca56-* | alphaev6-* \
|
||||
| we32k-* | cydra-* | ns16k-* \
|
||||
| pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
|
||||
| pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* | f301-* \
|
||||
@ -183,7 +184,7 @@ case $basic_machine in
|
||||
| cadmus-* | ews*-nec | ibmrt-ibm* | masscomp-masscomp \
|
||||
| tandem-* | symmetric-* | drs6000-icl | *-*ardent | gould-gould \
|
||||
| concurrent-* | ksr1-* | esa-ibm | fxc-alliant | *370-amdahl \
|
||||
| *-convex)
|
||||
| *-convex | sx4*-nec)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@ -208,7 +209,12 @@ case $basic_machine in
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
# basic_machine=m68k-cbm
|
||||
basic_machine=m68k-unknown
|
||||
;;
|
||||
amigaos)
|
||||
basic_machine=m68k-unknown
|
||||
os=-amigaos
|
||||
;;
|
||||
amigados)
|
||||
basic_machine=m68k-cbm
|
||||
@ -404,6 +410,14 @@ case $basic_machine in
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
@ -454,6 +468,14 @@ case $basic_machine in
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
osr5 | sco5) # SCO Open Server
|
||||
basic_machine=i386-pc
|
||||
os=-sco3.2v5
|
||||
;;
|
||||
odt | odt3 | odt4) # SCO Open Desktop
|
||||
basic_machine=i386-pc
|
||||
os=-sco3.2v4
|
||||
;;
|
||||
pa-hitachi)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
@ -584,6 +606,14 @@ case $basic_machine in
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
uw2 | unixware | unixware2)
|
||||
basic_machine=i386-pc
|
||||
os=-sysv4.2uw2.1
|
||||
;;
|
||||
uw7 | unixware7)
|
||||
basic_machine=i386-pc
|
||||
os=-sysv5uw7
|
||||
;;
|
||||
vaxv)
|
||||
basic_machine=vax-dec
|
||||
os=-sysv
|
||||
@ -622,7 +652,11 @@ case $basic_machine in
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
mips)
|
||||
basic_machine=mips-mips
|
||||
if test "x$os" = "x-linux" ; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
fi
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
@ -683,9 +717,15 @@ case $os in
|
||||
-solaris)
|
||||
os=-solaris2
|
||||
;;
|
||||
-unixware* | svr4*)
|
||||
svr4*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-unixware | -uw | -unixware2* | -uw2*)
|
||||
os=-sysv4.2uw2.1
|
||||
;;
|
||||
-unixware7* | -uw7*)
|
||||
os=-sysv5uw7
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||
;;
|
||||
@ -696,7 +736,7 @@ case $os in
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
@ -704,7 +744,8 @@ case $os in
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -linux-gnu* | -uxpv* | -qnx* | -powerux)
|
||||
| -linux-gnu* | -uxpv* | -qnx* | -powerux* | -beos* | -rhapsody* \
|
||||
| -superux* )
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
||||
@ -759,7 +800,10 @@ case $os in
|
||||
-sysvr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
# This must come after -sysvr4.
|
||||
-sysvr5)
|
||||
os=-sysv5
|
||||
;;
|
||||
# This must come after -sysvr[45].
|
||||
-sysv*)
|
||||
;;
|
||||
-xenix)
|
||||
@ -817,6 +861,9 @@ case $basic_machine in
|
||||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
@ -830,7 +877,7 @@ case $basic_machine in
|
||||
os=-sysv
|
||||
;;
|
||||
*-cbm)
|
||||
os=-amigados
|
||||
os=-amigaos
|
||||
;;
|
||||
*-dg)
|
||||
os=-dgux
|
||||
|
@ -48,7 +48,7 @@ fi
|
||||
version=$1
|
||||
newdir=${ROOTNAME}-$version
|
||||
|
||||
vmsg creating distribution for version $version in $newdir
|
||||
vmsg creating distribution for $ROOTNAME version $version in $newdir
|
||||
|
||||
if [ ! -d $newdir ]; then
|
||||
mkdir $newdir || { echo $0: cannot make directory $newdir 1>&2 ; exit 1; }
|
||||
|
105
contrib/libreadline/support/shlib-install
Executable file
105
contrib/libreadline/support/shlib-install
Executable file
@ -0,0 +1,105 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# shlib-install - install a shared library and do any necessary host-specific
|
||||
# post-installation configuration (like ldconfig)
|
||||
#
|
||||
# usage: shlib-install [-D] -O host_os -d installation-dir -i install-prog [-U] library
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet@po.cwru.edu
|
||||
|
||||
#
|
||||
# defaults
|
||||
#
|
||||
INSTALLDIR=/usr/local/lib
|
||||
LDCONFIG=ldconfig
|
||||
|
||||
PROGNAME=`basename $0`
|
||||
USAGE="$PROGNAME [-D] -O host_os -d installation-dir -i install-prog [-U] library"
|
||||
|
||||
# process options
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-O) shift; host_os="$1"; shift ;;
|
||||
-d) shift; INSTALLDIR="$1"; shift ;;
|
||||
-i) shift; INSTALLPROG="$1" ; shift ;;
|
||||
-D) echo=echo ; shift ;;
|
||||
-U) uninstall=true ; shift ;;
|
||||
-*) echo "$USAGE" >&2 ; exit 2;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# set install target name
|
||||
LIBNAME="$1"
|
||||
|
||||
if [ -z "$LIBNAME" ]; then
|
||||
echo "$USAGE" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
OLDSUFF=old
|
||||
MV=mv
|
||||
RM="rm -f"
|
||||
LN="ln -s"
|
||||
|
||||
# pre-install
|
||||
|
||||
if [ -z "$uninstall" ]; then
|
||||
${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
||||
if [ -f "$INSTALLDIR/$LIBNAME" ]; then
|
||||
${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}${OLDSUFF}
|
||||
fi
|
||||
fi
|
||||
|
||||
# install/uninstall
|
||||
|
||||
if [ -z "$uninstall" ] ; then
|
||||
${echo} eval ${INSTALLPROG} $LIBNAME ${INSTALLDIR}/${LIBNAME}
|
||||
else
|
||||
${echo} ${RM} ${INSTALLDIR}/${LIBNAME}
|
||||
fi
|
||||
|
||||
# post-install/uninstall
|
||||
|
||||
case "$LIBNAME" in
|
||||
*.*.[0-9].[0-9]) # libname.so.M.N
|
||||
LINK2=`echo $LIBNAME | sed 's:\(.*\..*\.[0-9]\)\.[0-9]:\1:'` # libname.so.M
|
||||
LINK1=`echo $LIBNAME | sed 's:\(.*\..*\)\.[0-9]\.[0-9]:\1:'` # libname.so
|
||||
;;
|
||||
*.*.[0-9]) # libname.so.M
|
||||
LINK1=`echo $LIBNAME | sed 's:\(.*\..*\)\.[0-9]:\1:'` # libname.so
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Create symlinks to the installed library. This section is incomplete.
|
||||
#
|
||||
case "$host_os" in
|
||||
*linux*|bsdi4*)
|
||||
# libname.so.M -> libname.so.M.N
|
||||
${echo} ${RM} ${INSTALLDIR}/$LINK2
|
||||
if [ -z "$uninstall" ]; then
|
||||
${echo} ln -s $INSTALLDIR/$LIBNAME ${INSTALLDIR}/$LINK2
|
||||
fi
|
||||
|
||||
# libname.so -> libname.so.M.N
|
||||
${echo} ${RM} ${INSTALLDIR}/$LINK1
|
||||
if [ -z "$uninstall" ]; then
|
||||
${echo} ln -s $INSTALLDIR/$LIBNAME ${INSTALLDIR}/$LINK1
|
||||
fi
|
||||
;;
|
||||
|
||||
solaris2*|aix4.[2-9]*|hpux1*)
|
||||
# libname.so -> libname.so.M
|
||||
${echo} ${RM} ${INSTALLDIR}/$LINK1
|
||||
if [ -z "$uninstall" ]; then
|
||||
${echo} ln -s $INSTALLDIR/$LIBNAME ${INSTALLDIR}/$LINK1
|
||||
fi
|
||||
;;
|
||||
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
exit 0
|
341
contrib/libreadline/support/shobj-conf
Executable file
341
contrib/libreadline/support/shobj-conf
Executable file
@ -0,0 +1,341 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# shobj-conf -- output a series of variable assignments to be substituted
|
||||
# into a Makefile by configure which specify system-dependent
|
||||
# information for creating shared objects that may be loaded
|
||||
# into bash with `enable -f'
|
||||
#
|
||||
# usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet@po.cwru.edu
|
||||
|
||||
#
|
||||
# defaults
|
||||
#
|
||||
SHOBJ_STATUS=supported
|
||||
SHLIB_STATUS=supported
|
||||
|
||||
SHOBJ_CC=cc
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=
|
||||
SHOBJ_LDFLAGS=
|
||||
SHOBJ_XLDFLAGS=
|
||||
SHOBJ_LIBS=
|
||||
|
||||
SHLIB_XLDFLAGS=
|
||||
SHLIB_LIBS=
|
||||
SHLIB_LIBSUFF='so'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)'
|
||||
|
||||
PROGNAME=`basename $0`
|
||||
USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-C) shift; SHOBJ_CC="$1"; shift ;;
|
||||
-c) shift; host_cpu="$1"; shift ;;
|
||||
-o) shift; host_os="$1"; shift ;;
|
||||
-v) shift; host_vendor="$1"; shift ;;
|
||||
*) echo "$USAGE" >&2 ; exit 2;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "${host_os}-${SHOBJ_CC}" in
|
||||
sunos4*-gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD=/usr/bin/ld
|
||||
SHOBJ_LDFLAGS='-assert pure-text'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
sunos4*)
|
||||
SHOBJ_CFLAGS=-pic
|
||||
SHOBJ_LD=/usr/bin/ld
|
||||
SHOBJ_LDFLAGS='-assert pure-text'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
sunos5*-gcc*|solaris2*-gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-i'
|
||||
|
||||
SHLIB_XLDFLAGS='-R $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sunos5*|solaris2*)
|
||||
SHOBJ_CFLAGS='-K pic'
|
||||
SHOBJ_LD=/usr/ccs/bin/ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -i -h $@'
|
||||
|
||||
SHLIB_XLDFLAGS='-R $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
freebsd2* | netbsd* | openbsd*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-x -Bshareable'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
freebsd3*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_XLDFLAGS='-R$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
linux*)
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
bsdi2*)
|
||||
SHOBJ_CC=shlicc2
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS=-r
|
||||
SHOBJ_LIBS=-lc_s.2.1.0
|
||||
|
||||
# BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
|
||||
# the ass -- they require changing {/usr/lib,etc}/shlib.map on
|
||||
# each system, and the library creation process is byzantine
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
bsdi3*)
|
||||
SHOBJ_CC=shlicc2
|
||||
SHOBJ_CFLAGS=
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS=-r
|
||||
SHOBJ_LIBS=-lc_s.3.0.0
|
||||
|
||||
# BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
|
||||
# the ass -- they require changing {/usr/lib,etc}/shlib.map on
|
||||
# each system, and the library creation process is byzantine
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
bsdi4*)
|
||||
# BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked
|
||||
# shared libraries. gcc 2.x is the standard compiler, and the
|
||||
# `normal' gcc options should work as they do in Linux.
|
||||
|
||||
SHOBJ_CFLAGS=-fPIC
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||
;;
|
||||
|
||||
osf*)
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
aix4.[2-9]*-gcc*) # lightly tested by jik@cisco.com
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='ld'
|
||||
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
|
||||
SHOBJ_XLDFLAGS='-G'
|
||||
|
||||
SHLIB_XLDFLAGS='-bM:SRE'
|
||||
SHLIB_LIBS='-lcurses -lc'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
aix4.[2-9]*)
|
||||
SHOBJ_CFLAGS=-K
|
||||
SHOBJ_LD='ld'
|
||||
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
|
||||
SHOBJ_XLDFLAGS='-G'
|
||||
|
||||
SHLIB_XLDFLAGS='-bM:SRE'
|
||||
SHLIB_LIBS='-lcurses -lc'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
#
|
||||
# THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface
|
||||
#
|
||||
irix[56]*-gcc*)
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
irix[56]*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@'
|
||||
|
||||
SHLIB_XLDFLAGS='-rpath $(libdir)'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux9*-gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux9*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
hpux10*-gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux10*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
hpux11*-gcc*)
|
||||
# must use gcc; the bundled cc cannot compile PIC code
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
# SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@'
|
||||
SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s -Wl,+h,$@'
|
||||
|
||||
SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
|
||||
SHLIB_LIBSUFF='sl'
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
hpux11*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
sysv4*-gcc*)
|
||||
SHOBJ_CFLAGS=-shared
|
||||
SHOBJ_LDFLAGS='-shared -h $@'
|
||||
SHOBJ_LD='${CC}'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv4*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-dy -z text -G -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sco3.2v5*-gcc*)
|
||||
SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sco3.2v5*)
|
||||
SHOBJ_CFLAGS='-K pic -b elf'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5uw7*-gcc*)
|
||||
SHOBJ_CFLAGS='-fpic'
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
sysv5uw7*)
|
||||
SHOBJ_CFLAGS='-K PIC'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -z text -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
dgux*-gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
SHOBJ_CFLAGS='-K pic'
|
||||
SHOBJ_LD=ld
|
||||
SHOBJ_LDFLAGS='-G -dy -h $@'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
#
|
||||
# Rely on correct gcc configuration for everything else
|
||||
#
|
||||
*-gcc*)
|
||||
SHOBJ_CFLAGS=-fpic
|
||||
SHOBJ_LD='${CC}'
|
||||
SHOBJ_LDFLAGS='-shared'
|
||||
|
||||
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
|
||||
;;
|
||||
|
||||
*)
|
||||
SHOBJ_STATUS=unsupported
|
||||
SHLIB_STATUS=unsupported
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
echo SHOBJ_CC=\'"$SHOBJ_CC"\'
|
||||
echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\'
|
||||
echo SHOBJ_LD=\'"$SHOBJ_LD"\'
|
||||
echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\'
|
||||
echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\'
|
||||
echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\'
|
||||
|
||||
echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\'
|
||||
echo SHLIB_LIBS=\'"$SHLIB_LIBS"\'
|
||||
echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\'
|
||||
echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\'
|
||||
|
||||
echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\'
|
||||
echo SHLIB_STATUS=\'"$SHLIB_STATUS"\'
|
||||
|
||||
exit 0
|
@ -232,6 +232,16 @@ _rl_set_screen_size (rows, cols)
|
||||
screenchars = screenwidth * screenheight;
|
||||
}
|
||||
|
||||
void
|
||||
rl_resize_terminal ()
|
||||
{
|
||||
if (readline_echoing_p)
|
||||
{
|
||||
_rl_get_screen_size (fileno (rl_instream), 1);
|
||||
_rl_redisplay_after_sigwinch ();
|
||||
}
|
||||
}
|
||||
|
||||
struct _tc_string {
|
||||
char *tc_var;
|
||||
char **tc_value;
|
||||
|
@ -47,10 +47,6 @@
|
||||
|
||||
#include "tilde.h"
|
||||
|
||||
#ifdef SHELL
|
||||
#include "shell.h"
|
||||
#endif
|
||||
|
||||
#if !defined (HAVE_GETPW_DECLS)
|
||||
extern struct passwd *getpwuid (), *getpwnam ();
|
||||
#endif /* !HAVE_GETPW_DECLS */
|
||||
@ -77,6 +73,12 @@ static char *xmalloc (), *xrealloc ();
|
||||
extern char *xmalloc (), *xrealloc ();
|
||||
#endif /* TEST || STATIC_MALLOC */
|
||||
|
||||
/* If being compiled as part of bash, these will be satisfied from
|
||||
variables.o. If being compiled as part of readline, they will
|
||||
be satisfied from shell.o. */
|
||||
extern char *get_home_dir ();
|
||||
extern char *get_env_value ();
|
||||
|
||||
/* The default value of tilde_additional_prefixes. This is set to
|
||||
whitespace preceding a tilde so that simple programs which do not
|
||||
perform any word separation get desired behaviour. */
|
||||
@ -171,15 +173,6 @@ tilde_find_suffix (string)
|
||||
return (i);
|
||||
}
|
||||
|
||||
#if !defined (SHELL)
|
||||
static char *
|
||||
get_string_value (varname)
|
||||
char *varname;
|
||||
{
|
||||
return ((char *)getenv (varname));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Return a new string which is the result of tilde expanding STRING. */
|
||||
char *
|
||||
tilde_expand (string)
|
||||
@ -284,27 +277,6 @@ glue_prefix_and_suffix (prefix, suffix, suffind)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static char *
|
||||
get_home_dir ()
|
||||
{
|
||||
char *home_dir;
|
||||
|
||||
#ifdef SHELL
|
||||
home_dir = (char *)NULL;
|
||||
if (current_user.home_dir == 0)
|
||||
get_current_user_info ();
|
||||
home_dir = current_user.home_dir;
|
||||
#else
|
||||
struct passwd *entry;
|
||||
|
||||
home_dir = (char *)NULL;
|
||||
entry = getpwuid (getuid ());
|
||||
if (entry)
|
||||
home_dir = entry->pw_dir;
|
||||
#endif
|
||||
return (home_dir);
|
||||
}
|
||||
|
||||
/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
|
||||
tilde. If there is no expansion, call tilde_expansion_failure_hook.
|
||||
This always returns a newly-allocated string, never static storage. */
|
||||
@ -328,7 +300,7 @@ tilde_expand_word (filename)
|
||||
if (filename[1] == '\0' || filename[1] == '/')
|
||||
{
|
||||
/* Prefix $HOME to the rest of the string. */
|
||||
expansion = get_string_value ("HOME");
|
||||
expansion = get_env_value ("HOME");
|
||||
|
||||
/* If there is no HOME variable, look up the directory in
|
||||
the password database. */
|
||||
|
@ -77,7 +77,7 @@
|
||||
extern char *xmalloc (), *xrealloc ();
|
||||
|
||||
/* Variables imported from readline.c */
|
||||
extern int rl_point, rl_end, rl_mark, rl_done;
|
||||
extern int rl_point, rl_end, rl_mark;
|
||||
extern FILE *rl_instream;
|
||||
extern int rl_line_buffer_len, rl_explicit_arg, rl_numeric_arg;
|
||||
extern Keymap _rl_keymap;
|
||||
@ -352,9 +352,9 @@ rl_vi_prev_word (count, key)
|
||||
}
|
||||
|
||||
if (_rl_uppercase_p (key))
|
||||
rl_vi_bWord (count);
|
||||
rl_vi_bWord (count, key);
|
||||
else
|
||||
rl_vi_bword (count);
|
||||
rl_vi_bword (count, key);
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -374,9 +374,9 @@ rl_vi_next_word (count, key)
|
||||
}
|
||||
|
||||
if (_rl_uppercase_p (key))
|
||||
rl_vi_fWord (count);
|
||||
rl_vi_fWord (count, key);
|
||||
else
|
||||
rl_vi_fword (count);
|
||||
rl_vi_fword (count, key);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -392,16 +392,16 @@ rl_vi_end_word (count, key)
|
||||
}
|
||||
|
||||
if (_rl_uppercase_p (key))
|
||||
rl_vi_eWord (count);
|
||||
rl_vi_eWord (count, key);
|
||||
else
|
||||
rl_vi_eword (count);
|
||||
rl_vi_eword (count, key);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Move forward a word the way that 'W' does. */
|
||||
int
|
||||
rl_vi_fWord (count)
|
||||
int count;
|
||||
rl_vi_fWord (count, ignore)
|
||||
int count, ignore;
|
||||
{
|
||||
while (count-- && rl_point < (rl_end - 1))
|
||||
{
|
||||
@ -417,8 +417,8 @@ rl_vi_fWord (count)
|
||||
}
|
||||
|
||||
int
|
||||
rl_vi_bWord (count)
|
||||
int count;
|
||||
rl_vi_bWord (count, ignore)
|
||||
int count, ignore;
|
||||
{
|
||||
while (count-- && rl_point > 0)
|
||||
{
|
||||
@ -441,8 +441,8 @@ rl_vi_bWord (count)
|
||||
}
|
||||
|
||||
int
|
||||
rl_vi_eWord (count)
|
||||
int count;
|
||||
rl_vi_eWord (count, ignore)
|
||||
int count, ignore;
|
||||
{
|
||||
while (count-- && rl_point < (rl_end - 1))
|
||||
{
|
||||
@ -471,8 +471,8 @@ rl_vi_eWord (count)
|
||||
}
|
||||
|
||||
int
|
||||
rl_vi_fword (count)
|
||||
int count;
|
||||
rl_vi_fword (count, ignore)
|
||||
int count, ignore;
|
||||
{
|
||||
while (count-- && rl_point < (rl_end - 1))
|
||||
{
|
||||
@ -497,8 +497,8 @@ rl_vi_fword (count)
|
||||
}
|
||||
|
||||
int
|
||||
rl_vi_bword (count)
|
||||
int count;
|
||||
rl_vi_bword (count, ignore)
|
||||
int count, ignore;
|
||||
{
|
||||
while (count-- && rl_point > 0)
|
||||
{
|
||||
@ -536,8 +536,8 @@ rl_vi_bword (count)
|
||||
}
|
||||
|
||||
int
|
||||
rl_vi_eword (count)
|
||||
int count;
|
||||
rl_vi_eword (count, ignore)
|
||||
int count, ignore;
|
||||
{
|
||||
while (count-- && rl_point < rl_end - 1)
|
||||
{
|
||||
@ -729,7 +729,7 @@ rl_vi_put (count, key)
|
||||
if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end))
|
||||
rl_point++;
|
||||
|
||||
rl_yank ();
|
||||
rl_yank (1, key);
|
||||
rl_backward (1, key);
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user