mirror of
https://github.com/troglobit/editline.git
synced 2025-09-16 08:28:09 +08:00
Basic support for custom completion handlers with the two "standard"
rl_complete() and rl_list_possib(). Simply leave out complete.o from the default build and in all programs require these two functions to be supplied. A better alternative would be to use function pointers and check those for NULL in the running code. With this code, and no completion handler the editline code will die.
This commit is contained in:
@@ -2,5 +2,8 @@ AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
lib_LIBRARIES = libedit.a
|
||||
|
||||
libedit_a_SOURCES = editline.c editline.h complete.c sysunix.c unix.h
|
||||
|
||||
libedit_a_SOURCES = editline.c editline.h sysunix.c unix.h
|
||||
if COMPLETE
|
||||
# Built-in completion handler.
|
||||
libedit_a_SOURCES += complete.c
|
||||
endif
|
||||
|
@@ -30,6 +30,8 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
# Built-in completion handler.
|
||||
@COMPLETE_TRUE@am__append_1 = complete.c
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
@@ -52,8 +54,11 @@ AR = ar
|
||||
ARFLAGS = cru
|
||||
libedit_a_AR = $(AR) $(ARFLAGS)
|
||||
libedit_a_LIBADD =
|
||||
am_libedit_a_OBJECTS = editline.$(OBJEXT) complete.$(OBJEXT) \
|
||||
sysunix.$(OBJEXT)
|
||||
am__libedit_a_SOURCES_DIST = editline.c editline.h sysunix.c unix.h \
|
||||
complete.c
|
||||
@COMPLETE_TRUE@am__objects_1 = complete.$(OBJEXT)
|
||||
am_libedit_a_OBJECTS = editline.$(OBJEXT) sysunix.$(OBJEXT) \
|
||||
$(am__objects_1)
|
||||
libedit_a_OBJECTS = $(am_libedit_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
@@ -63,7 +68,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libedit_a_SOURCES)
|
||||
DIST_SOURCES = $(libedit_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libedit_a_SOURCES_DIST)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
@@ -154,7 +159,8 @@ top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
lib_LIBRARIES = libedit.a
|
||||
libedit_a_SOURCES = editline.c editline.h complete.c sysunix.c unix.h
|
||||
libedit_a_SOURCES = editline.c editline.h sysunix.c unix.h \
|
||||
$(am__append_1)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
Reference in New Issue
Block a user