From 9f4062f702a198c1cc9e1adfb4fb14570d8655ca Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Tue, 23 Jul 2013 16:31:58 -0700 Subject: Updating Balau for its StdIO module, and introducing Dalos-modules to hold non-low level stuff, such as readline support. --- .gitmodules | 3 +++ Balau | 2 +- Makefile | 8 +++++--- src/Dalos-cli.cc | 8 ++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index dba0ff9..c52bc37 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "Balau"] path = Balau url = git.grumpycoder.net:/pub/repo.git/Balau +[submodule "Dalos-modules"] + path = Dalos-modules + url = git.grumpycoder.net:/pub/repo.git/Dalos-modules diff --git a/Balau b/Balau index d35f4eb..71b4710 160000 --- a/Balau +++ b/Balau @@ -1 +1 @@ -Subproject commit d35f4eb97c77438af67466be97516aef76bee9f0 +Subproject commit 71b4710c4834d747e44451bd7806c5ac4effbcc5 diff --git a/Makefile b/Makefile index 1206cb4..6e59563 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ CPPFLAGS += -g -DDEBUG LDFLAGS += -g endif -INCLUDES = includes Balau/includes Balau/libcoro Balau/libeio Balau/libev Balau/LuaJIT/src +INCLUDES = includes Balau/includes Balau/libcoro Balau/libeio Balau/libev Balau/LuaJIT/src Dalos-modules/includes LIBS = z readline ifeq ($(SYSTEM),Darwin) @@ -27,10 +27,12 @@ CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) LDFLAGS += $(ARCH_FLAGS) LDLIBS = $(addprefix -l, $(LIBS)) -vpath %.cc src +vpath %.cc src Dalos-modules/src DALOS_CLI_SOURCES = \ -Dalos-cli.cc +Dalos-cli.cc \ +\ +Readline.cc \ ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(DALOS_CLI_SOURCES)))) ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(DALOS_CLI_SOURCES)))) diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc index ab15256..fedec88 100644 --- a/src/Dalos-cli.cc +++ b/src/Dalos-cli.cc @@ -105,12 +105,12 @@ void MainTask::Do() { break; } - if (*line_read) - add_history(line_read); + if (!*line_read) + continue; - String line = line_read; + add_history(line_read); - LuaExecString luaExecString(line); + LuaExecString luaExecString(line_read); luaExecString.exec(luaMainTask); } } -- cgit v1.2.3